Alibaba releases Qwen4 model with open weights and a million-token context
Developers can download Qwen4-35B-A3B and give it code, screenshots, or video. Its long context opens up a practical test for coding assistants: can they trace a bug across files?
On December 4, Alibaba’s Qwen team announced that developers could download Qwen4-35B-A3B from Hugging Face and ModelScope. The release includes the model weights under the Apache 2.0 license, so a team can run a copy on its own hardware. The model takes text, images, and video as input and replies in text.
What a million tokens buys a developer
A context window is the amount of material a model can work with in one request. Qwen lists roughly one million tokens for this release. For a coding assistant, that opens up a useful experiment. Give it the component that draws a button, the stylesheet that controls it, and a screenshot showing that the label has disappeared. Ask it to name the CSS rule responsible and predict what will change when you edit it. You can check both claims in the browser.
Where did the button label go?
Follow the evidence in this worked example, then apply the one-line fix.
<button class="run">
Run tests
</button>.run {
background: #5632a7;
color: #5632a7;
}.run {
background: #5632a7;
color: #ffffff;
}The component supplies a label. The preview shows a purple rectangle where the words should be. The HTML alone leaves the cause open.
The stylesheet supplies the missing clue. The foreground and background use the same purple, so each letter blends into the button.
Changing the foreground to white reveals “Run tests”. The label and the background stayed the same, so the preview isolates the cause.
What it takes to run
Hugging Face worked with Qwen on launch support for tools including llama.cpp and vLLM. It also lists three compressed versions for llama.cpp, at four, six, and eight bits. Those give developers a choice about how much memory to spend on the weights. The context length adds a separate cost as the input grows.
For a first test, start with a bug you have already fixed. Record whether the model identifies the correct line, how long it takes, and how much memory it uses. Then repeat with more files. That gives you a measure of what the longer context is worth on your own project.
How much of the window would you actually use?
A token is a unit the model processes. A word can span several tokens, and images also use part of the input budget. Qwen lists a native ceiling of 1,048,576 tokens. An application can set a smaller limit to suit its hardware. Qwen model card
Suppose the files, screenshot, and question use 18,432 tokens. Reserve 2,048 for the reply. That request needs 20,480 tokens in total.
12,288 tokens over budgetTrim the input or raise the limit to leave space for the reply.
12,288 tokens leftThe files and the planned reply fit together in this window.
1,028,096 tokens leftThis request uses about 2% of the model’s native window. Extra capacity helps when you have more relevant evidence to include.
What does “A3B” mean?
Qwen describes a 35-billion-parameter language model with roughly three billion parameters active for each token. It uses a mixture of experts. In each expert layer, a router selects eight of 256 specialized networks, alongside one shared network. Different tokens can take different routes. That cuts the work for an individual token, while the other experts still need to be available for later tokens. The checkpoint also includes embedding and prediction components beyond the 35 billion in the name. Qwen’s architecture breakdown
Why a smaller download still needs working memory
Quantization packs weights, the numbers learned during training, into fewer bits. As a simplified example, eight weights at eight bits each take eight bytes. At four bits each, those values take four bytes before packing overhead. During a request, the runtime also stores intermediate data about the input. A model that loads successfully can therefore run out of memory when you give it a much longer prompt. Hugging Face’s guide to running Qwen4