GPT-OSS support (#3099)
This commit is contained in:
parent
d3172a852b
commit
9eab2cbc45
2 changed files with 4 additions and 0 deletions
|
|
@ -589,6 +589,9 @@ class FastModel(FastBaseModel):
|
|||
"float16;torch.float32;torch.float16;"\
|
||||
"if name.endswith(('q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj', 'head')): module.to(torch.float16);"
|
||||
os.environ["TRITON_F32_DEFAULT"] = "ieee"
|
||||
elif "gpt-oss" in lowered_model_name:
|
||||
os.environ["UNSLOTH_MODEL_NAME"] = "gpt_oss"
|
||||
os.environ["UNSLOTH_DISABLE_STATIC_GENERATION"] = "1"
|
||||
else:
|
||||
for check_model_name in DISABLE_COMPILE_MODEL_NAMES:
|
||||
if check_model_name in lowered_model_name:
|
||||
|
|
|
|||
|
|
@ -626,6 +626,7 @@ class FastBaseModel:
|
|||
r = r,
|
||||
lora_alpha = lora_alpha,
|
||||
target_modules = target_modules,
|
||||
target_parameters = kwargs.get("target_parameters", None),
|
||||
lora_dropout = lora_dropout,
|
||||
bias = bias,
|
||||
task_type = task_type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue