Qwen3-30B-A3B
| Tier | Input | Output | Cached input |
|---|---|---|---|
PriorityLearn more | 64.8 | 270 | — |
FlexLearn more | 34.6 | 144 | — |
Qwen3-30B-A3B activates three billion parameters out of thirty, and switches between reasoning and direct answering inside a single conversation. The switch is unusual: alongside a request parameter, you can write /think or /no_think into a user message and the model changes mode on that turn. That makes it possible to reason through a hard step and answer the next one immediately, without routing between models. It runs 48 layers with 128 experts and eight active per token, uses four key-value heads against thirty-two query heads to keep cache small, and supports over a hundred languages under Apache 2.0.

Qwen3-30B-A3B
Thirty billion parameters, three active. Reasoning and direct answering in one model, switchable mid-conversation.
Soft Switches: /think and /no_think
The control mechanism that separates this model from every other switchable reasoner in this catalogue.
Most models take a mode as a request parameter — one setting per call, decided by your code. This one also accepts soft switches written directly into the conversation text:
/think
Prove whether this retry schedule can starve a single tenant./no_think
Which department owns this ticket?That changes what is possible. Mode becomes a per-turn property of the conversation rather than a per-request property of your integration. A session can reason through a difficult step, answer the next three immediately, then reason again — all inside one thread, with no parameter changes and no routing logic.
enable_thinking as a request parameter works too, for the cases where your code decides rather
than the prompt.
Two practical notes.
Soft switches are text the model reads. Anything that rewrites or sanitises user input before it reaches the model can strip them without warning.
And some checkpoints in this family ignore them entirely — the FP8 non-thinking build documents that
regardless of any /think or /no_think tags, it will not generate thinking content. Check which
variant you are calling before relying on the switch.
Architecture
| Total parameters | 30.5B |
| Activated per token | 3.3B |
| Layers | 48 |
| Experts | 128 routed, 8 activated |
| Query heads | 32 |
| Key-value heads | 4 |
| Native context | 32,768 |
| Extended context | 131,072 with YaRN |
Eight of 128 experts — roughly six percent of the routed pool per token. That ratio is why a thirty-billion-parameter model serves at the cost of a three-billion one.
Thirty-two query heads against four key-value heads. An eight-to-one grouped-query ratio, which cuts the key-value cache to an eighth of what full multi-head attention would need. On a model positioned for accessible hardware, that is the difference between fitting and not.
Forty-eight layers at 3.3B active — deep and narrow rather than shallow and wide, which suits reasoning over raw throughput.
⚠️ 32K Is Native; 128K Is Extension
Worth being precise about, because the two figures get quoted interchangeably.
Native context: 32,768 tokens. That is what the model was trained at.
131,072 tokens with YaRN. Positional scaling applied at inference — a real capability, and a different thing from training at that length.
What to do about it. Behaviour inside 32K is what the model was built for. Past that, retrieval quality and instruction adherence are worth measuring on your own data rather than assuming they hold uniformly. Extension methods widen the window; they do not guarantee the far end behaves like the near end.
Specifications
| Model ID | Qwen/Qwen3-30B-A3B |
| Total parameters | 30.5B |
| Activated | 3.3B |
| Native context | 32,768 tokens |
| Extended context | 131,072 with YaRN |
| Modes | Thinking, non-thinking |
| Mode control | enable_thinking parameter, or /think · /no_think in the prompt |
| Languages | 100+ |
| Licence | Apache 2.0 |
| Minimum transformers | 4.51.0 |
| Developer | Qwen Team, Alibaba |
Transformers below 4.51.0 raises an error. The Qwen3-MoE implementation is recent, and an older library does not recognise the architecture.
Capabilities
| Capability | Value |
|---|---|
input_types | text |
output_types | text |
image_input | Not supported |
context_window | 40960 |
reasoning | Two modes — switchable |
mode_switch | Parameter or in-prompt soft switch |
streaming | Supported |
tool_calling | Supported in both modes |
structured_output | Supported |
requires_prompt | Yes — text prompt required |
Tool Calling Works in Both Modes
A detail that matters more than it sounds.
Qwen's documentation states agent capability explicitly for both thinking and unthinking modes — precise integration with external tools either way.
Most switchable models degrade tool use when reasoning is off. Here it is a documented capability on both sides, which means a fast-path agent is viable rather than a compromise.
How to use that. Run mechanical tool calls in non-thinking mode — fetching a file, checking a status, listing records. Switch to thinking mode for the steps that need a decision. In one session, with soft switches, that is a per-turn choice rather than an architecture.
Using Qwen3-30B-A3B on DEVUP AI
Base URL: https://api.devupai.com/v1 · Model ID: Qwen/Qwen3-30B-A3B
Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="Qwen/Qwen3-30B-A3B",
messages=[
{"role": "user", "content": "Hello world!"}
],
max_tokens=1024,
)
print(response.choices[0].message.content)Node.js
import DevupAI from "devupai";
const client = new DevupAI({
apiKey: process.env.DEVUP_API_KEY,
});
async function main() {
const response = await client.chat.completions.create({
model: "Qwen/Qwen3-30B-A3B",
messages: [{ role: "user", content: "Hello world!" }],
max_tokens: 1024,
});
console.log(response.choices[0].message.content);
}
main();cURL
curl -X POST "https://api.devupai.com/v1/chat/completions" \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-30B-A3B",
"messages": [
{ "role": "user", "content": "Hello world!" }
],
"max_tokens": 1024
}'Switching Modes Mid-Conversation
The pattern the soft switches exist for.
conversation = []
def ask(text: str, *, think: bool) -> str:
"""Send a turn at the requested mode, using an in-prompt soft switch."""
marker = "/think" if think else "/no_think"
conversation.append({"role": "user", "content": f"{marker}\n\n{text}"})
response = client.chat.completions.create(
model="Qwen/Qwen3-30B-A3B",
messages=conversation,
max_tokens=16384 if think else 1024,
)
message = response.choices[0].message
conversation.append(message)
trace = getattr(message, "reasoning_content", None)
print(f"[{marker}] {response.usage.completion_tokens:>6,} tokens" + (f" · {len(trace):,} reasoning chars" if trace else ""))
return message.content
ask("List the tables in this schema.", think=False)
ask("Which of them could produce a duplicate row under concurrent inserts, and why?", think=True)
ask("Give me the CREATE INDEX statement for the fix.", think=False)Note the max_tokens changing with the mode. Thinking consumes output tokens that non-thinking
does not — a ceiling sized for a one-line answer truncates a reasoning turn mid-argument.
Three turns, two modes, one conversation. The schema listing does not need deliberation. The concurrency question does. The index statement does not. That granularity is the model's distinguishing feature.
Recommended Sampling
From Qwen's own published inference settings:
| Parameter | Value |
|---|---|
temperature | 0.6 |
top_p | 0.95 |
top_k | 20 |
min_p | 0 |
presence_penalty | 1.5 |
The presence penalty is unusually high, and it appears in Qwen's reference command rather than as a suggestion. On a reasoning model, repetition inside a long trace is a real failure mode, and that value is there to suppress it.
Support for these parameters varies by serving stack — top_k, min_p, and presence_penalty in
particular are not universally honoured through an OpenAI-compatible interface.
Reading the Reasoning
message = response.choices[0].message
trace = getattr(message, "reasoning_content", None)
if trace:
logger.debug("reasoning: %d characters", len(trace))
print(message.content)Keep the fields apart in both directions. In thinking mode the trace is substantial; merging it into the answer breaks parsing and shows readers working notes.
Self-Hosting Notes
This model is a common choice for local deployment, and the ecosystem reflects that.
Official builds exist across formats — GGUF for llama.cpp, MLX at 4-bit, 6-bit, and 8-bit for Apple silicon, and FP8.
Transformers 4.51.0 minimum; the MLX builds want 4.52.4 and mlx_lm 0.25.2 or later.
The Apple silicon builds are notable. Official MLX quantisations at three precisions from the model authors, rather than community conversions, make this one of the more accessible capable models on a Mac.
Check what the variant supports. The FP8 build documents that it ignores /think and /no_think
entirely and never produces thinking content. Variants in this family are not interchangeable on mode
behaviour.
Where It Fits
Mixed workloads in one integration — a pipeline with both mechanical steps and hard decisions, served by one model ID.
Agent work at low cost, with tool calling documented in both modes and 3.3B active parameters per token.
Local and on-device deployment, where the official quantisations and the small active footprint make it practical.
Multilingual work across 100+ languages and dialects.
Interactive assistants, running non-thinking by default with reasoning invoked per turn.
Not for long-context work beyond 32K without measuring the extension first.
Not for vision. Text only.
Practical Notes
Use soft switches for per-turn control and the parameter for per-request control.
Size max_tokens to the mode, not to the expected answer.
Check your variant supports mode switching — some builds in this family do not.
Verify soft switches survive any input sanitisation in your stack.
Use Qwen's published sampling values, including the presence penalty.
Measure behaviour past 32K rather than assuming the extension holds uniformly.
Keep reasoning_content in its own field in both directions.
Limitations
Native context is 32,768. The 131,072 figure comes from positional extension, not from training.
Text only. No image, audio, or video input, and no image generation.
Soft switches are prompt text — vulnerable to input rewriting, and ignored entirely by some variants.
Sampling parameter support varies by serving stack. top_k, min_p, and presence_penalty are
not universally available.
Transformers 4.51.0 or later is required for self-hosting.
3.3B active parameters is a small model's compute. Capability is correspondingly bounded — this is an efficiency choice, not a frontier one.
Thinking mode consumes output tokens that non-thinking does not. Budget by mode.
Reasoning traces are working notes. Unpolished, sometimes exploring abandoned branches, and occasionally contradicting the answer that follows.