Baltor Get started

Models

Qwen3.5 397B A17B

By Qwen. 403.4 billion parameters, a context window of 262,144 tokens and the licence apache-2.0.

Facts

Released
2026-02-16 the day the repository was first published on Hugging Face Hugging Face, read
Licence
apache-2.0 the licence the model card declares Hugging Face, read
Open weights
Yes the weights are published in this Hugging Face repository Hugging Face, read
Parameters
403.4 billion counted from the safetensors weight files Hugging Face, read
Active parameters
24.4 billion estimate estimated from the expert counts and sizes in the configuration model configuration, read
Knowledge cutoff
Unknown
Context window
  • 262,144 tokens the maximum position embeddings in the model configuration model configuration, read
  • 262,144 tokens the context length OpenRouter lists OpenRouter, read
Longest output
  • 235,929 tokens the largest output OpenRouter's first provider allows OpenRouter, read
Tool calling
  • Yes the chat template in the tokenizer configuration accepts tool definitions Hugging Face, read
  • Yes OpenRouter lists tools among the supported parameters OpenRouter, read
Structured output
  • Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
Reasoning controls
  • Yes OpenRouter lists reasoning controls OpenRouter, read
Inputs and outputs
text, image in, text out Hugging Face, read
Good for
  • Vision: Hugging Face files it under image-text-to-text Hugging Face, read
  • Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read

Prices

Prices in US dollars per million tokens, as each source lists them
ProviderInputOutputContextAs ofSource
Nvidia direct0 USD0 USD262,144 older than 30 days; check the providermodels.dev, read
Merge Gateway direct0.172 USD1.03 USD131,072 older than 30 days; check the providermodels.dev, read
OrcaRouter direct0.172 USD1.03 USD262,144 older than 30 days; check the providermodels.dev, read
SiliconFlow (China) direct0.290 USD1.74 USD262,144 older than 30 days; check the providermodels.dev, read
Vultr direct0.300 USD2.00 USD262,144 older than 30 days; check the providermodels.dev, read
Alibaba through OpenRouter0.390 USD2.34 USD262,144OpenRouter endpoints, read
Kilo Gateway direct0.390 USD2.34 USD262,144 older than 30 days; check the providermodels.dev, read
SiliconFlow direct0.390 USD2.34 USD262,144 older than 30 days; check the providermodels.dev, read
TokenGo direct0.400 USD2.65 USD262,144 older than 30 days; check the providermodels.dev, read
Deep Infra direct0.450 USD3.00 USD262,144 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.450 USD3.00 USD262,144OpenRouter endpoints, read
Parasail through OpenRouter0.500 USD3.60 USD262,144OpenRouter endpoints, read
AtlasCloud through OpenRouter0.550 USD3.50 USD262,144OpenRouter endpoints, read
DigitalOcean through OpenRouter0.550 USD3.50 USD131,072OpenRouter endpoints, read
Ofox direct0.550 USD3.50 USD256,000 older than 30 days; check the providermodels.dev, read
OpenRouter direct0.550 USD3.50 USD262,144 older than 30 days; check the providermodels.dev, read
Phala through OpenRouter0.550 USD3.50 USD262,144OpenRouter endpoints, read
GMICloud through OpenRouter0.600 USD3.60 USD262,144OpenRouter endpoints, read
Hugging Face direct0.600 USD3.60 USD262,144 older than 30 days; check the providermodels.dev, read
LLMTR direct0.600 USD3.60 USD256,000 older than 30 days; check the providermodels.dev, read
Mixlayer direct0.600 USD3.60 USD262,144 older than 30 days; check the providermodels.dev, read
NanoGPT direct0.600 USD3.60 USD258,048 older than 30 days; check the providermodels.dev, read
Nebius Token Factory direct0.600 USD3.60 USD262,144 older than 30 days; check the providermodels.dev, read
Novita through OpenRouter0.600 USD3.60 USD262,144OpenRouter endpoints, read
NovitaAI direct0.600 USD3.60 USD262,144 older than 30 days; check the providermodels.dev, read
StreamLake through OpenRouter0.600 USD3.60 USD256,000OpenRouter endpoints, read
Together AI direct0.600 USD3.60 USD262,144 older than 30 days; check the providermodels.dev, read
Venice through OpenRouter0.750 USD4.50 USD128,000OpenRouter endpoints, read

