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
*** Load base model and tokenizer from './temp/da-fr--Mistral-NeMo-Minitron-8B-ARChitects-Full-bnb-4bit/transformers/default/1'...
🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
🦥 Unsloth Zoo will now patch everything to make training faster!
Traceback (most recent call last):
File "/home/miniconda3/envs/env_arc_prize_original/lib/python3.10/site-packages/unsloth/tokenizer_utils.py", line 1061, in <module>
exec(trainer_text, globals())
File "<string>", line 4
model = <class 'inspect._empty'>,
^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
I encountered the same issue as you did. I checked all the installation versions on the official Colab and ensured that they were consistent, but the problem still persisted. Eventually, I set vllm_cache=True and found that the model could run normally and generate proper sequences. To be more specific, the settings are as follows:
model, tokenizer=FastLanguageModel.from_pretrained(
model_name=model_path,
max_seq_length=max_seq_length,
load_in_4bit=True,
fast_inference=True, # set True if you want vLLM fast inferencemax_lora_rank=lora_rank,
gpu_memory_utilization=0.7
)
training_args_lyrics=GRPOConfig(
use_vllm=True, # use vLLM for fast inference!learning_rate=5e-6,
adam_beta1=0.9,
adam_beta2=0.99,
weight_decay=0.1,
warmup_ratio=0.1,
lr_scheduler_type="cosine",
optim="paged_adamw_8bit",
logging_steps=1,
bf16=is_bfloat16_supported(),
fp16=notis_bfloat16_supported(),
per_device_train_batch_size=4,
gradient_accumulation_steps=2, # Increase to 4 for smoother trainingnum_generations=8, # Decrease if out of memorymax_prompt_length=768,
max_completion_length=768,
num_train_epochs=2, # Set to 1 for a full training run# max_steps = 50,save_steps=250,
max_grad_norm=0.1,
report_to="none", # Can use Weights & Biasesoutput_dir="outputs_lyrics_phase",
)
With these settings, the program runs smoothly. It seems that the current models only support vllm-based gradient backpropagation. Without enabling vllm_cache, the first batch of data might be normal, but subsequent batches often encounter repetitive issues. However, once vllm_cache is turned on, the aforementioned problems are resolved!
Activity
danielhanchen commentedon Feb 26, 2025
Oh yep I saw this in another issue you wrote I think - will investigate!
StarLight1212 commentedon Feb 26, 2025
I encountered the same issue as you did. I checked all the installation versions on the official Colab and ensured that they were consistent, but the problem still persisted. Eventually, I set
vllm_cache=Trueand found that the model could run normally and generate proper sequences. To be more specific, the settings are as follows:With these settings, the program runs smoothly. It seems that the current models only support vllm-based gradient backpropagation. Without enabling
vllm_cache, the first batch of data might be normal, but subsequent batches often encounter repetitive issues. However, oncevllm_cacheis turned on, the aforementioned problems are resolved!