Missing inspect
This commit is contained in:
parent
92f2d83541
commit
d98e12624d
2 changed files with 5 additions and 5 deletions
|
|
@ -25,6 +25,7 @@ __all__ = [
|
|||
import torch
|
||||
import functools
|
||||
from unsloth_zoo.utils import Version
|
||||
import inspect
|
||||
|
||||
@functools.cache
|
||||
def is_hip():
|
||||
|
|
|
|||
|
|
@ -639,15 +639,14 @@ class FastModel(FastBaseModel):
|
|||
"compatible with `full_finetuning=True`. If you wish to use QAT with LoRA, "
|
||||
"please pass in `qat_scheme` in `FastLanguageModel.get_peft_model(...)` instead."
|
||||
)
|
||||
|
||||
old_model_name = model_name
|
||||
if not use_exact_model_name:
|
||||
model_name = get_model_name(model_name, load_in_4bit)
|
||||
|
||||
# Check if 4bit is allowed specifically for AMD
|
||||
if not ALLOW_BITSANDBYTES:
|
||||
print("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.")
|
||||
load_in_4bit = False
|
||||
|
||||
old_model_name = model_name
|
||||
if not use_exact_model_name:
|
||||
model_name = get_model_name(model_name, load_in_4bit)
|
||||
# Check if pre-quantized models are allowed
|
||||
# For eg AMD GPUs need blocksize = 128, but our pre-quants are blocksize = 64
|
||||
if not ALLOW_PREQUANTIZED_MODELS and model_name.endswith(("-unsloth-bnb-4bit", "-bnb-4bit")):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue