A new open-weight model can look inexpensive until you try to deploy it.

The model weights are available, the architecture looks efficient, and the advertised context window is impressive. Then you start configuring GPU memory, inference engines, KV cache, and concurrent requests.

This is where model deployment becomes a different problem from simply downloading a checkpoint.

On December 4, 2026, Alibaba's Qwen team released Qwen4-35B-A3B, the first open-weight model in the Qwen4 series.

The model has 35 billion total parameters, approximately 3 billion active parameters per token, and a native context window of up to one million tokens. Its architecture combines Gated DeltaNet with Qwen Sparse Attention, alongside a mixture-of-experts design.

The interesting part is not just the parameter count. It is how the model handles long-context inference.

Here is a practical look at getting it running with vLLM.

1. Understand the Model Before Downloading It

Qwen4-35B-A3B is not a conventional dense 35B model.

Its architecture combines several components:

  • Gated DeltaNet for efficient sequence processing.
  • Qwen Sparse Attention for selecting relevant context.
  • Mixture-of-experts routing.
  • N-gram embeddings.
  • Multi-token prediction.

The model activates approximately 3B parameters per token, but this does not mean it only needs the memory of a 3B model.

Total weights, embeddings, runtime buffers, KV cache, and other inference components still affect memory requirements.

This distinction is important when choosing hardware.

The official FP8 checkpoint and BF16 checkpoint also have different memory requirements. Quantization reduces memory consumption, but it should be evaluated against output quality and hardware compatibility.

2. Prepare the Environment

The official Qwen4 repository provides model weights through Hugging Face and ModelScope.

For developers with access to Hugging Face:

pip install -U huggingface_hub huggingface-cli download \ Qwen/Qwen4-35B-A3B-FP8 \ --local-dir ./Qwen4-35B-A3B-FP8 

Check the model card and repository for the correct checkpoint name and license before downloading.

You also need a supported inference environment.

The Qwen team lists vLLM and SGLang among the supported serving frameworks.

For this tutorial, we will use vLLM.

3. Start a vLLM Server

The vLLM team published day-zero Qwen4 support on December 4.

Its recommended NVIDIA Docker image is:

docker run --gpus all \ --ipc=host \ -p 8000:8000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -e VLLM_USE_RUST_FRONTEND=1 \ vllm/vllm-openai:qwen4 \ Qwen/Qwen4-35B-A3B-FP8 \ --trust-remote-code \ --enable-prefix-caching \ --max-model-len auto \ --disable-flashinfer-autotune \ --kv-cache-dtype nvfp4 \ --attention-config.indexer_kv_dtype fp8 \ --enable-auto-tool-choice \ --tool-call-parser qwen4 \ --reasoning-parser qwen4 \ --speculative-config \ '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true}' 

Important: this is the NVIDIA-specific serving recipe published by vLLM. It is not a universal command for every GPU.

The FP8 checkpoint, NVFP4 cache, model kernels, and speculative decoding options depend on supported hardware and the corresponding vLLM build.

For AMD hardware, the vLLM team provides a separate ROCm image and configuration.

Do not assume that changing the Docker image alone makes the NVIDIA command compatible with AMD GPUs.

4. Send Your First Request

Once the server is running, it exposes an OpenAI-compatible API endpoint.

You can test it using the official Python SDK:

pip install openai 

Then:

from openai import OpenAI client = OpenAI( api_key="EMPTY", base_url="http://localhost:8000/v1" ) response = client.chat.completions.create( model="Qwen/Qwen4-35B-A3B-FP8", messages=[ { "role": "system", "content": "You are a Python programming assistant." }, { "role": "user", "content": ( "Explain how Python async generators work " "and provide a practical example." ) } ], temperature=0.3, max_tokens=1500 ) print(response.choices[0].message.content) 

The model name must match the model served by your vLLM instance.

This request uses a local endpoint, so it does not require an external API provider.

5. Test the Million-Token Context Window Properly

A million-token context window is an impressive specification, but it is not a guarantee that every deployment can process one million tokens efficiently.

You should test three separate things:

Context acceptance: Can the server accept the requested input length?

Retrieval quality: Can the model identify information placed at different positions in a long document?

Operational performance: How much memory and latency does the workload require?

A useful test is to place several unique facts at different locations in a document and ask the model to retrieve them.

test_cases = [ { "position": "beginning", "fact": "Project code: ALPHA-204" }, { "position": "middle", "fact": "Database version: PostgreSQL 18" }, { "position": "end", "fact": "Deployment region: Singapore" } ] 

Create a longer document around these facts and test whether the model can recover them accurately.

Do not rely on a single successful long-context request.

6. Measure Performance Under Concurrent Requests

Single-user inference speed is not the same as production throughput.

A basic benchmark should record:

  • Time to first token.
  • Output tokens per second.
  • Total request latency.
  • GPU memory utilization.
  • Throughput under concurrent requests.
  • Error rate.
  • Performance at different context lengths.

For example, you can use a simple load-testing script to send multiple requests and record latency distributions.

Avoid comparing two model deployments using different prompts, hardware, quantization, or generation settings.

7. Local Deployment vs Hosted API

Running Qwen4 locally provides control over the serving environment, but the team becomes responsible for GPU availability, updates, monitoring, and capacity planning.

A hosted API removes much of that infrastructure work, although it introduces provider dependency and usage-based costs.

For teams testing multiple models, a unified API gateway such as 4SAPI can simplify compatible model access through a centralized integration layer. If Qwen4 is listed in the available model catalog, developers should verify its model identifier, endpoint compatibility, context limits, and tool-calling support before integrating it.

The decision should be based on the workload rather than the assumption that open weights are always cheaper.

8. Final Thoughts

Qwen4-35B-A3B is an interesting release because it combines a relatively small active parameter count with a very large context window.

But the practical value depends on the complete serving stack.

The model architecture, quantization, inference engine, GPU, cache configuration, and workload all matter.

For developers, the most useful next step is to run a controlled benchmark against their own application tasks rather than relying exclusively on headline specifications.

Discussion: Would you rather deploy a 35B open-weight model yourself, or pay for a managed API and avoid maintaining GPU infrastructure?

Official References