Instructions to use surogate/Surogate3.7-35B-A3B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use surogate/Surogate3.7-35B-A3B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="surogate/Surogate3.7-35B-A3B-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("surogate/Surogate3.7-35B-A3B-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("surogate/Surogate3.7-35B-A3B-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use surogate/Surogate3.7-35B-A3B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "surogate/Surogate3.7-35B-A3B-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": "surogate/Surogate3.7-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/surogate/Surogate3.7-35B-A3B-NVFP4
- SGLang
How to use surogate/Surogate3.7-35B-A3B-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 "surogate/Surogate3.7-35B-A3B-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": "surogate/Surogate3.7-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "surogate/Surogate3.7-35B-A3B-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": "surogate/Surogate3.7-35B-A3B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use surogate/Surogate3.7-35B-A3B-NVFP4 with Docker Model Runner:
docker model run hf.co/surogate/Surogate3.7-35B-A3B-NVFP4
Surogate 3.7 35B-A3B NVFP4
Surogate 3.7 is a SOTA model built for enterprise agentic applications that significantly outperforms all models in its existing category and it closely tails frontier models like DeepSeek V4 Flash and GLM 5.2 on agentic use-cases.
It builds on the Qwen3.5-35B-A3B-Base architecture and applies extensive post-training with an agentic-first objective: tool-connected workflows, structured interactions, and complex tasks that unfold across multiple steps, with 1M context. The model provides an MTP head and is optimized to be served on consumer GPUs and the DGX Spark.
- Agentic-first post-training. Fine-tuning and RL focused on behavior needed in tool-connected, multi-stage workflows.
- Built for real work. Targeted at practical enterprise-agent patterns such as task decomposition, tool interaction, and structured execution.
- Efficient by architecture. The MoE design activates approximately 3B parameters per token out of a ~35B-parameter model.
- Designed for work. A foundation for custom agents, workflow automation, and systems that combine model inference with external tools.
It is the supporting model for the local deployment of our Local AI platform surogate.ai . It fits on a single DGX Spark with 1M context using the Surogate Engine and can accomodate up to 8 concurrent agentic users, making it ideal for deploying fully local enterprise agents inside organizations.
The model was trained in FP4 precision on boxes with NVIDIA RTX 5090 GPUs using our Surogate Engine.
Benchmarks
| Benchmark | Surogate3.7-35B-A3B | DeepSeek V4 Flash (0731) | GLM-5.2 | Ornith-1.5-35B-A3B | LFM2.5-24B-A2B | MiniCPM-V-4.7-35B-A3B | Sage-A1.5-35B-A3B |
|---|---|---|---|---|---|---|---|
| AutomationBench | 34.3 | 25.1 | 28.0 | 18.5 | 27.69 | 2.7 | 8.7 |
| Terminal-Bench 2.1 | 76.4 | 82.7 | 82.7 | 58.4 | 13.5 | 31.5 | 60.6 |
| BFCL v4 | 68.7 | 67.3 | 70.3 | 68.5 | 65.01 | 60.06 | 55.5 |
| IFEval | 94.1 | 92.5 | 93.9 | 81.8 | 96.75 | 89.6 | 92.9 |
| SWE-bench Verified | 78.0 | 79.7 | 78.7 | 79.0 | 51.00 | 54.6 | 76.2 |
| OfficeQA Pro | 51.9 | 46.6 | 66.20 | 45.9 | 3.0 | 18.0 | 45.1 |
| ฯยฒ-Bench | 93.4 | 95.2 | 99.4 | 81.5 | 72.1 | 84.65 | 81.8 |
| Claw-Eval (average) | 82.4 | 79.7 | 81.60 | 64.40 | 60.8 | 75.1 | 77.3 |
| GPQA Diamond | 91.4 | 88.1 | 91.2 | 89.2 | 74.42 | 77.8 | 87.4 |
| EnterpriseOps-Gym | 38.1 | 43.3 | 42.7 | 28.8 | 12.1 | 28.6 | 29.2 |
| WildClawBench | 54.6 | 33.2 | 52.14 | 45.91 | 9.4 | 35.3 | 50.0 |
| CommerceAgentBench | 39.4 | 38.4 | 39.30 | 37.40 | 1.9 | 14.0 | 25.2 |
Terminal-Bench 2.1, Surogate3.7-35B-A3B: tasks that failed the first attempt were run once more with a 3-hour agent time limit; a task counts as passed if either attempt passed (the first attempt alone: 61.8).
Intended Applications
Surogate 3.7 is oriented toward developers and teams building enterprise assistants, tool-using agents, workflow automation, and multi-step task systems. Its post-training focus should not be interpreted as a guarantee of correctness or autonomous reliability: validate behavior against your own tools, data, safety boundaries, and production workloads before deployment.
Usage
This repository is the NVFP4 export of Surogate3.7-35B-A3B for NVIDIA Blackwell GPUs: the routed experts are NVFP4,
the attention, linear-attention and output-head projections FP8, the vision tower BF16, and the MTP head is included
(model_mtp.safetensors). Serve it with
Surogate, our training and inference engine, which exposes OpenAI- and
Anthropic-compatible APIs. The BF16 weights are in surogate/Surogate3.7-35B-A3B.
Install Surogate on Linux x86_64 with CUDA 13 (driver 580 or newer), or on a DGX Spark:
curl -LsSf https://github.com/invergent-ai/surogate/releases/latest/download/install.sh | bash
source .venv/bin/activate
One RTX 5090 or RTX PRO 6000 Blackwell: 262k context
surogate serve surogate/Surogate3.7-35B-A3B-NVFP4 --port 8000 \
--max-model-len 262144 --kv-cache-dtype fp8 --kv-capacity auto --max-num-seqs 16 \
--enable-auto-tool-choice --thinking-retention all \
--spec mtp --draft-tokens 2 --spec-max-lanes all --prefix-cache-host-gb 8
- On a 32 GB RTX 5090 the FP8 cache holds about 450,000 tokens, shared by all requests. Every request can use the full 262,144 tokens: the engine admits requests by their actual length, so agents whose combined live context stays under that size run without waiting. If the cache fills up, the newest request pauses and is resumed later; it does not fail.
- To accept images, add
--vision --offload-vision; the second flag keeps the image encoder's weights in system RAM, leaving the GPU's memory to the cache.
DGX Spark: 1M context for up to 8 agents
surogate serve surogate/Surogate3.7-35B-A3B-NVFP4 --port 8000 --vision \
--max-model-len 1048576 \
--rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}' \
--kv-cache-dtype fp8 --kv-capacity 6291456 --max-num-seqs 16 --max-num-batched-tokens 4096 \
--enable-auto-tool-choice --thinking-retention all --spec mtp --draft-tokens 2
- YaRN with factor 4 extends the native 262,144 tokens to 1,048,576. It costs little: +0.019 nats per token on a 95k-token answer, and nothing measurable at 4k or 30k.
- Set
--kv-capacityexplicitly on the Spark: its GPU shares memory with the system, andautowould leave only 1 GiB free. 6,291,456 tokens take about 71 GiB. - Measured on a DGX Spark: a median agent turn of 2.5 s with 4 concurrent agents and 2.7 s with 8. A cold million-token prompt takes about 16 minutes; later turns reuse the cache.
Notes for both
- The first start downloads and prepares the model (cached under
~/.cache/surogate/serve); later starts reuse it. - Sampling comes from the checkpoint's
generation_config.json(temperature=1.0, top_p=0.95, top_k=20), and theqwen3reasoning andqwen3_codertool-call parsers are selected automatically. --thinking-retention allrestores the model's earlier reasoning when an agent harness resends a turn without it.--max-num-seqs 16serves 16 requests at once (the default is 1);--spec-max-lanes allkeeps MTP drafting on at every concurrency;--prefix-cache-host-gb 8keeps conversations in host RAM between agent turns instead of prefilling them again.- Optional:
--thinking-loop-guard --thinking-answer-reserve 4096closes a thought that loops or runs into the output budget, so the request still ends with an answer.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="x")
r = client.chat.completions.create(
model="surogate/Surogate3.7-35B-A3B-NVFP4",
messages=[{"role": "user", "content": "List the five largest files under /var/log and explain what they are."}],
temperature=1.0, top_p=0.95,
extra_body={"top_k": 20, "chat_template_kwargs": {"enable_thinking": True, "preserve_thinking": True}},
)
print(r.choices[0].message.content)
Thinking is on by default; preserve_thinking keeps earlier reasoning in multi-turn agent loops.
Other GPUs and vLLM
On GPUs without FP4 support, such as Hopper, serve the BF16 weights instead:
surogate serve surogate/Surogate3.7-35B-A3B with the same options runs them unquantized. They take about 67 GB of GPU
memory; add --devices 0,1,2,3 to split the model across several GPUs. For vLLM, serve the BF16 weights too; the
command is on the BF16 model card.
License
Apache 2.0
- Downloads last month
- 250
Model tree for surogate/Surogate3.7-35B-A3B-NVFP4
Base model
Qwen/Qwen3.5-35B-A3B-Base