Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert axolotl loras to ollama adapter #208

Open
rusenask opened this issue Mar 2, 2024 · 2 comments
Open

Convert axolotl loras to ollama adapter #208

rusenask opened this issue Mar 2, 2024 · 2 comments

Comments

@rusenask
Copy link
Contributor

rusenask commented Mar 2, 2024

  1. 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
  2. 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

  1. Run the new model
@lukemarsden
Copy link
Collaborator

lukemarsden commented Mar 14, 2024

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.

@Hebbar-10
Copy link

Hebbar-10 commented Mar 20, 2024

mistral:7b-instruct-v0.1-fp16 unfortunately doesn't exist anymore, mistral:7b-instruct-v0.2-fp16 works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants