{
  "hf_id": "poolside/Laguna-XS.2",
  "meta": {
    "title": "Laguna XS.2",
    "slug": "laguna-xs.2",
    "provider": "Poolside",
    "description": "Poolside's 33B total / 3B activated MoE coding model with mixed sliding-window + global attention, native interleaved reasoning, and 256K context — designed for agentic coding.",
    "date_added": "2026-04-28",
    "date_updated": "2026-04-29",
    "tasks": [
      "text"
    ],
    "performance_headline": "33B/3B-A MoE for agentic coding with interleaved thinking and tool use",
    "related_recipes": [],
    "hardware": {
      "h200": "verified",
      "mi300x": "verified",
      "mi325x": "verified",
      "mi355x": "verified"
    }
  },
  "recommended_command": {
    "hardware": "h200",
    "strategy": "single_node_tp",
    "variant": "default",
    "node_count": 1,
    "deploy_type": "single_node",
    "env": {},
    "docker_image": "vllm/vllm-openai:latest",
    "command": "vllm serve poolside/Laguna-XS.2 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 1 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser poolside_v1 \\\n  --reasoning-parser poolside_v1",
    "argv": [
      "vllm",
      "serve",
      "poolside/Laguna-XS.2",
      "--trust-remote-code",
      "--tensor-parallel-size",
      "1",
      "--enable-auto-tool-choice",
      "--tool-call-parser",
      "poolside_v1",
      "--reasoning-parser",
      "poolside_v1"
    ],
    "docker_command": "docker run --gpus all \\\n  --privileged --ipc=host -p 8000:8000 \\\n  -v ~/.cache/huggingface:/root/.cache/huggingface \\\n  vllm/vllm-openai:latest poolside/Laguna-XS.2 \\\n  --trust-remote-code \\\n  --tensor-parallel-size 1 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser poolside_v1 \\\n  --reasoning-parser poolside_v1",
    "docker_argv": [
      "docker",
      "run",
      "--gpus",
      "all",
      "--privileged",
      "--ipc=host",
      "-p",
      "8000:8000",
      "-v",
      "~/.cache/huggingface:/root/.cache/huggingface",
      "vllm/vllm-openai:latest",
      "poolside/Laguna-XS.2",
      "--trust-remote-code",
      "--tensor-parallel-size",
      "1",
      "--enable-auto-tool-choice",
      "--tool-call-parser",
      "poolside_v1",
      "--reasoning-parser",
      "poolside_v1"
    ],
    "strategy_spec": {
      "name": "single_node_tp",
      "deploy_type": "single_node",
      "display_name": "Tensor Parallel",
      "short_label": "TP",
      "orientation": "latency",
      "description": "Single-node tensor parallel. Splits the model across all local GPUs. TP size is set to the GPU count at deploy time. The simplest multi-GPU strategy — works for all model architectures.\n",
      "hardware_match": {
        "min_gpus": 1,
        "max_gpus": 8,
        "multi_node": false
      },
      "vllm_args": [],
      "parallel_flag": "--tensor-parallel-size"
    },
    "hardware_profile": {
      "brand": "NVIDIA",
      "generation": "hopper",
      "compute_arch": "sm90",
      "display_name": "H200",
      "description": "NVIDIA H200 SXM 141 GB HBM3e · 8-GPU HGX node",
      "gpu_count": 8,
      "vram_gb": 1128,
      "multi_node": false
    },
    "alternatives": {
      "single_node_tep": "/poolside/Laguna-XS.2/strategies/single_node_tep.json",
      "single_node_dep": "/poolside/Laguna-XS.2/strategies/single_node_dep.json",
      "kv_store_centralized_mooncake": "/poolside/Laguna-XS.2/strategies/kv_store_centralized_mooncake.json",
      "kv_store_distributed_mooncake": "/poolside/Laguna-XS.2/strategies/kv_store_distributed_mooncake.json"
    },
    "by_hardware": {
      "h200": "/poolside/Laguna-XS.2/hw/h200.json",
      "h100": "/poolside/Laguna-XS.2/hw/h100.json",
      "b200": "/poolside/Laguna-XS.2/hw/b200.json",
      "gb200": "/poolside/Laguna-XS.2/hw/gb200.json",
      "b300": "/poolside/Laguna-XS.2/hw/b300.json",
      "gb300": "/poolside/Laguna-XS.2/hw/gb300.json",
      "mi300x": "/poolside/Laguna-XS.2/hw/mi300x.json",
      "mi325x": "/poolside/Laguna-XS.2/hw/mi325x.json",
      "mi350x": "/poolside/Laguna-XS.2/hw/mi350x.json",
      "mi355x": "/poolside/Laguna-XS.2/hw/mi355x.json"
    }
  },
  "model": {
    "model_id": "poolside/Laguna-XS.2",
    "min_vllm_version": "0.21.0",
    "architecture": "moe",
    "parameter_count": "33B",
    "active_parameters": "3B",
    "context_length": 262144,
    "base_args": [
      "--trust-remote-code"
    ],
    "base_env": {},
    "install": {
      "pip": {
        "command": "uv venv\nsource .venv/bin/activate\nuv pip install -U vllm --torch-backend auto"
      },
      "docker": {
        "command": "docker pull vllm/vllm-openai:latest"
      }
    }
  },
  "features": {
    "tool_calling": {
      "description": "Enable automatic tool choice with Poolside's tool-call parser",
      "args": [
        "--enable-auto-tool-choice",
        "--tool-call-parser",
        "poolside_v1"
      ]
    },
    "reasoning": {
      "description": "Enable interleaved thinking with Poolside's reasoning parser",
      "args": [
        "--reasoning-parser",
        "poolside_v1"
      ]
    },
    "spec_decoding": {
      "description": "DFlash speculative decoding with the Laguna-XS.2 draft model (7 tokens, greedy)",
      "args": [
        "--speculative-config",
        "{\"model\":\"poolside/Laguna-XS.2-speculator.dflash\",\"num_speculative_tokens\":7,\"method\":\"dflash\"}"
      ]
    }
  },
  "opt_in_features": [
    "spec_decoding"
  ],
  "variants": {
    "default": {
      "precision": "bf16",
      "vram_minimum_gb": 80,
      "description": "BF16 weights — fits on a single 80GB+ GPU (H100/H200/B200)"
    },
    "fp8": {
      "model_id": "poolside/Laguna-XS.2-FP8",
      "precision": "fp8",
      "vram_minimum_gb": 40,
      "min_vllm_version": "0.22.0",
      "description": "Block-FP8 weights + FP8 KV cache — halves VRAM, fits on a single 40GB+ GPU",
      "extra_env": {
        "VLLM_BLOCKSCALE_FP8_GEMM_FLASHINFER": "0"
      },
      "json": "/poolside/Laguna-XS.2-FP8.json"
    },
    "nvfp4": {
      "model_id": "poolside/Laguna-XS.2-NVFP4",
      "precision": "nvfp4",
      "vram_minimum_gb": 26,
      "min_vllm_version": "0.22.0",
      "description": "NVFP4 weights + FP8 KV cache (Blackwell only) — the most compact variant at ~26GB",
      "json": "/poolside/Laguna-XS.2-NVFP4.json"
    },
    "int4": {
      "model_id": "poolside/Laguna-XS.2-INT4",
      "precision": "int4",
      "vram_minimum_gb": 29,
      "min_vllm_version": "0.22.0",
      "description": "INT4 (W4A16) weights + FP8 KV cache — fits on a single 32GB+ GPU",
      "json": "/poolside/Laguna-XS.2-INT4.json"
    },
    "redhat_fp8": {
      "model_id": "RedHatAI/Laguna-XS.2-FP8",
      "precision": "fp8",
      "label": "FP8 (RedHat)",
      "vram_minimum_gb": 40,
      "description": "RedHatAI FP8 quantization",
      "extra_args": [
        "--kv-cache-dtype",
        "fp8"
      ],
      "json": "/RedHatAI/Laguna-XS.2-FP8.json"
    },
    "redhat_nvfp4": {
      "model_id": "RedHatAI/Laguna-XS.2-NVFP4",
      "precision": "nvfp4",
      "label": "NVFP4 (RedHat)",
      "vram_minimum_gb": 22,
      "description": "RedHatAI NVFP4 quantization",
      "json": "/RedHatAI/Laguna-XS.2-NVFP4.json"
    }
  },
  "hardware_overrides": {},
  "guide": "## Overview\n\n[Laguna XS.2](https://huggingface.co/poolside/Laguna-XS.2) is Poolside's 33B-total / 3B-activated Mixture-of-Experts model purpose-built for agentic coding and long-horizon work. It combines mixed sliding-window + global attention (3:1 across 40 layers) with sigmoid per-head gating and FP8 KV cache, so it stays compact enough to run locally while supporting a 256K-token context.\n\n### Key features\n- **Mixed SWA + global attention**: 30 sliding-window layers (window=512) interleaved with 10 global-attention layers, each with per-layer rotary scaling.\n- **Native FP8 KV cache**: KV cache is quantized to FP8 to reduce memory per token.\n- **Interleaved reasoning**: thinking blocks emitted between tool calls; toggled per-request via `enable_thinking`.\n- **Tool calling**: Poolside-specific XML-style tool-call protocol, parsed via `poolside_v1`.\n- **256 experts + 1 shared expert** with top-8 routing.\n\n## Prerequisites\n\nLaguna XS.2 support is on the open vLLM PR ([vllm-project/vllm#41129](https://github.com/vllm-project/vllm/pull/41129)) — install from a nightly wheel or the pinned Docker image below until the PR lands in a stable release.\n\n### Docker (recommended)\n```bash\ndocker pull vllm/vllm-openai:laguna\n```\n\n### pip (nightly)\n```bash\nuv venv\nsource .venv/bin/activate\nuv pip install -U vllm --pre \\\n  --extra-index-url https://wheels.vllm.ai/nightly/cu130 \\\n  --extra-index-url https://download.pytorch.org/whl/cu130 \\\n  --index-strategy unsafe-best-match\n```\n\n## Quantized variants\n\nPre-quantized checkpoints are published alongside the BF16 weights — select one with the **Variant** control above:\n\n| Variant | Checkpoint | Weights | ~VRAM | Notes |\n|---------|-----------|---------|-------|-------|\n| BF16 | [Laguna-XS.2](https://huggingface.co/poolside/Laguna-XS.2) | BF16 | 80 GB | Default |\n| FP8 | [Laguna-XS.2-FP8](https://huggingface.co/poolside/Laguna-XS.2-FP8) | Block-FP8 | 40 GB | Set `VLLM_BLOCKSCALE_FP8_GEMM_FLASHINFER=0` |\n| NVFP4 | [Laguna-XS.2-NVFP4](https://huggingface.co/poolside/Laguna-XS.2-NVFP4) | NVFP4 | 26 GB | Blackwell only |\n| INT4 | [Laguna-XS.2-INT4](https://huggingface.co/poolside/Laguna-XS.2-INT4) | INT4 (W4A16) | 29 GB | Hopper or Blackwell |\n\nQuantization is detected automatically from each checkpoint's `quantization_config`, so the launch command is identical — just swap the model ID (select the variant above). All three quantized checkpoints ship an **FP8-quantized KV cache**.\n\n> **vLLM ≥ 0.22.0 required for the quantized variants.** The FP8 KV cache needs the per-layer attention-head fix in [vllm#42650](https://github.com/vllm-project/vllm/pull/42650); earlier versions produce scrambled output on non-Hopper GPUs. On older vLLM you can disable the FP8 KV cache with `--kv-cache-dtype-skip-layers $(seq 0 39)`.\n\n## Deployment Configurations\n\n### Single GPU (H100/H200/B200, BF16)\n```bash\nvllm serve poolside/Laguna-XS.2 \\\n  --trust-remote-code \\\n  --max-model-len 262144 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser poolside_v1 \\\n  --reasoning-parser poolside_v1\n```\n\n### Docker\n```bash\ndocker run -itd --name laguna-xs2 \\\n  --ipc=host --network host --shm-size 16G --gpus all \\\n  -v ~/.cache/huggingface:/root/.cache/huggingface \\\n  vllm/vllm-openai:laguna \\\n    --model poolside/Laguna-XS.2 \\\n    --trust-remote-code \\\n    --max-model-len 262144 \\\n    --enable-auto-tool-choice \\\n    --tool-call-parser poolside_v1 \\\n    --reasoning-parser poolside_v1 \\\n    --host 0.0.0.0 --port 8000\n```\n\n### AMD MI300X / MI325X / MI355X\n\n```bash\nvllm serve poolside/Laguna-XS.2 \\\n  --trust-remote-code \\\n  --max-model-len 262144 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser poolside_v1 \\\n  --reasoning-parser poolside_v1\n```\n\n### Docker (AMD MI300X / MI325X / MI355X)\n\n```bash\ndocker run --rm -it \\\n  --cap-add=SYS_PTRACE \\\n  --ipc=host \\\n  --privileged=true \\\n  --shm-size=128GB \\\n  --network=host \\\n  --device=/dev/kfd \\\n  --device=/dev/dri \\\n  --group-add video \\\n  vllm/vllm-openai-rocm:latest \\\n    --model poolside/Laguna-XS.2 \\\n    --trust-remote-code \\\n    --max-model-len 262144 \\\n    --enable-auto-tool-choice \\\n    --tool-call-parser poolside_v1 \\\n    --reasoning-parser poolside_v1 \n```\n\n## Controlling reasoning\n\nReasoning is **off by default** in the chat template. Enable it per-request:\n\n```python\nfrom openai import OpenAI\nclient = OpenAI(base_url=\"http://localhost:8000/v1\", api_key=\"EMPTY\")\n\nresp = client.chat.completions.create(\n    model=\"poolside/Laguna-XS.2\",\n    messages=[{\"role\": \"user\", \"content\": \"Write a Python retry wrapper with exponential backoff.\"}],\n    extra_body={\"chat_template_kwargs\": {\"enable_thinking\": True}},\n    temperature=0.7,\n    top_p=1.0,\n    extra_query={\"top_k\": 20},\n)\nprint(resp.choices[0].message.reasoning)\nprint(resp.choices[0].message.content)\n```\n\nOr default-on with `--default-chat-template-kwargs '{\"enable_thinking\": true}'`.\n\n## Speculative decoding (DFlash)\n\nEnable the **Spec Decoding** toggle above to attach Poolside's [DFlash draft model](https://huggingface.co/poolside/Laguna-XS.2-speculator.dflash) — a 5-layer Llama-style speculator that proposes up to 7 tokens per step. Reported per-position acceptance with reasoning enabled is ~70% at position 1 across coding, math, QA, and writing workloads.\n\nRequires:\n- vLLM built from [PR #41880](https://github.com/vllm-project/vllm/pull/41880) (extends the base Laguna PR with DFlash support).\n- `VLLM_USE_DEEP_GEMM=0` in the launch environment — DeepGEMM is currently incompatible with the DFlash draft path.\n\nExample:\n\n```bash\nVLLM_USE_DEEP_GEMM=0 vllm serve poolside/Laguna-XS.2 \\\n  --trust-remote-code \\\n  --max-model-len 16384 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser poolside_v1 \\\n  --reasoning-parser poolside_v1 \\\n  --speculative-config '{\"model\":\"poolside/Laguna-XS.2-speculator.dflash\",\"num_speculative_tokens\":7,\"method\":\"dflash\"}'\n```\n\n## References\n\n- [Model card](https://huggingface.co/poolside/Laguna-XS.2)\n- [Release blog post](https://poolside.ai/blog/laguna-a-deeper-dive)\n- [vLLM support PR #41129](https://github.com/vllm-project/vllm/pull/41129)\n- [vLLM DFlash spec-decoding PR #41880](https://github.com/vllm-project/vllm/pull/41880)\n- [DFlash draft model](https://huggingface.co/poolside/Laguna-XS.2-speculator.dflash)\n",
  "source": {
    "source": "vllm",
    "repo": "vllm-project/vllm",
    "ref": "main",
    "sha": "389ffebe555705c85337025d5df108d0384d365e",
    "path": "recipes/models/poolside/Laguna-XS.2.yaml",
    "edit_url": "https://github.com/vllm-project/vllm/edit/main/recipes/models/poolside/Laguna-XS.2.yaml",
    "overlays": []
  }
}