Instructions to use unsloth/Trinity-Large-Preview-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Trinity-Large-Preview-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/Trinity-Large-Preview-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/Trinity-Large-Preview-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 unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
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 unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
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 unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- Ollama
How to use unsloth/Trinity-Large-Preview-GGUF with Ollama:
ollama run hf.co/unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
- Unsloth Studio
How to use unsloth/Trinity-Large-Preview-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 unsloth/Trinity-Large-Preview-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 unsloth/Trinity-Large-Preview-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/Trinity-Large-Preview-GGUF to start chatting
- Pi
How to use unsloth/Trinity-Large-Preview-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/Trinity-Large-Preview-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Trinity-Large-Preview-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Trinity-Large-Preview-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use unsloth/Trinity-Large-Preview-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/Trinity-Large-Preview-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "unsloth/Trinity-Large-Preview-GGUF:UD-Q4_K_XL" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ags:
|
| 3 |
+
- unsloth
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- es
|
| 8 |
+
- fr
|
| 9 |
+
- de
|
| 10 |
+
- it
|
| 11 |
+
- pt
|
| 12 |
+
- ru
|
| 13 |
+
- ar
|
| 14 |
+
- hi
|
| 15 |
+
- ko
|
| 16 |
+
- zh
|
| 17 |
+
library_name: transformers
|
| 18 |
+
base_model:
|
| 19 |
+
- arcee-ai/Trinity-Large-Preview
|
| 20 |
+
---
|
| 21 |
+
> [!NOTE]
|
| 22 |
+
> Includes Unsloth **chat template fixes**! <br> For `llama.cpp`, use `--jinja`
|
| 23 |
+
>
|
| 24 |
+
|
| 25 |
+
<div>
|
| 26 |
+
<p style="margin-top: 0;margin-bottom: 0;">
|
| 27 |
+
<em><a href="https://docs.unsloth.ai/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0</a> achieves superior accuracy & outperforms other leading quants.</em>
|
| 28 |
+
</p>
|
| 29 |
+
<div style="display: flex; gap: 5px; align-items: center; ">
|
| 30 |
+
<a href="https://github.com/unslothai/unsloth/">
|
| 31 |
+
<img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
|
| 32 |
+
</a>
|
| 33 |
+
<a href="https://discord.gg/unsloth">
|
| 34 |
+
<img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
|
| 35 |
+
</a>
|
| 36 |
+
<a href="https://docs.unsloth.ai/">
|
| 37 |
+
<img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
|
| 38 |
+
</a>
|
| 39 |
+
</div>
|
| 40 |
+
</div>
|
| 41 |
+
|
| 42 |
+
<!-- markdownlint-disable first-line-h1 -->
|
| 43 |
+
<!-- markdownlint-disable html -->
|
| 44 |
+
<!-- markdownlint-disable no-duplicate-header -->
|
| 45 |
+
|
| 46 |
+
<div align="center">
|
| 47 |
+
<picture>
|
| 48 |
+
<img
|
| 49 |
+
src="https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/i-v1KyAMOW_mgVGeic9WJ.png"
|
| 50 |
+
alt="Arcee Trinity Large"
|
| 51 |
+
style="max-width: 100%; height: auto;"
|
| 52 |
+
>
|
| 53 |
+
</picture>
|
| 54 |
+
</div>
|
| 55 |
+
<hr>
|
| 56 |
+
|
| 57 |
+
# Trinity-Large-Preview
|
| 58 |
+
|
| 59 |
+
## Introduction
|
| 60 |
+
|
| 61 |
+
Trinity-Large-Preview is a 398B-parameter sparse Mixture-of-Experts (MoE) model with approximately 13B active parameters per token. It is the largest model in Arcee AI's Trinity family, trained on more than 17 trillion tokens and delivering frontier-level performance with strong long-context comprehension.
|
| 62 |
+
Trinity-Large-Preview is a lightly post-trained model based on Trinity-Large-Base.
|
| 63 |
+
|
| 64 |
+
Try it at [chat.arcee.ai](http://chat.arcee.ai/)
|
| 65 |
+
|
| 66 |
+
More details on the training of Trinity Large are available in the [technical report](https://github.com/arcee-ai/trinity-large-tech-report/).
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
## Model Variants
|
| 70 |
+
|
| 71 |
+
The Trinity Large family consists of three checkpoints from the same training run:
|
| 72 |
+
|
| 73 |
+
- **Trinity-Large-Preview** (this release): Lightly post-trained, chat-ready model undergoing active RL
|
| 74 |
+
- **[Trinity-Large-TrueBase](https://huggingface.co/arcee-ai/Trinity-Large-TrueBase)**: 10T-token pre-anneal pretraining checkpoint
|
| 75 |
+
- **[Trinity-Large-Base](https://huggingface.co/arcee-ai/Trinity-Large-Base)**: Full 17T-token pretrained foundation model with mid-training anneals
|
| 76 |
+
|
| 77 |
+
## Architecture
|
| 78 |
+
|
| 79 |
+
Trinity-Large-Preview uses a sparse MoE configuration designed to maximize efficiency while maintaining large-scale capacity.
|
| 80 |
+
|
| 81 |
+
| Hyperparameter | Value |
|
| 82 |
+
|:---|:---:|
|
| 83 |
+
| Total parameters | ~398B |
|
| 84 |
+
| Active parameters per token | ~13B |
|
| 85 |
+
| Experts | 256 (1 shared) |
|
| 86 |
+
| Active experts | 4 |
|
| 87 |
+
| Routing strategy | 4-of-256 (1.56% sparsity) |
|
| 88 |
+
| Dense layers | 6 |
|
| 89 |
+
| Pretraining context length | 8,192 |
|
| 90 |
+
| Context length after extension | 512k |
|
| 91 |
+
| Architecture | Sparse MoE (AfmoeForCausalLM) |
|
| 92 |
+
|
| 93 |
+
## Benchmarks
|
| 94 |
+
|
| 95 |
+
| Benchmark | Llama 4 Maverick | Trinity-Large Preview |
|
| 96 |
+
|-----------|------------------|----------------------|
|
| 97 |
+
| MMLU | 85.5 | 87.2 |
|
| 98 |
+
| MMLU-Pro | 80.5 | 75.2 |
|
| 99 |
+
| GPQA-Diamond | 69.8 | 63.3 |
|
| 100 |
+
| AIME 2025 | 19.3 | 24.0 |
|
| 101 |
+
|
| 102 |
+
## Training Configuration
|
| 103 |
+
|
| 104 |
+
### Pretraining
|
| 105 |
+
|
| 106 |
+
- Training tokens: 17 trillion
|
| 107 |
+
- Data partner: [Datology](https://www.datologyai.com/)
|
| 108 |
+
|
| 109 |
+
<div align="center">
|
| 110 |
+
<picture>
|
| 111 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/sSVjGNHfrJKmQ6w8I18ek.png" style="background-color:ghostwhite;padding:5px;" width="17%" alt="Powered by Datology">
|
| 112 |
+
</picture>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
## Posttraining
|
| 116 |
+
- This checkpoint was instruction tuned on 20B tokens.
|
| 117 |
+
|
| 118 |
+
### Infrastructure
|
| 119 |
+
|
| 120 |
+
- Hardware: 2,048 NVIDIA B300 GPUs
|
| 121 |
+
- Parallelism: HSDP + Expert Parallelism
|
| 122 |
+
- Compute partner: [Prime Intellect](https://www.primeintellect.ai/)
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
<div align="center">
|
| 126 |
+
<picture>
|
| 127 |
+
<img src="https://cdn-avatars.huggingface.co/v1/production/uploads/61e020e4a343274bb132e138/H2mcdPRWtl4iKLd-OYYBc.jpeg" style="background-color:ghostwhite;padding:5px;" width="17%" alt="Powered by Prime Intellect">
|
| 128 |
+
</picture>
|
| 129 |
+
</div>
|
| 130 |
+
|
| 131 |
+
## Usage
|
| 132 |
+
|
| 133 |
+
### Running our model
|
| 134 |
+
|
| 135 |
+
- [Transformers](https://huggingface.co/arcee-ai/Trinity-Large-Preview#transformers)
|
| 136 |
+
- [VLLM](https://huggingface.co/arcee-ai/Trinity-Large-Preview#vllm)
|
| 137 |
+
- [llama.cpp](https://huggingface.co/arcee-ai/Trinity-Large-Preview#llamacpp)
|
| 138 |
+
- [LM Studio](https://huggingface.co/arcee-ai/Trinity-Large-Preview#lm-studio)
|
| 139 |
+
- [API](https://huggingface.co/arcee-ai/Trinity-Large-Preview#api)
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
### Transformers
|
| 143 |
+
|
| 144 |
+
Use the `main` transformers branch or pass `trust_remote_code=True` with a released version.
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 148 |
+
import torch
|
| 149 |
+
|
| 150 |
+
model_id = "arcee-ai/Trinity-Large-Preview"
|
| 151 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 152 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 153 |
+
model_id,
|
| 154 |
+
torch_dtype=torch.bfloat16,
|
| 155 |
+
device_map="auto",
|
| 156 |
+
trust_remote_code=True
|
| 157 |
+
)
|
| 158 |
+
|
| 159 |
+
messages = [
|
| 160 |
+
{"role": "user", "content": "Who are you?"},
|
| 161 |
+
]
|
| 162 |
+
|
| 163 |
+
input_ids = tokenizer.apply_chat_template(
|
| 164 |
+
messages,
|
| 165 |
+
add_generation_prompt=True,
|
| 166 |
+
return_tensors="pt"
|
| 167 |
+
).to(model.device)
|
| 168 |
+
|
| 169 |
+
outputs = model.generate(
|
| 170 |
+
input_ids,
|
| 171 |
+
max_new_tokens=256,
|
| 172 |
+
do_sample=True,
|
| 173 |
+
temperature=0.8,
|
| 174 |
+
top_k=50,
|
| 175 |
+
top_p=0.8
|
| 176 |
+
)
|
| 177 |
+
|
| 178 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 179 |
+
print(response)
|
| 180 |
+
```
|
| 181 |
+
|
| 182 |
+
### VLLM
|
| 183 |
+
|
| 184 |
+
Supported in VLLM release 0.11.1+
|
| 185 |
+
|
| 186 |
+
```bash
|
| 187 |
+
vllm serve arcee-ai/Trinity-Large-Preview \
|
| 188 |
+
--dtype bfloat16 \
|
| 189 |
+
--enable-auto-tool-choice \
|
| 190 |
+
--tool-call-parser hermes
|
| 191 |
+
```
|
| 192 |
+
|
| 193 |
+
### llama.cpp
|
| 194 |
+
|
| 195 |
+
Supported in llama.cpp release b7061+
|
| 196 |
+
|
| 197 |
+
```bash
|
| 198 |
+
llama-server -hf arcee-ai/Trinity-Large-Preview-GGUF:q4_k_m
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
### LM Studio
|
| 202 |
+
|
| 203 |
+
Supported in the latest LM Studio runtime. Search for `arcee-ai/Trinity-Large-Preview-GGUF` in Model Search.
|
| 204 |
+
|
| 205 |
+
### API
|
| 206 |
+
|
| 207 |
+
Available on OpenRouter:
|
| 208 |
+
|
| 209 |
+
```bash
|
| 210 |
+
curl -X POST "https://openrouter.ai/v1/chat/completions" \
|
| 211 |
+
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
|
| 212 |
+
-H "Content-Type: application/json" \
|
| 213 |
+
-d '{
|
| 214 |
+
"model": "arcee-ai/trinity-large-preview",
|
| 215 |
+
"messages": [
|
| 216 |
+
{
|
| 217 |
+
"role": "user",
|
| 218 |
+
"content": "What are some fun things to do in New York?"
|
| 219 |
+
}
|
| 220 |
+
]
|
| 221 |
+
}'
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
## License
|
| 226 |
+
|
| 227 |
+
Trinity-Large-Preview is released under the Apache License, Version 2.0.
|
| 228 |
+
|
| 229 |
+
## Citation
|
| 230 |
+
|
| 231 |
+
```bibtex
|
| 232 |
+
@misc{arcee_trinity_large_preview,
|
| 233 |
+
title = {Trinity-Large-Preview},
|
| 234 |
+
author = {{Arcee AI}},
|
| 235 |
+
year = {2026},
|
| 236 |
+
note = {398B sparse MoE model trained on 17T tokens}
|
| 237 |
+
}
|
| 238 |
+
```
|