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
{{ message }}
Repository navigation
merging trained lora model from unsloth into original mistralai/MistralAI-7B-v0.1 for vllm serving #95
Understanding the need to serve efficiently, I was wondering if anybody here has experience with merging the mistral model trained with unsloth using PEFT back into the original mistral ai model for compatibility and serving via vllm framework?
thank you for that @danielhanchen ! congratulations on the good work :) any plans to include mistral Instruct in your model collection for fine tuning?
@DoctorSlimm Oh you can easily just all it - we support any model based off from Mistral / Llama, ie Mistral instruct, Qwen, Codellama, Tiny Llama, Deepseek - just edit the "unsloth/mistral-7b-bnb-4bit" to "mistralai/Mistral-7B-Instruct-v0.2"
Unless of course you would like a pre-quantized version which makes downloading 4x faster and free up 500MB of VRAM ie: unsloth/mistral-7b-instruct-v0.2-bnb-4bit
@danielhanchen thats incredible, I am kind of a noob and was wondering if using these fast training hacks in your experience affects the final model quality when merged back into the original? as opposed to trainining without unsloth?
@DoctorSlimm Oh so we don't do any approximations - all optimizations are exact vs QLoRA.
If you're using QLoRA, technically our merging retains even higher accuracy since HF currently merges by 4bit -> 16bit -> 4bit. However, our merges can stop at the 16bit part.
Update Unsloth with pip install --upgrade git+https://github.com/unslothai/unsloth.git or look at our updated notebooks!
@danielhanchen you are doing a fantastic job congratulations! additionally i have noted that unsloth/mistral-7b-instruct-v0.2-bnb-4bit does not seem to be downloading for me, perhaps you have the repo on private on hf?
@danielhanchen so exciting! will it train faster? im also running a startup with my younger brother :))) Also: how do you convert the base model to the 4bit version you jjust pushed? or is that a company secret
@DoctorSlimm Yes 2x faster + 60% less VRAM use!! Oh yes!! We're identical!! :)) Oh we just quantize it and upload it :) I actually forgot where, but it should be in HF docs somewhere :)
Activity
danielhanchen commentedon Jan 17, 2024
@DoctorSlimm Techncially
unsloth_save_modeldoes that. See the Mistral notebook on the Github readme and scroll down a bit :)However, it's not stable. In the next 1-2 days, I will release simple conversions which include:
So if you want a more stable version, wait a few days!
DoctorSlimm commentedon Jan 18, 2024
thank you for that @danielhanchen ! congratulations on the good work :) any plans to include
mistral Instructin your model collection for fine tuning?danielhanchen commentedon Jan 18, 2024
@DoctorSlimm Oh you can easily just all it - we support any model based off from Mistral / Llama, ie Mistral instruct, Qwen, Codellama, Tiny Llama, Deepseek - just edit the
"unsloth/mistral-7b-bnb-4bit"to"mistralai/Mistral-7B-Instruct-v0.2"danielhanchen commentedon Jan 18, 2024
Unless of course you would like a pre-quantized version which makes downloading 4x faster and free up 500MB of VRAM ie:
unsloth/mistral-7b-instruct-v0.2-bnb-4bitDoctorSlimm commentedon Jan 18, 2024
@danielhanchen thats incredible, I am kind of a noob and was wondering if using these fast training hacks in your experience affects the final model quality when merged back into the original? as opposed to trainining without
unsloth?danielhanchen commentedon Jan 18, 2024
@DoctorSlimm Oh so we don't do any approximations - all optimizations are exact vs QLoRA.
If you're using QLoRA, technically our merging retains even higher accuracy since HF currently merges by
4bit -> 16bit -> 4bit. However, our merges can stop at the 16bit part.DoctorSlimm commentedon Jan 18, 2024
@danielhanchen wow that is incredible thank you, your work is significantly helping us at https://usemozart.com
danielhanchen commentedon Jan 20, 2024
@DoctorSlimm Sorry on the delayed response! Just added in native 16bit merging with the new release!
For 16bit merging for VLLM:
And to GGUF:
Update Unsloth with
pip install --upgrade git+https://github.com/unslothai/unsloth.gitor look at our updated notebooks!DoctorSlimm commentedon Jan 21, 2024
@danielhanchen you are doing a fantastic job congratulations! additionally i have noted that
unsloth/mistral-7b-instruct-v0.2-bnb-4bitdoes not seem to be downloading for me, perhaps you have the repo onprivateon hf?danielhanchen commentedon Jan 21, 2024
@DoctorSlimm OHH noo!!! I haven't uploaded one yet - I'll do it in a few hours :))))
danielhanchen commentedon Jan 21, 2024
@DoctorSlimm Added it just now!!!
unsloth/mistral-7b-instruct-v0.2-bnb-4bitDoctorSlimm commentedon Jan 21, 2024
@danielhanchen so exciting! will it train faster? im also running a startup with my younger brother :))) Also: how do you convert the base model to the 4bit version you jjust pushed? or is that a company secret
danielhanchen commentedon Jan 22, 2024
@DoctorSlimm Yes 2x faster + 60% less VRAM use!! Oh yes!! We're identical!! :)) Oh we just quantize it and upload it :) I actually forgot where, but it should be in HF docs somewhere :)
Studio safetensors: address PR #5520 review feedback