Merge branch 'main' into nightly
This commit is contained in:
commit
84e303dc63
1 changed files with 4 additions and 2 deletions
|
|
@ -258,6 +258,7 @@ class FastLanguageModel(FastLlamaModel):
|
|||
if model_name.lower().endswith("-bf16"):
|
||||
load_in_4bit = False
|
||||
load_in_8bit = False
|
||||
load_in_fp8 = False
|
||||
load_in_16bit = True
|
||||
|
||||
if USE_MODELSCOPE and not os.path.exists(model_name):
|
||||
|
|
@ -386,7 +387,7 @@ class FastLanguageModel(FastLlamaModel):
|
|||
if model_name.lower().endswith("-bf16"):
|
||||
load_in_4bit = False
|
||||
load_in_8bit = False
|
||||
load_in_fp8 = False
|
||||
load_in_fp8 = False
|
||||
load_in_16bit = True
|
||||
|
||||
model_config = AutoConfig.from_pretrained(
|
||||
|
|
@ -710,9 +711,10 @@ class FastModel(FastBaseModel):
|
|||
)
|
||||
load_in_4bit = False
|
||||
load_in_8bit = False
|
||||
load_in_fp8 = False
|
||||
load_in_16bit = False
|
||||
|
||||
if int(load_in_4bit) + int(load_in_8bit) + int(load_in_16bit) >= 2:
|
||||
if int(load_in_4bit) + int(load_in_8bit) + int(load_in_16bit) + int(load_in_fp8 != False) >= 2:
|
||||
raise RuntimeError(
|
||||
"Unsloth: Can only load in 4bit or 8bit or 16bit, not a combination!\n"
|
||||
"Also, we by default set `load_in_4bit = True`.\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue