Instructions to use LoneStriker/AlphaMonarch-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use LoneStriker/AlphaMonarch-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="LoneStriker/AlphaMonarch-7B-GGUF", filename="AlphaMonarch-7B-Q3_K_L.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use LoneStriker/AlphaMonarch-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf LoneStriker/AlphaMonarch-7B-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 LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf LoneStriker/AlphaMonarch-7B-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 LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use LoneStriker/AlphaMonarch-7B-GGUF with Ollama:
ollama run hf.co/LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
- Unsloth Studio new
How to use LoneStriker/AlphaMonarch-7B-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 LoneStriker/AlphaMonarch-7B-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 LoneStriker/AlphaMonarch-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LoneStriker/AlphaMonarch-7B-GGUF to start chatting
- Docker Model Runner
How to use LoneStriker/AlphaMonarch-7B-GGUF with Docker Model Runner:
docker model run hf.co/LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
- Lemonade
How to use LoneStriker/AlphaMonarch-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LoneStriker/AlphaMonarch-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.AlphaMonarch-7B-GGUF-Q4_K_M
List all available models
lemonade list
π AlphaMonarch-7B
tl;dr: AlphaMonarch-7B is a new DPO merge that retains all the reasoning abilities of the very best merges and significantly improves its conversational abilities. Kind of the best of both worlds in a 7B model. π
AlphaMonarch-7B is a DPO fine-tuned of mlabonne/NeuralMonarch-7B using the argilla/OpenHermes2.5-dpo-binarized-alpha preference dataset.
It is based on a merge of the following models using LazyMergekit:
Special thanks to Jon Durbin, Intel, Argilla, and Teknium for the preference datasets.
Try the demo: https://huggingface.co/spaces/mlabonne/AlphaMonarch-7B-GGUF-Chat
π Applications
This model uses a context window of 8k. I recommend using it with the Mistral Instruct chat template (works perfectly with LM Studio).
It is one of the very best 7B models in terms of instructing following and reasoning abilities and can be used for conversations, RP, and storytelling. Note that it tends to have a quite formal and sophisticated style, but it can be changed by modifying the prompt.
β‘ Quantized models
π Evaluation
Nous
AlphaMonarch-7B is the best-performing 7B model on Nous' benchmark suite (evaluation performed using LLM AutoEval). See the entire leaderboard here.
| Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench |
|---|---|---|---|---|---|
| AlphaMonarch-7B π | 62.74 | 45.37 | 77.01 | 78.39 | 50.2 |
| NeuralMonarch-7B π | 62.73 | 45.31 | 76.99 | 78.35 | 50.28 |
| Monarch-7B π | 62.68 | 45.48 | 77.07 | 78.04 | 50.14 |
| teknium/OpenHermes-2.5-Mistral-7B π | 52.42 | 42.75 | 72.99 | 52.99 | 40.94 |
| mlabonne/NeuralHermes-2.5-Mistral-7B π | 53.51 | 43.67 | 73.24 | 55.37 | 41.76 |
| mlabonne/NeuralBeagle14-7B π | 60.25 | 46.06 | 76.77 | 70.32 | 47.86 |
| mlabonne/NeuralOmniBeagle-7B π | 62.3 | 45.85 | 77.26 | 76.06 | 50.03 |
| eren23/dpo-binarized-NeuralTrix-7B π | 62.5 | 44.57 | 76.34 | 79.81 | 49.27 |
| CultriX/NeuralTrix-7B-dpo π | 62.5 | 44.61 | 76.33 | 79.8 | 49.24 |
EQ-bench
AlphaMonarch-7B is also outperforming 70B and 120B parameter models on EQ-bench by Samuel J. Paech, who kindly ran the evaluations.
MT-Bench
########## First turn ##########
score
model turn
gpt-4 1 8.95625
OmniBeagle-7B 1 8.31250
AlphaMonarch-7B 1 8.23750
claude-v1 1 8.15000
NeuralMonarch-7B 1 8.09375
gpt-3.5-turbo 1 8.07500
claude-instant-v1 1 7.80000
########## Second turn ##########
score
model turn
gpt-4 2 9.025000
claude-instant-v1 2 8.012658
OmniBeagle-7B 2 7.837500
gpt-3.5-turbo 2 7.812500
claude-v1 2 7.650000
AlphaMonarch-7B 2 7.618750
NeuralMonarch-7B 2 7.375000
########## Average ##########
score
model
gpt-4 8.990625
OmniBeagle-7B 8.075000
gpt-3.5-turbo 7.943750
AlphaMonarch-7B 7.928125
claude-instant-v1 7.905660
claude-v1 7.900000
NeuralMonarch-7B 7.734375
NeuralBeagle14-7B 7.628125
Open LLM Leaderboard
AlphaMonarch-7B is one of the best-performing non-merge 7B models on the Open LLM Leaderboard:
π» Usage
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "mlabonne/AlphaMonarch-7B"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
- Downloads last month
- 39
3-bit
4-bit
5-bit
6-bit
8-bit


