Instructions to use AxionML/Laguna-XS-2.1-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AxionML/Laguna-XS-2.1-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AxionML/Laguna-XS-2.1-NVFP4", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AxionML/Laguna-XS-2.1-NVFP4", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("AxionML/Laguna-XS-2.1-NVFP4", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AxionML/Laguna-XS-2.1-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AxionML/Laguna-XS-2.1-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxionML/Laguna-XS-2.1-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AxionML/Laguna-XS-2.1-NVFP4
- SGLang
How to use AxionML/Laguna-XS-2.1-NVFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AxionML/Laguna-XS-2.1-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxionML/Laguna-XS-2.1-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AxionML/Laguna-XS-2.1-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxionML/Laguna-XS-2.1-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AxionML/Laguna-XS-2.1-NVFP4 with Docker Model Runner:
docker model run hf.co/AxionML/Laguna-XS-2.1-NVFP4
AxionML Laguna-XS-2.1-NVFP4
Mirrored by AxionML for open-source serving and deployment use cases. Part of AxionML's effort to provide ready-to-serve quantized models for the community.
Quantized by Poolside. The weights in this repository are an unmodified copy of poolside/Laguna-XS-2.1-NVFP4 (revision
d32afde8b09af1539b49ff96ff5551c674485f8e). All credit for the quantization belongs to Poolside.
This is an NVFP4-quantized version of poolside/Laguna-XS-2.1 (33B total parameters, 3B activated), quantized with NVIDIA Model Optimizer.
About NVFP4 quantization: NVFP4 on Blackwell couples a compact E2M1 FP4 codebook with blockwise FP8 (E4M3) scaling over 16-element micro-blocks, so that 4-bit stored values remain numerically useful for neural-network computation. The E2M1 codebook provides a small, nonuniform set of representable magnitudes up to ±6 and relies on saturating behavior rather than IEEE NaN/Inf encodings to maximize usable range per bit. Using an FP8 block scale (rather than power-of-two-only E8M0) enables fractional scales and error-minimizing scale selection. On Blackwell Tensor Cores, native FP4 multipliers exploit E2M1 simplicity while higher-precision FP32 accumulation protects dot-product accuracy.
Ready for commercial and non-commercial use under OpenMDW-1.1 (included as
LICENSE.md), consistent with Poolside's Acceptable Use Policy.
Model Summary
| Architecture | MoE; 40 layers (10 global attention + 30 sliding-window), sigmoid-gated attention |
| Total Parameters | 33B |
| Activated Parameters | 3B |
| Context Length | 262,144 tokens |
| Checkpoint Size | ~22 GB |
Evaluation Results
| Benchmark | BF16 | NVFP4 |
|---|---|---|
| SWE-bench Verified | 70.85 ± 0.85 | 68.95 ± 0.90 |
| SWE-bench Multilingual | 63.17 ± 1.42 | 61.83 ± 1.42 |
| SWE-Bench Pro (Public) | 47.61 ± 0.96 | 47.06 ± 0.96 |
| Terminal-Bench 2.0 | 37.53 ± 2.81 | 37.08 ± 2.47 |
Scores reported by Poolside for this checkpoint (mean pass@1, Harbor framework).
Quantization Details
- Quantization format: NVFP4 (compressed-tensors
nvfp4-pack-quantized, group size 16) on routed and shared expert MLPs; Poolside's official NVFP4 release - KV cache: FP8 (static per-tensor)
Usage
Deploy with SGLang
python3 -m sglang.launch_server \
--model-path AxionML/Laguna-XS-2.1-NVFP4 \
--trust-remote-code
Deploy with vLLM
vllm serve AxionML/Laguna-XS-2.1-NVFP4 \
--enable-auto-tool-choice \
--tool-call-parser poolside_v1 \
--reasoning-parser poolside_v1
Quantization is detected automatically in vLLM, SGLang (sgl-project/sglang#24204) and Transformers. The FP8 KV cache needs vLLM ≥ 0.22.0; tool calling needs a vLLM build with vllm#47311 (otherwise use --tool-call-parser glm47).
Limitations
The base model was trained on data that may contain toxic language and societal biases. The quantized model inherits these limitations. It may generate inaccurate, biased, or offensive content. Please refer to the original model card and the upstream quantized model card for full details.
Credits
- Base model: poolside/Laguna-XS-2.1
- Quantization: poolside/Laguna-XS-2.1-NVFP4 by Poolside
- Mirror: AxionML
- Downloads last month
- 512
Model tree for AxionML/Laguna-XS-2.1-NVFP4
Base model
poolside/Laguna-XS-2.1