Run it on your own hardware

Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
UD-IQ1_M99.5 GiB105 GiB106 GiB
UD-IQ2_XXS107 GiB113 GiB114 GiB
UD-IQ2_M115 GiB121 GiB122 GiB
UD-IQ3_S136 GiB144 GiB145 GiB
Q3_K_S153 GiB161 GiB162 GiB
UD-Q3_K_S153 GiB161 GiB162 GiB
Q3_K_M165 GiB174 GiB175 GiB
UD-Q3_K_M165 GiB174 GiB175 GiB
UD-Q3_K_XL166 GiB176 GiB176 GiB
Q4_K_S212 GiB224 GiB224 GiB
UD-Q4_K_S212 GiB224 GiB224 GiB
MXFP4_MOE221 GiB233 GiB234 GiB
Q4_K_M227 GiB239 GiB240 GiB
UD-Q4_K_M227 GiB239 GiB240 GiB
UD-Q4_K_XL228 GiB241 GiB241 GiB
Q5_K_S258 GiB271 GiB272 GiB
UD-Q5_K_S258 GiB271 GiB272 GiB
Q5_K_M273 GiB288 GiB289 GiB
UD-Q5_K_M273 GiB288 GiB289 GiB
UD-Q5_K_XL275 GiB289 GiB290 GiB
Q6_K304 GiB320 GiB321 GiB
UD-Q6_K304 GiB320 GiB321 GiB
UD-Q6_K_XL337 GiB355 GiB356 GiB
Q8_0393 GiB413 GiB414 GiB
UD-Q8_K_XL398 GiB419 GiB420 GiB
BF16739 GiB776 GiB777 GiB

Start it with a local runtime

  • Ollama
    ollama run hf.co/unsloth/Qwen3.5-397B-A17B-GGUF:Q4_K_S
  • LM Studio
    lms get unsloth/Qwen3.5-397B-A17B-GGUF
    lms server start
  • llama.cpp server
    llama-server -hf unsloth/Qwen3.5-397B-A17B-GGUF:Q4_K_S --jinja
  • vLLM
    vllm serve Qwen/Qwen3.5-397B-A17B
  • SGLang
    sglang serve --model-path Qwen/Qwen3.5-397B-A17B --port 30000

Use it from your harness

Set up for DeepInfra with the model Qwen/Qwen3.5-397B-A17B. Each endpoint page has the same setup for its own address.

OpenCode

Put this in opencode.json in your project folder:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "deepinfra": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DeepInfra",
      "options": {
        "baseURL": "https://api.deepinfra.com/v1/openai",
        "apiKey": "{env:DEEPINFRA_TOKEN}"
      },
      "models": {
        "Qwen/Qwen3.5-397B-A17B": {
          "name": "Qwen3.5 397B A17B",
          "limit": {
            "context": 262144,
            "output": 235929
          }
        }
      }
    }
  }
}
  • OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.

From OpenCode documentation, read .

Pi

Put this in ~/.pi/agent/models.json:

{
  "providers": {
    "deepinfra": {
      "baseUrl": "https://api.deepinfra.com/v1/openai",
      "api": "openai-completions",
      "apiKey": "$DEEPINFRA_TOKEN",
      "models": [
        {
          "id": "Qwen/Qwen3.5-397B-A17B"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Codex speaks only the Responses API, and DeepInfra documents no Responses address. A gateway that offers one can sit in between.

  • Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.

From Codex documentation, read .

Claude Code

Put this in ~/.claude/settings.json, or variables in your shell:

export ANTHROPIC_BASE_URL="https://api.deepinfra.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="$DEEPINFRA_TOKEN"
export ANTHROPIC_MODEL="Qwen/Qwen3.5-397B-A17B"
claude
  • Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.

From Claude Code documentation, read .

Other ways to reach it

Published results

These are results other people published. Baltor did not run them and does not rank models by them.