unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi, Qwen 2.5 & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
18.41k stars 1.29k forks source link

URGENT: unsloth saved lora adapter config not supported in VLLM #1191

Closed xinyudong93 closed 3 weeks ago

xinyudong93 commented 4 weeks ago

I saved trained unsloth model in lora method:

model.save_pretrained_merged(adapter_path, tokenizer, save_method = "lora",)

Then use vllm.LLM to load it like:

llm = LLM( adapter_path tensor_parallel_size=tensor_parallel_size, enable_lora=True, max_lora_rank=64 )

it returned error:

ValueError: No supported config format found in unsloth_llama_3_1_pathology_epoch8_adapter

But if I save the merged model:

model.save_pretrained_merged(merged_model_path, tokenizer)

vllm can load it

danielhanchen commented 3 weeks ago

@xinyudong93 Apologies on the delay - vLLM for LoRAs are done in https://docs.vllm.ai/en/latest/models/lora.html