text-generation · 617.69 MB ONNX (626.82 MB total) · WASM q8 · 28 layers · Apache-2.0

Qwen3-0.6B — Hybrid-Reasoning Browser LLM

Qwen/Qwen3-0.6B (ONNX export onnx-community/Qwen3-0.6B-ONNX, Apache-2.0) is a 28-layer Qwen3ForCausalLM decoder (~0.6B parameters, 16 Q / 8 KV GQA heads, 151,936 vocab, 40,960 context) with native hybrid thinking: switch between step-by-step <think>…</think> reasoning and fast /no_think replies inside one local CPU WebAssembly model.

Upstream Card Qwen/Qwen3-0.6B
Loaded ONNX ID onnx-community/Qwen3-0.6B-ONNX
Task & Architecture text-generation · Qwen3ForCausalLM
Weights & Quant 617.69 MB ONNX (626.82 MB total) · WASM q8
Dimensions & GQA 28 layers · 1024d · 16Q / 8KV · 40,960 ctx
Vocab & License 151,936 BPE · Apache-2.0 · <think>

1. Hybrid-Reasoning Streaming Workbench

WASM dtype honesty: This demo runs pipeline("text-generation", "onnx-community/Qwen3-0.6B-ONNX", { device: "wasm", dtype: "q8" }) off the main thread (onnx/model_quantized.onnx, 617.69 MB + 9.12 MB tokenizer = 626.82 MB). On CPU WASM, q4 (919.10 MB) aborts at session creation because GatherBlockQuantized lacks a WASM kernel, and q4f16 (569.79 MB) / fp16 (1,202.83 MB) target WebGPU; q8 runs cleanly everywhere.

Choose a reasoning, direct-answer, or character-counting preset:

Upload, drop, or paste a local prompt file (.txt, .md, .csv, .jsonl, .json) Everything stays on-device. Drop a file here or press Ctrl/Cmd+V outside text fields.
First-token (TTFT)–
Decode speed–
Think / Ans / Total–
Total latency–
NaN check–
Backend / dtypeWASM · q8

Live Streamed Output

Idle
Initialise Qwen3-0.6B above to stream hybrid-reasoning responses locally on WebAssembly.

2. See Inside: ChatML Template, <think> Tokens & 151k-Vocab Logits

Qwen3 uses ChatML (<|im_start|> / <|im_end|>) plus dedicated <think> (#151667) and </think> (#151668) special tokens. Inspect the exact templated prompt, the real top-10 next-token probabilities from pipe.model(inputs), and the token-by-token breakdown.

Next-Token Candidate Probabilities

Entropy –

Full 151,936-vocab Shannon entropy H(P) will appear after a forward pass.

Run generation or click Inspect Next-Token Logits above.

Exact Templated ChatML Prompt

0 tokens
Templated prompt appears when inference runs.

Generated Token Stream Breakdown

0 tokens
Generated token pieces (highlighting <think> vs answer tokens) appear here after a run.

Why Qwen3-0.6B Matters

A 0.6B hybrid-reasoning model running on universal CPU WebAssembly brings controllable test-time compute into any browser tab without requiring WebGPU, API keys, or cloud telemetry.

See inside the code

Show the code — worker.js: runSingleGeneration() (TextStreamer + <think> budget tracking)
Show the code — worker.js: handleNextTokenTopK() (151,936-vocab softmax + entropy)
Show the code — qwen3-core.mjs: splitThinkTrace() (<think>…</think> & cutoff splitter)

References