Views
No views yet
[!NOTE] For more details on how we train, including on data automixing and async off-policy agent RL, check out our recent technical report.
[!NOTE] Laguna XS 2.1 is released under OpenMDW-1.1, a fully permissive license. Use it, modify it, and build commercial products on it. No permission required. If you want more than the weights: production support, latency and cost optimization, or output indemnification, talk to us.
| Model | Size (total params.) | SWE-bench Verified | SWE-bench Multilingual | SWE-Bench Pro (Public Dataset) | Terminal-Bench 2.0 |
|---|---|---|---|---|---|
| Laguna XS 2.1 | 33B | 70.9% | 63.1% | 47.6% | 37.5% |
| Laguna XS.2 | 33B | 69.9% | 57.7% | 46.3% | 35.7% |
| Qwen3.6-35B-A3B | 35B | 73.4% | 67.2% | 49.5% | 51.5% |
| North Mini Code | 30B | 67.6% | - | 40.2% | 36.0% |
| MAI-Code-1-Flash | 137B | 71.6% | 65.5% | 51.2% | 54.8% |
| gpt-oss-120B | 120B | - | - | 16.2% | 18.7% |
| Claude Haiku 4.5 | - | 73.3% | - | 39.5% | 29.8% |
| GPT-5.4 Nano | - | - | - | 52.4% | 46.3% |
[!NOTE] We are providing free inference for a limited time for Laguna XS 2.1, as well as our larger 225B model, Laguna M.1. Visit our provider page on OpenRouter to get started.
curl -fsSL https://downloads.poolside.ai/pool/install.sh | bash> Log in with Poolside to get a free, limited-use API key.> Log in with OpenRouter.pool loginpool acp setup --editor zed|jetbrains1ollama pull laguna-xs-2.1
2ollama launch pool --model laguna-xs-2.1/feedback and read the full documentation on GitHub.[!NOTE] Laguna XS 2.1 support is available in vLLM 0.21.0 and later (vllm-project/vllm#41129).
[!IMPORTANT] Use a vLLM build that includes vllm-project/vllm#47311. Without that fix, thepoolside_v1tool parser silently drops Laguna XS 2.1 tool calls that have no newline after the function name, and the raw tool-call markup leaks into the response. On an older build, pass--tool-call-parser glm47(the GLM 4.7 parser) instead.
1pip install 'vllm>=0.21.0'
2
3vllm serve \
4 --model poolside/Laguna-XS-2.1 \
5 --tool-call-parser poolside_v1 \
6 --reasoning-parser poolside_v1 \
7 --enable-auto-tool-choice \
8 --served-model-name laguna \
9 --default-chat-template-kwargs '{"enable_thinking": true}'[!NOTE] Optional: speculative decoding with DFlash. For lower latency, pair Laguna XS 2.1 with the DFlash speculator, a 5-layer Llama-style draft model that proposes up to 7 tokens per step at ~70% per-position acceptance on coding tasks. vLLM support is in progress in vllm-project/vllm#46853; once it lands, add--speculative-config '{"model":"poolside/Laguna-XS-2.1-DFlash","num_speculative_tokens":7,"method":"dflash"}'to the serve command above.
1git clone https://github.com/sgl-project/sglang.git
2cd sglang
3pip install -e "python[all]"
4
5python -m sglang.launch_server \
6 --model-path poolside/Laguna-XS-2.1 \
7 --tp-size 8 \
8 --mem-fraction-static 0.7 \
9 --reasoning-parser poolside_v1 \
10 --trust-remote-code[!NOTE] Optional: speculative decoding with DFlash. The DFlash speculator can be paired with Laguna XS 2.1 for lower latency. SGLang support was added in sgl-project/sglang#29446. Add--speculative-algorithm DFLASH \ --speculative-draft-model-path poolside/Laguna-XS-2.1-DFlash-FP8to the serve command above.
v5.7.0 and later (huggingface/transformers#45673).1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "poolside/Laguna-XS-2.1"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "user", "content": "Write a Python retry wrapper with exponential backoff."},
15]
16
17# Reasoning is on by default; pass enable_thinking=False to skip the <think> block.
18inputs = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt",
22 enable_thinking=True,
23).to(model.device)
24
25outputs = model.generate(
26 inputs,
27 max_new_tokens=1024,
28 do_sample=True,
29 temperature=1.0,
30 top_k=20,
31)
32
33response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
34print(response)v1.3.0rc16 pre-release wheels and later.[!NOTE] A stablev1.3.0has not been released yet, so install a pre-release wheel from NVIDIA's package index (the latest stable,v1.2.x, does not include Laguna XS 2.1 support). To build from source instead, see the TensorRT-LLM build documentation. Laguna XS 2.1 support is onmain.
torch build first, then TensorRT-LLM. The default PyPI torch is a CUDA-12 build whose cuda-bindings pin conflicts with TRT-LLM's cuda-python 13.x, so a bare pip install tensorrt-llm fails to resolve; installing the cu130 torch up front avoids it.1# 1. CUDA-13 torch build (pins cuda-bindings 13.x, matching TRT-LLM's cuda-python)
2pip install 'torch==2.10.0' torchvision --index-url https://download.pytorch.org/whl/cu130
3
4# 2. TRT-LLM from NVIDIA's index (torch already satisfied, so it is not replaced)
5pip install --pre 'tensorrt-llm>=1.3.0rc16' \
6 --extra-index-url https://pypi.nvidia.com \
7 --extra-index-url https://download.pytorch.org/whl/cu130tensorrt-llm 1.3.0rc20 with torch 2.10.0+cu130, cuda-python 13.0.3, and transformers 5.5.4.trust_remote_code=True. No transformers compatibility overlay is required: v1.3.0rc16+ pins transformers 5.5.4, which provides the symbols Laguna XS 2.1's config needs (earlier TRT-LLM releases pinned transformers 4.57, which did not).1from tensorrt_llm import LLM, SamplingParams
2
3llm = LLM(
4 model="poolside/Laguna-XS-2.1",
5 trust_remote_code=True,
6 tensor_parallel_size=1,
7)
8
9sampling = SamplingParams(max_tokens=1024, temperature=1.0, top_k=20)
10out = llm.generate(["Write a Python retry wrapper with exponential backoff."], sampling)
11print(out[0].outputs[0].text)trtllm-serve poolside/Laguna-XS-2.1 --port 8000 --trust-remote-code --tool_parser poolside_v1 --reasoning_parser laguna>=1.3.0rc16 (shipped with #13559), so no extra install is needed. Note that the flag names differ from vLLM's (--tool_parser, and the reasoning parser is laguna, not poolside_v1).quantization_config, no extra flags required.[!NOTE] Optional: speculative decoding with DFlash. The DFlash speculator can be paired with Laguna XS 2.1 for lower latency. TRT-LLM support is in progress in NVIDIA/TensorRT-LLM#15666.
[!NOTE] Requires building llama.cpp from the upstream PR that adds Laguna XS 2.1 support until it lands (ggml-org/llama.cpp#25165).
1# Build llama.cpp from the PR branch
2git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
3git fetch origin pull/25165/head:laguna && git checkout laguna
4cmake -B build && cmake --build build -j
5
6# Download a GGUF and serve an OpenAI-compatible endpoint
7huggingface-cli download poolside/Laguna-XS-2.1-GGUF Laguna-XS-2.1-Q4_K_M.gguf --local-dir ~/models/Laguna-XS-2.1-GGUF
8./build/bin/llama-server -m ~/models/Laguna-XS-2.1-GGUF/Laguna-XS-2.1-Q4_K_M.gguf --jinja --port 8000ollama run laguna-xs-2.1 # default — Q4_K_M (imatrix)
ollama run laguna-xs-2.1:q8_0 # higher precision
ollama run laguna-xs-2.1:bf16 # full precisionlaguna template.[!NOTE] macOS (Metal) users:ollama runmay currently return empty output on Apple Silicon (a Metal f16 overflow in the MoE down-projection; fix pending in ggml-org/llama.cpp#25389). Until it ships, use a Linux/CUDA host or the/api/generateendpoint with"raw": true.
reasoning content from prior assistant messages is preserved in the message history. This model will generally reason before calling tools and between tool calls.1import json
2from openai import OpenAI
3
4client = OpenAI(
5 base_url="https://openrouter.ai/api/v1",
6 api_key="...",
7)
8
9model = "poolside/laguna-xs-2.1"
10
11tools = [{"type": "function", "function": {
12 "name": "shell",
13 "description": "Execute a bash command and return the output.",
14 "parameters": {"type": "object", "properties": {"cmd": {"type": "string"}}, "required": ["cmd"]},
15}}]
16
17messages = [
18 {"role": "system", "content": "You are a coding agent with access to a shell tool."},
19 {"role": "user", "content": "Run uname -a"},
20]
21
22# Thinking is enabled by default when the server sets --default-chat-template-kwargs {"enable_thinking": True}
23# When using OpenRouter's Chat API (https://openrouter.ai/api/v1), this flag is set by default
24response = client.chat.completions.create(
25 model=model,
26 messages=messages,
27 tools=tools,
28 stream=True,
29)
30
31reasoning, content, tool_calls = "", "", []
32for chunk in response:
33 delta = chunk.choices[0].delta
34 if hasattr(delta, "reasoning_content") and delta.reasoning_content:
35 reasoning += delta.reasoning_content
36 if hasattr(delta, "content") and delta.content:
37 content += delta.content
38 if hasattr(delta, "tool_calls") and delta.tool_calls:
39 for tc in delta.tool_calls:
40 if tc.index >= len(tool_calls):
41 tool_calls.append({"id": tc.id, "function": {"name": "", "arguments": ""}})
42 if tc.function.name:
43 tool_calls[tc.index]["function"]["name"] = tc.function.name
44 if tc.function.arguments:
45 tool_calls[tc.index]["function"]["arguments"] += tc.function.arguments
46
47print(f"Reasoning: {reasoning}\nContent: {content}\nTool calls: {tool_calls}\n")
48
49# Return reasoning in the next request for best performance
50messages.append({
51 "role": "assistant",
52 "content": content,
53 "reasoning_content": reasoning,
54 "tool_calls": [{"id": tc["id"], "type": "function", "function": tc["function"]} for tc in tool_calls]
55})
56
57messages.append({
58 "role": "tool",
59 "tool_call_id": tool_calls[0]["id"],
60 "content": json.dumps({"stdout": "Darwin arm64", "exit_code": "0"})
61})
62
63response = client.chat.completions.create(
64 model=model,
65 messages=messages,
66 tools=tools,
67 stream=True,
68)
69
70reasoning, content = "", ""
71for chunk in response:
72 delta = chunk.choices[0].delta
73 if hasattr(delta, "reasoning_content") and delta.reasoning_content:
74 reasoning += delta.reasoning_content
75 if hasattr(delta, "content") and delta.content:
76 content += delta.content
77
78print(f"Reasoning: {reasoning}\nContent: {content}")enable_thinking to False in a request or by not providing --default-chat-template-kwargs {"enable_thinking": True} or equivalent when starting the server.1from openai import OpenAI
2client = OpenAI()
3
4completion = client.chat.completions.create(
5 model="poolside/laguna-xs-2.1",
6 messages=[
7 {"role": "user", "content": "Write a retry wrapper with exponential backoff."}
8 ],
9 extra_body={
10 "chat_template_kwargs": { "enable_thinking": False },
11 },
12 stream=True
13)
14
15for chunk in completion:
16 print(chunk.choices[0].delta)