helix
helix copied to clipboard
Convert axolotl loras to ollama adapter
- https://github.com/ggerganov/llama.cpp/blob/master/convert-lora-to-ggml.py - this should run together with adapter_config.json, adapter_model.bin and config.json. It will spit out
ggml-adapter-model.bin
- Ollama can then load it like this with a custom model file:
FROM mistral:7b-instruct-v0.2-fp16
ADAPTER ./data/ggml-adapter-model.bin
TEMPLATE """[INST] {{ .System }} {{ .Prompt }} [/INST]"""
PARAMETER stop "[INST]"
PARAMETER stop "[/INST]"
ollama create doctors-model -f Modelfile
- Run the new model
Technically this should be mistral:7b-instruct-v0.1-fp16
I think, because in Helix (with axolotl) the LoRA is finetuned on Mistral-7B v0.1, not v0.2.
mistral:7b-instruct-v0.1-fp16
unfortunately doesn't exist anymore, mistral:7b-instruct-v0.2-fp16
works fine.