Instructions to use QuantFactory/MN-12B-Lyra-v1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/MN-12B-Lyra-v1-GGUF", filename="MN-12B-Lyra-v1.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with Ollama:
ollama run hf.co/QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/MN-12B-Lyra-v1-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/MN-12B-Lyra-v1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/MN-12B-Lyra-v1-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/MN-12B-Lyra-v1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/MN-12B-Lyra-v1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.MN-12B-Lyra-v1-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/MN-12B-Lyra-v1-GGUF
This is quantized version of Sao10K/MN-12B-Lyra-v1 created using llama.cpp
Original Model Card
Mistral-Nemo-12B-Lyra-v1
Anyway. Experimental general roleplaying model.
It works fine enough? Scored pretty high in EQ-Bench [Nemo-RP-v4 - 77.41] , right below Nemomix v4 [77.92] which was well, a big merge. Not bad.
I wanted to run the Creative Writing benchmark but it was too slow to run, for some reason.
---> EQ-Bench Scores
From my testing the regular 1.2 temp + 0.1 min_p works pretty nice. Or go lower temp, as Nemo is good at < 1 temp too.
Prompting Format:
Either [INST] or ChatML works fine. # Why? Merged two differently formatted trains that had some data variation. One on Mistral Instruct, one on ChatML.
Details
- As I said, this was a merge of two models, of which the dataset is pretty much the same, one actually includes roleplay and creative writing, the other one does not, and is more focused on instruct and smarts.
- Model A and Model B are each trained on different formats individually.
- Tokenizer and all are taken from base Nemo 12B, so there are no token conflicts.
- A merge between these models with seperated datasets seem to do better, compared to the dataset being mixed together. I have tried shuffled, and non shuffled data mixes.
- Perhaps it would work for Full-Finetunes, but I am limited up to LoRAs for now.
- For merge methods, della_linear method worked best for this run specifically, according to internal self benchmarks and blind-preference tests.
- Best merge methods may be different for different model types and sizes. On a seperate Llama 3 experiment, Ties-Rescaled worked best.
My Current Findings:
- After tinkering with Nemo, it is kind of clear for me that the base itself is unruly to train on, for my datasets. I'd need to SFT first, then use that as a base.
- Nemo may train well, but like Mistral it is kind of... dry. Bland even with unique, creative and varied data. It needs multi-stage fine-tuning. Llama 3 does not have this... issue?
- Nemo's effective context is unfortunately kind of a bummer? It's effective max is 16K, I have tried loras with up to 64K trains on a lot of samples, they just do not work well, unlike on Yi.
- For roleplay, 16K context is plenty enough, so that is fine.
Further Iterations:
Previous version uploaded was a beta. # It had tokenizer issues lol.
This is simply v1. I have a lot more ideas to improve upon this, the data is being cooked right now. Those might come in a bit.
My upcoming plans:
- RL on a specially curated dataset, to target instruction following over multi-turn and creative writing abilities.
- Iterate upon previous versions with more varied data sources and types, on various domains ala Nitral's Hathor work. He's a cool guy.
Have a good day.
- Downloads last month
- 22
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
