You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working on Mistral_v0.3_(7B)-Alpaca.ipynb notebook and it failed in the following cell. Any suggestions? Thanks!
if True:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "lora_model", # YOUR MODEL YOU USED FOR TRAINING
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
inputs = tokenizer(
[
alpaca_prompt.format(
"What is a famous tall tower in Paris?", # instruction
"", # input
"", # output - leave this blank for generation!
),
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
tokenizer.batch_decode(outputs)
With the following error:
AttributeError Traceback (most recent call last) /tmp/ipython-input-664895264.py in <cell line: 0>()
1 if True:
2 from unsloth import FastLanguageModel
----> 3 model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "lora_model", # YOUR MODEL YOU USED FOR TRAINING
5 max_seq_length = max_seq_length,
1 frames /usr/local/lib/python3.12/dist-packages/unsloth_zoo/compiler.py in get_transformers_model_type(config)
231 elif hasattr(config, "auto_mapping"):
232 # Use GptOssForCausalLM
--> 233 model_type = config.auto_mapping.get("base_model_class", None)
234 if model_type is None:
235 # Last resort use model name unsloth/gpt-oss-20b-unsloth-bnb-4bit
AttributeError: 'NoneType' object has no attribute 'get'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was working on Mistral_v0.3_(7B)-Alpaca.ipynb notebook and it failed in the following cell. Any suggestions? Thanks!
With the following error:
AttributeError Traceback (most recent call last)
/tmp/ipython-input-664895264.py in <cell line: 0>()
1 if True:
2 from unsloth import FastLanguageModel
----> 3 model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "lora_model", # YOUR MODEL YOU USED FOR TRAINING
5 max_seq_length = max_seq_length,
1 frames
/usr/local/lib/python3.12/dist-packages/unsloth_zoo/compiler.py in get_transformers_model_type(config)
231 elif hasattr(config, "auto_mapping"):
232 # Use GptOssForCausalLM
--> 233 model_type = config.auto_mapping.get("base_model_class", None)
234 if model_type is None:
235 # Last resort use model name unsloth/gpt-oss-20b-unsloth-bnb-4bit
AttributeError: 'NoneType' object has no attribute 'get'
Beta Was this translation helpful? Give feedback.
All reactions