Update README.md
Browse files
README.md
CHANGED
|
@@ -9,7 +9,6 @@ tags:
|
|
| 9 |
- vllm
|
| 10 |
- fp8
|
| 11 |
- moe
|
| 12 |
-
license: apache-2.0
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
|
@@ -27,19 +26,18 @@ pipeline_tag: text-generation
|
|
| 27 |
|
| 28 |
# Laguna M.1
|
| 29 |
|
| 30 |
-
Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated parameters per token designed for agentic coding and long-horizon work. This release
|
| 31 |
|
| 32 |
> [!NOTE]
|
| 33 |
> For more details on how we trained this model, including our Model Factory approach, post-training recipe, async off-policy agent RL, and evaluations, check out our [release blog post](https://poolside.ai/blog/laguna-a-deeper-dive) and [technical report](https://poolside.ai/assets/laguna/laguna-m1-xs2-technical-report.pdf).
|
| 34 |
|
| 35 |
## Highlights
|
| 36 |
|
| 37 |
-
* **Large sparse MoE for agentic coding**: Laguna M.1 is a 70-layer MoE transformer with
|
| 38 |
* **High-capacity expert routing**: After 3 dense SwiGLU layers, Laguna M.1 uses 67 sparse MoE layers with 256 experts, top-k=16 routing and auxiliary-loss-free load balancing
|
| 39 |
* **Global attention architecture**: Laguna M.1 uses global attention across all layers with 64 Q-heads, 8 KV-heads and softplus attention output gating
|
| 40 |
* **Native reasoning support**: Interleaved thinking between tool calls with support for enabling and disabling thinking per-request
|
| 41 |
-
* **Strong agentic benchmark performance**: Laguna M.1 is competitive with state-of-the-art open-weight and frontier models on SWE-bench Verified, SWE-bench Multilingual, SWE-Bench Pro
|
| 42 |
-
* **Apache 2.0 license**: Use and modify freely for commercial and non-commercial purposes
|
| 43 |
|
| 44 |
---
|
| 45 |
|
|
@@ -63,9 +61,9 @@ Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated
|
|
| 63 |
<img alt="benchmarks" src="https://poolside.ai/assets/laguna/laguna-m1-chart.svg" width="800px">
|
| 64 |
</p>
|
| 65 |
|
| 66 |
-
| Model |
|
| 67 |
|---------------------------|----------------------|--------------------|------------------------|--------------------------------|--------------------|
|
| 68 |
-
| **Laguna M.1** | 225B
|
| 69 |
| Devstral 2 | 123B dense | 72.2% | 61.3% | - | 32.6% |
|
| 70 |
| GLM-4.7 | 355B-A32B | 73.8% | 66.7% | - | 41.0% |
|
| 71 |
| DeepSeek-V4 Flash | 284B-A13B | 79.0% | 73.3% | 52.6% | 56.9% |
|
|
@@ -74,28 +72,19 @@ Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated
|
|
| 74 |
|
| 75 |
*We used the highest publicly-referenced scores for all comparison models across each benchmark. In almost all cases these were official scores published in release blog posts or equivalent, with Claude Sonnet 4.6 shown as a frontier proprietary reference of comparable model size. “-” indicates a score not reported by the model provider.*
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
- SWE-
|
| 85 |
-
-
|
| 86 |
-
- SWE-Bench Pro: mean pass@1 averaged over 4 runs
|
| 87 |
-
- Terminal-Bench 2.0: mean pass@1 averaged over 4 runs; 48 GB RAM/32 CPUs
|
| 88 |
-
|
| 89 |
-
</details>
|
| 90 |
|
| 91 |
## Usage
|
| 92 |
|
| 93 |
-
Laguna M.1 is available through the Poolside API
|
| 94 |
-
|
| 95 |
-
The fastest way to get started is with our API, directly or using OpenRouter.
|
| 96 |
-
|
| 97 |
-
> [!NOTE]
|
| 98 |
-
> We are providing free access for a limited time to Laguna M.1 and Laguna XS.2 on our API. You can create an API key on our [Platform](https://platform.poolside.ai).
|
| 99 |
|
| 100 |
### pool
|
| 101 |
|
|
@@ -123,9 +112,7 @@ pool acp setup --editor zed|jetbrains
|
|
| 123 |
|
| 124 |
Submit feedback with `/feedback` and read the [full documentation on GitHub](https://github.com/poolsideai/pool).
|
| 125 |
|
| 126 |
-
###
|
| 127 |
-
|
| 128 |
-
Laguna M.1 is supported in vLLM and Transformers, and TRT-LLM thanks to the support of the team at NVIDIA.
|
| 129 |
|
| 130 |
#### vLLM
|
| 131 |
|
|
@@ -148,78 +135,10 @@ vllm serve \
|
|
| 148 |
|
| 149 |
See the [vLLM recipes page](https://recipes.vllm.ai/poolside/Laguna-XS.2) for our Laguna XS.2 model with which the implementation is shared for additional deployment guidance.
|
| 150 |
|
| 151 |
-
#### Transformers
|
| 152 |
-
|
| 153 |
-
Laguna M.1 is supported in Transformers.
|
| 154 |
-
|
| 155 |
-
```python
|
| 156 |
-
import torch
|
| 157 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 158 |
-
|
| 159 |
-
model_id = "poolside/Laguna-M.1"
|
| 160 |
-
|
| 161 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 162 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 163 |
-
model_id,
|
| 164 |
-
dtype=torch.bfloat16,
|
| 165 |
-
device_map="auto",
|
| 166 |
-
)
|
| 167 |
-
|
| 168 |
-
messages = [
|
| 169 |
-
{"role": "user", "content": "Write a Python retry wrapper with exponential backoff."},
|
| 170 |
-
]
|
| 171 |
-
|
| 172 |
-
# Reasoning is on by default; pass enable_thinking=False to skip the <think> block.
|
| 173 |
-
inputs = tokenizer.apply_chat_template(
|
| 174 |
-
messages,
|
| 175 |
-
add_generation_prompt=True,
|
| 176 |
-
return_tensors="pt",
|
| 177 |
-
enable_thinking=True,
|
| 178 |
-
).to(model.device)
|
| 179 |
-
|
| 180 |
-
outputs = model.generate(
|
| 181 |
-
inputs,
|
| 182 |
-
max_new_tokens=1024,
|
| 183 |
-
do_sample=True,
|
| 184 |
-
temperature=1,
|
| 185 |
-
top_k=20,
|
| 186 |
-
)
|
| 187 |
-
|
| 188 |
-
response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
|
| 189 |
-
print(response)
|
| 190 |
-
```
|
| 191 |
-
|
| 192 |
-
#### TRT-LLM
|
| 193 |
-
|
| 194 |
-
Laguna M.1 is supported in TRT-LLM thanks to the support of the team at NVIDIA.
|
| 195 |
-
|
| 196 |
-
```python
|
| 197 |
-
from tensorrt_llm import LLM, SamplingParams
|
| 198 |
-
|
| 199 |
-
llm = LLM(
|
| 200 |
-
model="poolside/Laguna-M.1",
|
| 201 |
-
trust_remote_code=True,
|
| 202 |
-
tensor_parallel_size=4,
|
| 203 |
-
)
|
| 204 |
-
|
| 205 |
-
sampling = SamplingParams(max_tokens=1024, temperature=1, top_k=20)
|
| 206 |
-
out = llm.generate(["Write a Python retry wrapper with exponential backoff."], sampling)
|
| 207 |
-
print(out[0].outputs[0].text)
|
| 208 |
-
```
|
| 209 |
-
|
| 210 |
-
Or serve with an OpenAI-compatible endpoint:
|
| 211 |
-
|
| 212 |
-
```shell
|
| 213 |
-
trtllm-serve poolside/Laguna-M.1 --port 8000 --trust-remote-code
|
| 214 |
-
```
|
| 215 |
-
|
| 216 |
## Controlling reasoning
|
| 217 |
|
| 218 |
Laguna M.1 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.
|
| 219 |
|
| 220 |
-
<details>
|
| 221 |
-
<summary>Expand for example</summary>
|
| 222 |
-
|
| 223 |
```python
|
| 224 |
import json
|
| 225 |
from openai import OpenAI
|
|
@@ -301,15 +220,10 @@ for chunk in response:
|
|
| 301 |
print(f"Reasoning: {reasoning}\nContent: {content}")
|
| 302 |
```
|
| 303 |
|
| 304 |
-
</details>
|
| 305 |
-
|
| 306 |
### Disabling reasoning
|
| 307 |
|
| 308 |
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.
|
| 309 |
|
| 310 |
-
<details>
|
| 311 |
-
<summary>Expand for example</summary>
|
| 312 |
-
|
| 313 |
```python
|
| 314 |
from openai import OpenAI
|
| 315 |
client = OpenAI()
|
|
@@ -329,16 +243,10 @@ for chunk in completion:
|
|
| 329 |
print(chunk.choices[0].delta)
|
| 330 |
```
|
| 331 |
|
| 332 |
-
</details>
|
| 333 |
-
|
| 334 |
For agentic coding use cases, we recommend enabling thinking and preserving reasoning in message history as outlined in the [Controlling reasoning](#controlling-reasoning) section.
|
| 335 |
|
| 336 |
-
## License
|
| 337 |
-
|
| 338 |
-
This model is licensed under the [Apache 2.0 License](https://huggingface.co/poolside/Laguna-M.1/blob/main/LICENSE.md).
|
| 339 |
-
|
| 340 |
## Intended and Responsible Use
|
| 341 |
|
| 342 |
-
Laguna M.1 is designed for software engineering and agentic coding use cases, and you are responsible for confirming that it is appropriate for your intended application.
|
| 343 |
|
| 344 |
Please report security vulnerabilities or safety concerns to [security@poolside.ai](mailto:security@poolside.ai).
|
|
|
|
| 9 |
- vllm
|
| 10 |
- fp8
|
| 11 |
- moe
|
|
|
|
| 12 |
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
|
|
|
| 26 |
|
| 27 |
# Laguna M.1
|
| 28 |
|
| 29 |
+
Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated parameters per token designed for agentic coding and long-horizon work. This release has upstream support in vLLM and is part of stable releases from version v0.21.0.
|
| 30 |
|
| 31 |
> [!NOTE]
|
| 32 |
> For more details on how we trained this model, including our Model Factory approach, post-training recipe, async off-policy agent RL, and evaluations, check out our [release blog post](https://poolside.ai/blog/laguna-a-deeper-dive) and [technical report](https://poolside.ai/assets/laguna/laguna-m1-xs2-technical-report.pdf).
|
| 33 |
|
| 34 |
## Highlights
|
| 35 |
|
| 36 |
+
* **Large sparse MoE for agentic coding**: Laguna M.1 is a 70-layer MoE transformer with 225B total parameters and 23B activated parameters per token
|
| 37 |
* **High-capacity expert routing**: After 3 dense SwiGLU layers, Laguna M.1 uses 67 sparse MoE layers with 256 experts, top-k=16 routing and auxiliary-loss-free load balancing
|
| 38 |
* **Global attention architecture**: Laguna M.1 uses global attention across all layers with 64 Q-heads, 8 KV-heads and softplus attention output gating
|
| 39 |
* **Native reasoning support**: Interleaved thinking between tool calls with support for enabling and disabling thinking per-request
|
| 40 |
+
* **Strong agentic benchmark performance**: Laguna M.1 is competitive with state-of-the-art open-weight and frontier models on SWE-bench Verified, SWE-bench Multilingual, SWE-Bench Pro and Terminal-Bench 2.0
|
|
|
|
| 41 |
|
| 42 |
---
|
| 43 |
|
|
|
|
| 61 |
<img alt="benchmarks" src="https://poolside.ai/assets/laguna/laguna-m1-chart.svg" width="800px">
|
| 62 |
</p>
|
| 63 |
|
| 64 |
+
| Model | Parameters | SWE-bench Verified | SWE-bench Multilingual | SWE-bench Pro (Public Dataset) | Terminal-Bench 2.0 |
|
| 65 |
|---------------------------|----------------------|--------------------|------------------------|--------------------------------|--------------------|
|
| 66 |
+
| **Laguna M.1** | 225B-A23B | 74.6% | 63.1% | 49.2% | 45.8% |
|
| 67 |
| Devstral 2 | 123B dense | 72.2% | 61.3% | - | 32.6% |
|
| 68 |
| GLM-4.7 | 355B-A32B | 73.8% | 66.7% | - | 41.0% |
|
| 69 |
| DeepSeek-V4 Flash | 284B-A13B | 79.0% | 73.3% | 52.6% | 56.9% |
|
|
|
|
| 72 |
|
| 73 |
*We used the highest publicly-referenced scores for all comparison models across each benchmark. In almost all cases these were official scores published in release blog posts or equivalent, with Claude Sonnet 4.6 shown as a frontier proprietary reference of comparable model size. “-” indicates a score not reported by the model provider.*
|
| 74 |
|
| 75 |
+
> [!NOTE]
|
| 76 |
+
> All benchmarking for Laguna M.1 was completed using our [pool agent harness](https://github.com/poolsideai/pool), with a maximum of 500 steps and sandboxed execution. The same sampling parameters were used for all Laguna M.1 benchmarking: temperature=1.0 and top_k=20, with thinking mode enabled and a context length of 256K tokens. All tasks were run in their own sandbox using 8 GB RAM/2 CPUs, with the exception of Terminal-Bench 2.0, which used 48 GB RAM/32 CPUs.
|
| 77 |
+
>
|
| 78 |
+
> Some base task images and verifiers were patched to fix infrastructure reliability issues inherent in task setup, such as rate limits on third-party dependencies in external registries used by the verifier. All four agentic benchmarks were run with patched images. We also ran a reward-hack judge post-hoc on Laguna M.1 evaluation runs and did not find significant reward hacking after joint judge review and manual review.
|
| 79 |
+
>
|
| 80 |
+
> - SWE-bench Verified: mean pass@1 averaged over 4 runs
|
| 81 |
+
> - SWE-bench Multilingual: mean pass@1 averaged over 4 runs
|
| 82 |
+
> - SWE-Bench Pro: mean pass@1 averaged over 4 runs
|
| 83 |
+
> - Terminal-Bench 2.0: mean pass@1 averaged over 4 runs; 48 GB RAM/32 CPUs
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
## Usage
|
| 86 |
|
| 87 |
+
Laguna M.1 is available through the Poolside API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
### pool
|
| 90 |
|
|
|
|
| 112 |
|
| 113 |
Submit feedback with `/feedback` and read the [full documentation on GitHub](https://github.com/poolsideai/pool).
|
| 114 |
|
| 115 |
+
### Deployment
|
|
|
|
|
|
|
| 116 |
|
| 117 |
#### vLLM
|
| 118 |
|
|
|
|
| 135 |
|
| 136 |
See the [vLLM recipes page](https://recipes.vllm.ai/poolside/Laguna-XS.2) for our Laguna XS.2 model with which the implementation is shared for additional deployment guidance.
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
## Controlling reasoning
|
| 139 |
|
| 140 |
Laguna M.1 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.
|
| 141 |
|
|
|
|
|
|
|
|
|
|
| 142 |
```python
|
| 143 |
import json
|
| 144 |
from openai import OpenAI
|
|
|
|
| 220 |
print(f"Reasoning: {reasoning}\nContent: {content}")
|
| 221 |
```
|
| 222 |
|
|
|
|
|
|
|
| 223 |
### Disabling reasoning
|
| 224 |
|
| 225 |
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.
|
| 226 |
|
|
|
|
|
|
|
|
|
|
| 227 |
```python
|
| 228 |
from openai import OpenAI
|
| 229 |
client = OpenAI()
|
|
|
|
| 243 |
print(chunk.choices[0].delta)
|
| 244 |
```
|
| 245 |
|
|
|
|
|
|
|
| 246 |
For agentic coding use cases, we recommend enabling thinking and preserving reasoning in message history as outlined in the [Controlling reasoning](#controlling-reasoning) section.
|
| 247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
## Intended and Responsible Use
|
| 249 |
|
| 250 |
+
Laguna M.1 is designed for software engineering and agentic coding use cases, and you are responsible for confirming that it is appropriate for your intended application. We advise against circumventing Laguna M.1 safety guardrails without implementing substantially equivalent mitigations appropriate for your use case.
|
| 251 |
|
| 252 |
Please report security vulnerabilities or safety concerns to [security@poolside.ai](mailto:security@poolside.ai).
|