milkowski commited on
Commit
be91601
·
verified ·
1 Parent(s): d3204e4

Upload 2 files

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. All_charts.jpg +3 -0
  3. README.md +319 -3
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ All_charts.jpg filter=lfs diff=lfs merge=lfs -text
All_charts.jpg ADDED

Git LFS Details

  • SHA256: 7780a4bc991ece46293e7ba4f5209f992efcc7052c7cd949e1676cb970d2007a
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
README.md CHANGED
@@ -1,3 +1,319 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - es
6
+ - fr
7
+ - de
8
+ - it
9
+ - pt
10
+ - ru
11
+ - ar
12
+ - hi
13
+ - ko
14
+ - zh
15
+ library_name: transformers
16
+ base_model:
17
+ - arcee-ai/Trinity-Large-Base
18
+ arxiv:
19
+ - 2602.17004
20
+ tags:
21
+ - reasoning
22
+ - agentic
23
+ - tool-calling
24
+ - thinking
25
+ ---
26
+ <!-- markdownlint-disable first-line-h1 -->
27
+ <!-- markdownlint-disable html -->
28
+ <!-- markdownlint-disable no-duplicate-header -->
29
+
30
+ ```
31
+ Missing MXFP4_MOE GGUF quantization of Arcee AI Trinity Large Thinging model
32
+ with full output tensors precission
33
+
34
+ llama.cpp version: 8701 (66c4f9ded)
35
+ ```
36
+
37
+ <div align="center">
38
+ <picture>
39
+ <img
40
+ src="https://cdn-uploads.huggingface.co/production/uploads/6435718aaaef013d1aec3b8b/i-v1KyAMOW_mgVGeic9WJ.png"
41
+ alt="Arcee Trinity Large Thinking"
42
+ style="max-width: 100%; height: auto;"
43
+ >
44
+ </picture>
45
+ </div>
46
+ <hr>
47
+
48
+ # Trinity-Large-Thinking
49
+
50
+ ## Introduction
51
+
52
+ Trinity-Large-Thinking is a reasoning-optimized variant of Arcee AI's Trinity-Large family — a 398B-parameter sparse Mixture-of-Experts (MoE) model with approximately 13B active parameters per token. Built on Trinity-Large-Base and post-trained with extended chain-of-thought reasoning and agentic RL, Trinity-Large-Thinking delivers state-of-the-art performance on agentic benchmarks while maintaining strong general capabilities.
53
+
54
+ Trinity-Large-Thinking generates explicit reasoning traces wrapped in `<think>...</think>` blocks before producing its final response. This thinking process is critical to the model's performance — **thinking tokens must be kept in context** for multi-turn conversations and agentic loops to function correctly.
55
+
56
+ Try it at [chat.arcee.ai](http://chat.arcee.ai/)
57
+
58
+ More details on the training of Trinity Large are available in the [technical report](https://arxiv.org/abs/2602.17004).
59
+
60
+ ## Key Highlights
61
+
62
+ - **Agentic-first design**: Purpose-built for tool calling, multi-step planning, and agent workflows
63
+ - **State-of-the-art agentic performance**: 94.7% on τ²-Bench, 91.9% on PinchBench, 98.2% on LiveCodeBench
64
+ - **Native reasoning traces**: Extended chain-of-thought via `<think>...</think>` blocks
65
+ - **Compatible with major agent frameworks**: Works out of the box with [OpenClaw](https://github.com/openclaw) and [Hermes Agent](https://github.com/NousResearch/hermes-agent)
66
+ - **Ready to use on [OpenRouter](https://openrouter.ai/)**: No setup required — full reasoning and tool calling support via API
67
+
68
+ ## Model Variants
69
+
70
+ The Trinity Large family consists of four checkpoints:
71
+
72
+ - **Trinity-Large-Thinking** (this release): Reasoning-optimized, agentic post-training with extended chain-of-thought
73
+ - **[Trinity-Large-Preview](https://huggingface.co/arcee-ai/Trinity-Large-Preview)**: Lightly post-trained, chat-ready instruct model (no reasoning_content).
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-Thinking shares the same sparse MoE architecture as Trinity-Large-Preview.
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
+ ![Benchmark charts](https://huggingface.co/arcee-ai/Trinity-Large-Thinking/resolve/main/All_charts.jpg)
95
+
96
+ | Benchmark | Trinity-Large-Thinking | Opus-4.6 | GLM-5 | MiniMax-M2.7 | Kimi-K2.5 |
97
+ |---|---:|---:|---:|---:|---:|
98
+ | IFBench | 52.3 | 53.1 | 72.3 | **75.7** | 70.2 |
99
+ | GPQA-Diamond | 76.3 | **89.2** | 81.6 | 86.2 | 86.9 |
100
+ | Tau2-Airline | **88.0** | 82.0 | 80.5 | 80.0 | 80.0 |
101
+ | Tau2-Telecom | 94.7 | 92.1 | **98.2** | 84.8 | 95.9 |
102
+ | PinchBench | 91.9 | **93.3** | 86.4 | 89.8 | 84.8 |
103
+ | AIME25 | 96.3 | **99.8** | 93.3 | 80.0 | 96.3 |
104
+ | BCFLv4 | 70.1 | **77.0** | 70.8 | 70.6 | 68.3 |
105
+ | MMLU-Pro | 83.4 | **89.1** | 85.8 | 80.8 | 87.1 |
106
+ | SWE-bench Verified* | 63.2 | **75.6** | 72.8 | 75.4 | 70.8 |
107
+
108
+ *All models evaluated in mini-swe-agent-v2
109
+
110
+ ## Thinking-in-Context: Important Usage Note
111
+
112
+ Trinity-Large-Thinking produces reasoning traces inside `<think>...</think>` blocks before generating its final response.
113
+
114
+ This means:
115
+
116
+ 1. **Multi-turn conversations**: When building chat applications, include the full assistant response (thinking + answer) in the conversation history for subsequent turns.
117
+ 2. **Agentic loops**: When using Trinity-Large-Thinking as the backbone of an agent (OpenClaw, Hermes Agent, or custom), ensure your tool-calling loop preserves `<think>` blocks in the message history between steps.
118
+ 3. **Context window management**: The 512k extended context window accommodates long reasoning chains across many agentic steps. If you must truncate history, prefer removing older turns entirely rather than stripping thinking tokens from recent turns.
119
+
120
+ ### How thinking works
121
+
122
+ The model reasons internally before producing its response. When served via vLLM, the reasoning is separated into a dedicated `reasoning_content` field in the API response:
123
+
124
+ // API response structure
125
+ {
126
+ "message": {
127
+ "role": "assistant",
128
+ "reasoning_content": "The user wants flight information. I need to determine the date for next Tuesday, search for flights SFO → JFK, and filter by price < $300.",
129
+ "content": "\n",
130
+ "tool_calls": [{
131
+ "function": {
132
+ "name": "search_flights",
133
+ "arguments": "{\"origin\": \"SFO\", \"destination\": \"JFK\", \"date\": \"2026-04-07\", \"max_price\": 300}"
134
+ }
135
+ }]
136
+ }
137
+ }
138
+
139
+ When building multi-turn agentic loops, include the `reasoning_content` back in the conversation history (re-wrapped in `<think>...</think>` tags within the assistant message) so the model retains its prior reasoning chain.
140
+
141
+ ## Training Configuration
142
+
143
+ ### Pretraining
144
+
145
+ - Training tokens: 17 trillion
146
+ - Data partner: [Datology](https://www.datologyai.com/)
147
+
148
+ ### Posttraining
149
+
150
+ - Instruction tuning and agentic RL with extended chain-of-thought
151
+ - Trained on tool-calling trajectories, multi-step agent tasks, and reasoning chains
152
+
153
+ ### Infrastructure
154
+
155
+ - Hardware: 2,048 NVIDIA B300 GPUs
156
+ - Parallelism: HSDP + Expert Parallelism
157
+ - Compute partner: [Prime Intellect](https://www.primeintellect.ai/)
158
+
159
+ ## Usage
160
+
161
+ ### Running our model
162
+
163
+ - [vLLM](#vllm) (recommended for agentic deployments)
164
+ - [Transformers](#transformers)
165
+ - [API](#api)
166
+
167
+ ### vLLM
168
+
169
+ Supported in vLLM 0.11.1+. For agentic use with both reasoning and tool calling:
170
+
171
+ vllm serve arcee-ai/Trinity-Large-Thinking \
172
+ --dtype bfloat16 \
173
+ --enable-reasoning \
174
+ --reasoning-parser deepseek_r1 \
175
+ --enable-auto-tool-choice \
176
+ --tool-call-parser qwen3_coder
177
+
178
+ This configuration:
179
+ - `--reasoning-parser deepseek_r1` — Parses `<think>...</think>` reasoning blocks and exposes them via the `reasoning_content` field in the API response
180
+ - `--tool-call-parser qwen3_coder` — Parses structured tool calls from the model output into the OpenAI-compatible `tool_calls` array
181
+
182
+ **Extracting reasoning content from the API response:**
183
+
184
+ ```python
185
+ from openai import OpenAI
186
+
187
+ client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")
188
+
189
+ response = client.chat.completions.create(
190
+ model="arcee-ai/Trinity-Large-Thinking",
191
+ messages=[
192
+ {"role": "user", "content": "What's the weather like in Paris?"}
193
+ ],
194
+ tools=[ # your tool definitions here
195
+ {
196
+ "type": "function",
197
+ "function": {
198
+ "name": "get_weather",
199
+ "description": "Get current weather for a location",
200
+ "parameters": {
201
+ "type": "object",
202
+ "properties": {
203
+ "location": {"type": "string"}
204
+ },
205
+ "required": ["location"]
206
+ }
207
+ }
208
+ }
209
+ ],
210
+ )
211
+
212
+ # Access reasoning (thinking) content
213
+ reasoning = response.choices[0].message.reasoning_content
214
+
215
+ # Access final response or tool calls
216
+ content = response.choices[0].message.content
217
+ tool_calls = response.choices[0].message.tool_calls
218
+ ```
219
+
220
+ **Note on thinking-in-context with vLLM**: When building multi-turn agentic loops, include both `reasoning_content` and `content` in the conversation history you send back to the model. The reasoning content should be re-wrapped in `<think>...</think>` tags within the assistant message.
221
+
222
+ ### Transformers
223
+
224
+ Use the `main` transformers branch or pass `trust_remote_code=True` with a released version.
225
+
226
+ ```python
227
+ from transformers import AutoTokenizer, AutoModelForCausalLM
228
+ import torch
229
+
230
+ model_id = "arcee-ai/Trinity-Large-Thinking"
231
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
232
+ model = AutoModelForCausalLM.from_pretrained(
233
+ model_id,
234
+ torch_dtype=torch.bfloat16,
235
+ device_map="auto",
236
+ trust_remote_code=True
237
+ )
238
+
239
+ messages = [
240
+ {"role": "user", "content": "Who are you?"},
241
+ ]
242
+
243
+ input_ids = tokenizer.apply_chat_template(
244
+ messages,
245
+ add_generation_prompt=True,
246
+ return_tensors="pt"
247
+ ).to(model.device)
248
+
249
+ outputs = model.generate(
250
+ input_ids,
251
+ max_new_tokens=4096,
252
+ do_sample=True,
253
+ temperature=0.6,
254
+ top_k=50,
255
+ top_p=0.95
256
+ )
257
+
258
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
259
+ print(response)
260
+ ```
261
+
262
+ ### API
263
+
264
+ Available on OpenRouter:
265
+
266
+ curl -X POST "https://openrouter.ai/v1/chat/completions" \
267
+ -H "Authorization: Bearer $OPENROUTER_API_KEY" \
268
+ -H "Content-Type: application/json" \
269
+ -d '{
270
+ "model": "arcee-ai/trinity-large-thinking",
271
+ "messages": [
272
+ {
273
+ "role": "user",
274
+ "content": "What are some fun things to do in New York?"
275
+ }
276
+ ]
277
+ }'
278
+
279
+ ## Agentic Use Cases
280
+
281
+ Trinity-Large-Thinking is optimized for deployment as the reasoning backbone of AI agent systems. It has been evaluated and performs excellently with:
282
+
283
+ ### OpenClaw
284
+
285
+ Trinity-Large-Thinking works as a drop-in brain for OpenClaw agents. Its native tool-calling format is compatible with OpenClaw's execution loop, and the extended reasoning enables reliable multi-step task completion — from email triage to code generation to meeting scheduling. Our 91.9% PinchBench score reflects real-world OpenClaw task performance.
286
+
287
+ ### Hermes Agent
288
+
289
+ Compatible with the Hermes Agent framework from Nous Research. Trinity-Large-Thinking's reasoning traces pair naturally with Hermes's skill-learning loop — the model's explicit chain-of-thought makes skill extraction more reliable, and its strong tool-calling capabilities integrate directly via the Hermes tool-use protocol.
290
+
291
+ ### Custom Agent Loops
292
+
293
+ For custom implementations, the key integration pattern is:
294
+
295
+ 1. Send the user message with tool definitions
296
+ 2. Receive the response with `<think>` reasoning + tool calls
297
+ 3. Execute the tool calls
298
+ 4. Append the **full** assistant response (thinking + content + tool calls) and tool results to the message history
299
+ 5. Send the updated history back for the next step
300
+ 6. Repeat until the model produces a final response without tool calls
301
+
302
+ ## License
303
+
304
+ Trinity-Large-Thinking is released under the Apache License, Version 2.0.
305
+
306
+ ## Citation
307
+
308
+ If you use this model, please cite:
309
+
310
+ @misc{singh2026arceetrinity,
311
+ title = {Arcee Trinity Large Technical Report},
312
+ author = {Varun Singh and Lucas Krauss and Sami Jaghouar and Matej Sirovatka and Charles Goddard and Fares Obied and Jack Min Ong and Jannik Straube and Fern and Aria Harley and Conner Stewart and Colin Kealty and Maziyar Panahi and Simon Kirsten and Anushka Deshpande and Anneketh Vij and Arthur Bresnu and Pranav Veldurthi and Raghav Ravishankar and Hardik Bishnoi and DatologyAI Team and Arcee AI Team and Prime Intellect Team and Mark McQuade and Johannes Hagemann and Lucas Atkins},
313
+ year = {2026},
314
+ eprint = {2602.17004},
315
+ archivePrefix= {arXiv},
316
+ primaryClass = {cs.LG},
317
+ doi = {10.48550/arXiv.2602.17004},
318
+ url = {https://arxiv.org/abs/2602.17004}
319
+ }