joerowell commited on
Commit
8048f76
·
verified ·
1 Parent(s): 76de427

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +230 -3
README.md CHANGED
@@ -1,3 +1,230 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: vllm
4
+ inference: false
5
+ extra_gated_description: >-
6
+ To learn more about how we process your personal data, please read our <a
7
+ href="https://poolside.ai/privacy">Privacy Policy</a>.
8
+ tags:
9
+ - laguna-xs.2
10
+ ---
11
+
12
+ # Laguna XS.2
13
+ Laguna XS.2 is a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token designed for agentic coding and long-horizon work on a local machine. It uses Sliding Window Attention with per-head gating in 30 out of 40 layers for fast inference and low KV cache requirements.
14
+
15
+ This is the instruct model with native reasoning support and interleaved thinking. For the base model, see [Laguna XS.2-base](https://huggingface.co/poolside/Laguna-XS.2-base).
16
+
17
+ For more details on how we trained this model, including on data automixing and async off-policy agent RL, check out our [release blog post]().
18
+
19
+ ## Key features
20
+ - **Mixed SWA and global attention layout**: Laguna XS.2 uses sigmoid gating with per-layer rotary scales, enabling mixed SWA (Sliding Window Attention) and global attention layers in a 3:1 ratio (across 40 total layers)
21
+ - **KV cache in FP8**: All quantization formats use a KV cache quantized to FP8, reducing memory per token.
22
+ - **Native reasoning support**: Interleaved thinking enabled by default
23
+ - **Local-ready**: At 33B total parameters and 3B activated, Laguna XS.2 is compact enough to run on a Mac with 36 GB of RAM. [Available on Ollama](https://ollama.com/library/laguna-xs.2)
24
+ - **Apache 2.0 license**: Use and modify freely for commerical and non-commercial purposes
25
+
26
+ ## Model overview
27
+
28
+ - Training: pre-training, post-training and reinforcement learning stages (instruct)
29
+ - Number of parameters: 33B total with 3B activated per token
30
+ - Optimizer: Muon
31
+ - Layers: 40 layers (10 layers with global attention, 30 layers with sliding window attention)
32
+ - Experts: 256 experts with 1 shared expert
33
+ - Sliding Window: 512 tokens
34
+ - Modality: text-to-text
35
+ - Context window: 131,072 tokens
36
+ - Reasoning support: thinking default enabled; interleaved thinking with preserved thinking supported
37
+
38
+ ## Benchmark results (VR)
39
+
40
+ We evaluate Laguna XS.2 with thinking enabled in our agent harness, pool (see the Usage section below to download and run locally), across all benchmarks. For other models, we use the best available publicly-reported score; if not available, we calculate baselines using OpenHands (SWE-bench family) or Terminus 2 (Terminal-Bench 2.0) using the settings below.
41
+
42
+ | Model | Size (total params.) | SWE-bench Pro | SWE-bench Verified | SWE-bench Multilingual | Terminal-Bench 2.0 |
43
+ |---------------------------|----------------------|---------------|--------------------|------------------------|--------------------|
44
+ | **Laguna XS.2** | 33B | xx.x% | xx.x% | xx.x% | xx.x% |
45
+ | Nemotron 3 Nano | 30B | xx.x% | xx.x% | xx.x% | xx.x% |
46
+ | Devstral Small 2 | 24B dense | - | 68.0% | 55.7% | 22.5% |
47
+ | Gemma 4 26B A4B IT | 26B | xx.x% | xx.x% | xx.x% | xx.x% |
48
+ | Gemma 4 31B IT | 31B dense | xx.x% | xx.x% | xx.x% | xx.x% |
49
+ | Qwen3.6-35B-A3B | 35B | 49.5% | 73.4% | 67.2% | 51.5% |
50
+ | Qwen3.6-27B | 27B dense | 53.2% | 77.2% | 71.3% | 59.3% |
51
+ | GPT-5.4 Nano | - | 52.4% | - | - | 46.3% |
52
+
53
+ \* SWE-bench series: [our configuration; any fixes applied, etc., avg. of k] Nemotron 3 Nano and Gemma 4 models evaluated in OpenHands with [configuration]. Terminal-Bench 2.0: [our configuration; any fixes applied, etc.] Nemotron 3 Nano and Gemma 4 models evaluated in Terminus 2 with [configuration].
54
+
55
+ ## Usage
56
+
57
+ Laguna XS.2 has launch-day support in vLLM and Transformers, and TRT-LLM and SGLang thanks to the support of the team at NVIDIA.
58
+
59
+ The fastest way to get started is with our API, directly or using OpenRouter, free for a limited time.
60
+
61
+ ## pool
62
+
63
+ **pool** is a lightweight terminal-based coding agent and a dual [Agent Client Protocol](https://agentclientprotocol.com/get-started) client-server.
64
+
65
+ Download and install for macOS and Linux:
66
+
67
+ ```
68
+ curl -fsSL https://downloads.poolside.ai/pool/install.sh | sh
69
+ ```
70
+
71
+ Launch and *Log in with Poolside* to get a free API key.
72
+
73
+ ```
74
+ pool
75
+ ```
76
+
77
+ [Placeholder for screenshot]
78
+
79
+ Use in any [ACP client](https://agentclientprotocol.com/get-started/clients). Configure Zed and JetBrains automatically:
80
+
81
+ ```
82
+ pool acp setup --editor zed|jetbrains
83
+ ```
84
+
85
+ Use pool with Ollama with one-command setup:
86
+
87
+ ```
88
+ ollama pull laguna.xs-2
89
+
90
+ ollama launch pool --model laguna.xs-2
91
+ ```
92
+
93
+ (requires Ollama 0.20.8 or later)
94
+
95
+ ### Feedback and issues
96
+
97
+ Submit feedback with `/feedback` and read the [full documentation on GitHub](https://github.com/poolsideai/pool).
98
+
99
+ *By downloading pool, you agree to Poolside's [End User License Agreement (EULA)](https://poolside.ai/legal/eula).*
100
+
101
+ ### Local deployment
102
+ Laguna-XS.2 is supported on vLLM, Transformers v5, TRT-LLM, Ollama & mlx-lm. We would like to thank the teams at NVIDIA, Ollama and Newya Labs.
103
+
104
+ [Device frameworks: Ollama, mlx-lm, ...]
105
+
106
+ #### vLLM (JR)
107
+
108
+
109
+
110
+ #### Transformers (JR)
111
+
112
+ [...]
113
+
114
+ #### [Other frameworks] (JR)
115
+
116
+ ## Controlling reasoning
117
+
118
+ Laguna XS.2 has native reasoning support and is designed to work best with *preserved thinking*, where `reasoning` content from prior assistant messages is preserved in the message history. This model will generally reason before calling tools and between tool calls.
119
+
120
+ ```python
121
+ import json
122
+ from openai import OpenAI
123
+
124
+ client = OpenAI(
125
+ base_url="https://inference.poolside.ai/v1",
126
+ api_key="...",
127
+ )
128
+
129
+ model = "poolside/laguna-xs.2"
130
+
131
+ tools = [{"type": "function", "function": {
132
+ "name": "shell",
133
+ "description": "Execute a bash command and return the output.",
134
+ "parameters": {"type": "object", "properties": {"cmd": {"type": "string"}}, "required": ["cmd"]},
135
+ }}]
136
+
137
+ messages = [
138
+ {"role": "system", "content": "You are a coding agent with access to a shell tool."},
139
+ {"role": "user", "content": "Run uname -a"},
140
+ ]
141
+
142
+ # Thinking is enabled by default when the server sets --default-chat-template-kwargs {"enable_thinking": True}
143
+ # When using the Poolside API (https://inference.poolside.ai/v1), this flag is set by default
144
+ response = client.chat.completions.create(
145
+ model=model,
146
+ messages=messages,
147
+ tools=tools,
148
+ stream=True,
149
+ )
150
+
151
+ reasoning, content, tool_calls = "", "", []
152
+ for chunk in response:
153
+ delta = chunk.choices[0].delta
154
+ if hasattr(delta, "reasoning") and delta.reasoning:
155
+ reasoning += delta.reasoning
156
+ if hasattr(delta, "content") and delta.content:
157
+ content += delta.content
158
+ if hasattr(delta, "tool_calls") and delta.tool_calls:
159
+ for tc in delta.tool_calls:
160
+ if tc.index >= len(tool_calls):
161
+ tool_calls.append({"id": tc.id, "function": {"name": "", "arguments": ""}})
162
+ if tc.function.name:
163
+ tool_calls[tc.index]["function"]["name"] = tc.function.name
164
+ if tc.function.arguments:
165
+ tool_calls[tc.index]["function"]["arguments"] += tc.function.arguments
166
+
167
+ print(f"Reasoning: {reasoning}\nContent: {content}\nTool calls: {tool_calls}\n")
168
+
169
+ # Return reasoning in the next request for best performance
170
+ messages.append({
171
+ "role": "assistant",
172
+ "content": content,
173
+ "reasoning": reasoning,
174
+ "tool_calls": [{"id": tc["id"], "type": "function", "function": tc["function"]} for tc in tool_calls]
175
+ })
176
+
177
+ messages.append({
178
+ "role": "tool",
179
+ "tool_call_id": tool_calls[0]["id"],
180
+ "content": json.dumps({"stdout": "Darwin arm64", "exit_code": "0"})
181
+ })
182
+
183
+ response = client.chat.completions.create(
184
+ model=model,
185
+ messages=messages,
186
+ tools=tools,
187
+ stream=True,
188
+ )
189
+
190
+ reasoning, content = "", ""
191
+ for chunk in response:
192
+ delta = chunk.choices[0].delta
193
+ if hasattr(delta, "reasoning_content") and delta.reasoning_content:
194
+ reasoning += delta.reasoning_content
195
+ if hasattr(delta, "content") and delta.content:
196
+ content += delta.content
197
+
198
+ print(f"Reasoning: {reasoning}\nContent: {content}")
199
+ ```
200
+
201
+ ### Disabling reasoning
202
+
203
+ You can disable thinking by setting `enable_thinking` to `False` in a request or by not providing `--default-chat-template-kwargs {"enable_thinking": true}` or equivalent when starting the server.
204
+
205
+ ```python
206
+ from openai import OpenAI
207
+ client = OpenAI()
208
+
209
+ completion = client.chat.completions.create(
210
+ model="poolside/laguna-xs.2",
211
+ messages=[
212
+ {"role": "user", "content": "Write a retry wrapper with exponential backoff."}
213
+ ],
214
+ extra_body={
215
+ "chat_template_kwargs": { "enable_thinking": False },
216
+ }
217
+ stream=True
218
+ )
219
+
220
+ for chunk in completion:
221
+ print(chunk.choices[0].delta)
222
+ ```
223
+
224
+ For agentic coding use cases, we recommend enabling thinking and preserving reasoning in message history as outlined in the [Controlling reasoning] section.
225
+
226
+ ## License
227
+
228
+ This model is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.txt).
229
+
230
+ [TBC: You must not use this model in a manner that infringes, misappropriates, or otherwise violates any third party’s rights, including intellectual property rights.]