Model Library
Browse and deploy state-of-the-art AI models through the DEVUP Gateway.
Browse and deploy state-of-the-art AI models through the DEVUP Gateway.
Qwen3.8-Flash is a multimodal Mixture-of-Experts model and an early preview of the architecture behind Qwen4. It carries 125 billion main parameters plus a separate 51-billion-parameter N-gram embedding table, yet activates only 6 billion per token — under five percent — through a hybrid attention design where three of every four layers compress history and the fourth retrieves from it precisely. The result is a model that reads text, images, and video across a one-million-token context at a per-token cost closer to a small model than a large one. Thinking is on by default and switchable off, and the whole design targets agentic coding, long-document work, and video analysis.

A multimodal Mixture-of-Experts model, and an early preview of the architecture that will underpin Qwen4.
| Main model | 125B parameters |
| N-gram embedding table | 51B parameters, held separately |
| Activated per token | 6B |
| Context | 1,000,000 tokens |
| Modality | Text, image, video in → text out |
Under five percent of the main model works on any given token. That ratio is aggressive even by current standards, and it is the point of the architecture rather than a side effect.
The 51B embedding table is the more unusual entry. It is — a lookup indexed by local context rather than a set of weights that must be multiplied through. It can be offloaded to host memory and prefetched asynchronously, which means it adds knowledge without adding the compute that knowledge normally requires.
Four components were reworked together. Each addresses a specific cost.
Hybrid attention: GDN + QSA. Three of every four layers use Gated DeltaNet to compress history into a constant-size state. The fourth uses Qwen Sparse Attention, which selects important context at micro-block granularity rather than token by token.
That granularity choice is the practical one. Selecting individual tokens is itself expensive at long context; selecting blocks cuts the selection cost while keeping retrieval precise enough. The result is substantially lower long-context latency — which matters because agentic workloads are long-context workloads by nature.
Gated Residual. The residual stream is widened into four branches, with a data-dependent read gate and a per-branch write gate controlling what flows between layers. This strengthens cross-layer information flow and training stability at depth.
N-gram Embedding. A lookup table indexed by local context, scaling capacity with very little extra computation, offloadable to host memory.
Multi-Token Prediction. A built-in module supporting speculative decoding.
Compared with the previous generation, training cost fell to roughly one ninth while capability on coding and office tasks improved.
Reasoning is enabled unless you turn it off. For classification, routing, extraction, and formatting — where deliberation adds latency and nothing else — switch it off explicitly.
{ "chat_template_kwargs": { "enable_thinking": false } }Reasoning tokens count against your output budget. On a long analytical request the trace can consume a significant share of it before the answer begins, so size the ceiling to the mode you selected rather than to the answer you expect.
| Model ID | Qwen/Qwen3.8-Flash |
| Main parameters | 125B |
| N-gram embeddings | 51B |
| Activated per token | 6B |
| Context window | 1,000,000 tokens |
| Input | Text, image, video |
| Output | Text |
| Reasoning | On by default, switchable |
| Tool calling | Supported |
| Speculative decoding | Multi-Token Prediction module included |
Reported maximum output length varies between sources. Confirm the ceiling on your own path before building around a figure.
| Capability | Value |
|---|---|
input_types | text, image, video |
output_types | text |
context_window | 1000000 |
reasoning | On by default, switchable off |
reasoning_field | reasoning_content — separate from content |
streaming | Supported |
tool_calling | Supported |
structured_output | Supported |
requires_prompt | Yes — text prompt required, media optional |
Worth knowing, because the distinction changes what you get.
Qwen3.8-Flash-Next | Qwen3.8-Flash | |
|---|---|---|
| What it is | Experimental open-weight preview | Production version |
| Native context | 262,144, extensible with RoPE scaling | 1,000,000 by default |
| Built-in tools | — | Included |
| Weights | Published | Hosted |
Same underlying model, different configuration. Documentation, benchmarks, and community discussion frequently refer to the open-weight preview — read specifications carefully when comparing, because the context figures differ by a factor of four.
Base URL: https://api.devupai.com/v1 · Model ID: Qwen/Qwen3.8-Flash
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3.8-Flash",
"messages": [
{
"role": "user",
"content": "Two services write to the same row without a transaction. Walk through the failure modes in order of likelihood and propose the smallest fix for each."
}
],
"temperature": 1.0,
"top_p": 0.95,
"max_tokens": 32768
}'The workload the sparse architecture was built to make affordable.
import os
from pathlib import Path
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
sources = "\n\n".join(
f"=== {path} ===\n{path.read_text(encoding='utf-8')}"
for path in sorted(Path("src").rglob("*.py"))
)
response = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=[
{
"role": "system",
"content": (
"You are auditing a codebase. Identify every database write that occurs outside "
"a transaction. Cite the file and function for each finding. Report nothing you "
"cannot point to."
),
},
{"role": "user", "content": sources},
],
temperature=1.0,
top_p=0.95,
max_tokens=32768,
extra_body={"top_k": 20},
)
print(response.choices[0].message.content)Passing the repository whole rather than chunking it is the point. Cross-file relationships — a helper called from three places, a transaction opened in one module and committed in another — are invisible to a chunked pipeline and are exactly what this kind of audit is looking for.
response = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=[
{
"role": "user",
"content": [
{"type": "video_url", "video_url": {"url": "https://example.com/session.mp4"}},
{
"type": "text",
"text": (
"List every UI action the user performs, in order, with timestamps. "
"Describe only what is visible on screen."
),
},
],
}
],
temperature=1.0,
top_p=0.95,
max_tokens=16384,
extra_body={"top_k": 20},
)Video consumes input tokens rapidly. A long recording at a high frame rate can fill a substantial portion of even a million-token window, so start with a short clip and measure before processing an archive.
import base64
with open("quarterly_report_page.png", "rb") as handle:
encoded = base64.b64encode(handle.read()).decode("utf-8")
response = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{encoded}"}},
{
"type": "text",
"text": (
"Read every figure in the chart and report it with its label and axis unit. "
"Where a value is not printed and must be read off the axis, say so. "
"Use null for anything illegible — do not estimate."
),
},
],
}
],
temperature=1.0,
top_p=0.95,
max_tokens=8192,
extra_body={"top_k": 20},
)Distinguishing a printed figure from one read off an axis is worth asking for. The first is transcription; the second is interpretation, and only one of them belongs in a spreadsheet without review.
response = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=[
{"role": "system", "content": "Classify the ticket. Reply with exactly one word: billing, technical, shipping, or other."},
{"role": "user", "content": ticket},
],
temperature=0.7,
top_p=0.80,
max_tokens=16,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"enable_thinking": False},
},
)Note the different sampling values. Qwen publishes separate parameter sets for thinking and non-thinking modes; switching the mode without switching the sampling leaves quality on the table.
import json
for _ in range(30): # bounded loop — always give an agent an iteration ceiling
response = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=messages,
tools=TOOLS,
temperature=1.0,
top_p=0.95,
max_tokens=32768,
extra_body={"top_k": 20},
)
message = response.choices[0].message
messages.append(
{
"role": "assistant",
"content": message.content,
"reasoning_content": getattr(message, "reasoning_content", None),
"tool_calls": message.tool_calls,
}
)
if not message.tool_calls:
print(message.content)
break
for call in message.tool_calls:
handler = HANDLERS.get(call.function.name)
if handler is None:
result = {"error": "unknown_tool", "name": call.function.name}
else:
try:
result = handler(**json.loads(call.function.arguments or "{}"))
except Exception as exc:
# Return the failure as data — the model can adapt to it.
result = {"error": type(exc).__name__, "detail": str(exc)}
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)})
else:
print("Agent loop exceeded its iteration limit.")Keep reasoning_content in its own field when replaying history. Merging it into content presents
the model's private reasoning back to it as though it were the published answer.
npm install devupaiimport DevupAI from "devupai";
const client = new DevupAI({
apiKey: process.env.DEVUP_API_KEY,
});
const response = await client.chat.completions.create({
model: "Qwen/Qwen3.8-Flash",
messages: [
{
role: "system",
content:
"Review this migration plan. Report only defects that would cause data loss or " +
"downtime, each with a severity and the smallest safe fix.",
},
{ role: "user", content: migrationPlan },
],
temperature: 1.0,
top_p: 0.95,
max_tokens: 32768,
});
console.log(response.choices[0]?.message?.content);stream = client.chat.completions.create(
model="Qwen/Qwen3.8-Flash",
messages=[{"role": "user", "content": "Design a retry policy for a webhook delivery system."}],
temperature=1.0,
top_p=0.95,
max_tokens=32768,
stream=True,
extra_body={"top_k": 20},
)
for chunk in stream:
if not chunk.choices:
if getattr(chunk, "usage", None):
print(f"\n\nin {chunk.usage.prompt_tokens} / out {chunk.usage.completion_tokens}")
continue
delta = chunk.choices[0].delta
if getattr(delta, "content", None):
print(delta.content, end="", flush=True)With thinking on by default, watching the split between reasoning tokens and answer tokens is how you find out whether your output budget is actually sufficient.
Two sets. Switching mode means switching all of them, not just the toggle.
| Parameter | Thinking | Non-thinking |
|---|---|---|
temperature | 1.0 | 0.7 |
top_p | 0.95 | 0.80 |
top_k | 20 | 20 |
Support for top_k varies by serving stack.
Budget output generously on agentic work. Reasoning tokens share the output ceiling with the answer, and truncating mid-trace produces an unfinished response rather than a shorter one.
Agentic coding. The architecture was built for it — long, tool-heavy sessions where context accumulates faster than output. The micro-block attention design specifically targets that latency.
Whole-repository and whole-corpus work. A million tokens holds a codebase, a document set, or a log archive without a retrieval layer in front of it.
Visual and document understanding. Charts, scanned pages, screenshots, and interfaces, read alongside the text around them.
Long-video analysis. One of the stated design targets, and uncommon at this activation cost.
High-throughput production traffic. Six billion activated parameters is what makes this viable as a default rather than an escalation tier.
Turn thinking off where it adds nothing. Classification, routing, and formatting do not improve with deliberation.
Switch the whole sampling set with the mode.
Measure media token consumption before scaling. Video and high-resolution images consume input tokens far faster than text, and a million-token window fills faster than it sounds.
Keep reasoning_content in its own field in both directions.
Feed long documents whole where they fit. Chunking discards the cross-references this model is good at finding.
Instruct it to return null rather than infer on extraction tasks. An invented figure is
undetectable downstream.
Bound every agent loop with an iteration ceiling.
top_k in particular is not universally
honoured.