relativity.cc

models

Qwen3, Qwen3.5 and Qwen3.8 models, dense, hybrid and mixture-of-experts, served with SGLang-JAX or SGLang-TorchTPU and libtt on Blackhole, with performance numbers, speculative decoding, and known gaps.

Supported models

These models run on SGLang-JAX's TT backend and libtt. Matmul weights, including the LM head, are stored in BFP8, Tenstorrent's 8-bit block floating point format, in which each group of 16 values shares an exponent. The mixture-of-experts models' experts are the exception: TTNN's fused MoE kernel stores them in BFP4, with 4 bits per value. Everything else (embeddings, norm weights, activations and the KV cache) is BF16. All of them but Qwen3.8-Flash-Next also run on SGLang-TorchTPU, SGLang's PyTorch server, with FP8 weights.

decode tokens per second after the first token, for a single greedy request without speculative decoding, higher is better
sampled the same request sampled at temperature 0.7, without top-p or top-k (see Sampling)
first token milliseconds to the first token of a 215-token prompt, lower is better

ModelMetric1 chip2 chips4 chips
Qwen3-8Bdensedecode47.081.0124.4
sampled45.275.1110.9
first token1137654
Qwen3-14Bdensedecode27.049.483.3
sampled26.447.277.2
first token17911076
Qwen3-32Bdensedecode—22.740.6
sampled—22.239.0
first token—229147
Qwen3.5-9Bhybriddecode43.574.7117.0
sampled41.166.798.3
first token15910878
Qwen3.8-27Bhybriddecode—26.746.1
sampled—25.642.8
first token—271179
Qwen3-30B-A3BMoEdecode—104.3127.4
sampled—95.0113.5
first token—9769
Qwen3.5-35B-A3BMoEdecode—88.9109.2
sampled—78.292.5
first token—141104
Qwen3.8-Flash-NextMoEdecode——42.7
sampled——39.4
first token——810

A dash means the model doesn't fit on one chip or we haven't run that configuration yet. Dense models use full attention in every layer; the hybrid models (Qwen3.5, Qwen3.8) mix gated DeltaNet layers with full attention. The mixture-of-experts (MoE) models run each token through a few of their experts, with the experts split over the chips. Qwen3-30B-A3B and Qwen3.5-35B-A3B use 8 of 128 and 256 experts, about 3B active parameters, and need at least two chips; Qwen3.8-Flash-Next uses 10 of 512 and needs four. Qwen3.5-35B-A3B and Qwen3.8-Flash-Next are also hybrid.

Measured on a QuietBox 2 with libtt 0.2.2 and SGLang-JAX 6282ec6, using the inference recipe with --tp-size set to the chip count, overlap scheduling on (remove --disable-overlap-schedule from the launch command) and JAX_DEFAULT_PRNG_IMPL=unsafe_rbg (see Sampling). Each number decodes 128 tokens, one request at a time and without speculative decoding, taking the median of five runs after two warmups. How we measure has the prompts, the timing and a script that takes the same measurements.

Sampling

Set JAX_DEFAULT_PRNG_IMPL=unsafe_rbg in the launch command's environment when requests sample:

export JAX_DEFAULT_PRNG_IMPL=unsafe_rbg

It makes JAX draw its random bits with libtt's native generator. JAX's default Threefry generator adds about 18 ms to every sampled token on Blackhole for the Qwen3 models' 151,936-token vocabulary, and 29 ms for Qwen3.8-Flash-Next's 248,320. That slows sampled decode on one chip from 45.2 to about 25 tokens per second for Qwen3-8B.

With it, sampling at temperature 0.7 adds 0.8 to 1.0 ms per token for the Qwen3 models and 1.3 to 2.0 ms for Qwen3.5 and Qwen3.8, whose vocabulary is larger. Its share grows as decode gets faster: from 2% for Qwen3-32B on two chips to 16% for Qwen3.5-9B on four. top_p and top_k each add a search over the vocabulary to every step, and a request that sets only temperature runs neither. Qwen3-8B, one request, tokens per second:

Sampling parameters1 chip4 chips
greedy (temperature: 0)47.0124.4
temperature: 0.745.2110.9
temperature: 0.7, top_p: 0.9539.983.6
temperature: 0.7, top_k: 2039.983.6
temperature: 0.7, top_p: 0.95, top_k: 2035.666.8

In a batch, a search runs for every request as long as any request in the batch needs it. min_p filters without a search.

Batched throughput

Decode throughput on four chips with several requests in flight. Each request sends a 19-token code prompt and generates 128 tokens. Total throughput includes the time the requests' prefills take, so it's lower than the number of requests times the per-user rate (see How we measure).

total tokens per second across all requests, from sending them until the last one finishes, prefills included
per user each request's decode rate after its first token, the median over requests

ModelMetric1 request4 requests8 requests16 requests
Qwen3-8Bdensetotal1204397701139
per user123.1117.3105.682.6
Qwen3-14Bdensetotal81302541902
per user82.679.373.064.0
Qwen3-32Bdensetotal39148274444
per user40.339.037.332.6
Qwen3.5-9Bhybridtotal113392660999
per user116.7104.988.771.1
Qwen3.8-27Bhybridtotal45160284448
per user46.042.138.030.9
Qwen3-30B-A3BMoEtotal1214247071014
per user125.8114.896.973.8
Qwen3.5-35B-A3BMoEtotal104342566820
per user108.692.277.358.2
Qwen3.8-Flash-NextMoEtotal39100145170
per user42.227.921.311.6

To serve more requests at once, raise --max-running-requests and --max-total-tokens in the launch command (we used 16 and 4096). For Qwen3.5 and Qwen3.8, also set --max-recurrent-state-size to the same value as --max-running-requests; otherwise SGLang-JAX keeps a quarter of the recurrent state slots in reserve and runs at most 12 of 16 requests at once.

These batched numbers are greedy and also use overlap scheduling, with the same libtt and SGLang-JAX as above.

SGLang-TorchTPU

SGLang-TorchTPU, SGLang's PyTorch server for TPUs, also runs these models except Qwen3.8-Flash-Next, through torch_tpu and libtt. It's experimental. Here are the same measurements with FP8 weights: Qwen's FP8 checkpoints for Qwen3-8B, Qwen3-14B, Qwen3-32B, Qwen3.8-27B, Qwen3-30B-A3B and Qwen3.5-35B-A3B, and --quantization fp8 for Qwen3.5-9B, which has no FP8 checkpoint. FP8 weights take about as many bytes as SGLang-JAX's BFP8 weights above; the mixture-of-experts models' FP8 experts take twice as many as its BFP4 experts.

decode tokens per second for a single greedy request, higher is better
sampled the same request sampled at temperature 0.7, without top-p or top-k
first token milliseconds to the first token of a 215-token prompt, lower is better

ModelMetric1 chip2 chips4 chips
Qwen3-8B-FP8densedecode44.475.0116.0
sampled42.770.3105.3
first token251166122
Qwen3-14B-FP8densedecode25.946.876.2
sampled25.344.971.3
first token393235167
Qwen3-32B-FP8densedecode—22.638.8
sampled—22.137.5
first token—477317
Qwen3.5-9Bhybriddecode37.259.986.5
sampled35.355.076.6
first token451279191
Qwen3.8-27B-FP8hybriddecode—25.342.0
sampled—24.439.6
first token—693457
Qwen3-30B-A3B-FP8MoEdecode—87.097.4
sampled—80.592.9
first token—196143
Qwen3.5-35B-A3B-FP8MoEdecode—73.283.0
sampled—66.278.1
first token—340239

A dash means the model doesn't fit on one chip. For a single request, SGLang-TorchTPU decodes up to 26% slower than SGLang-JAX (Qwen3.5-9B on four chips), and as fast for Qwen3-32B on two chips. Its first tokens take 2.0 to 2.8 times as long. With 16 requests in flight, its total throughput is 47 to 77% of SGLang-JAX's (see below).

Measured on the same QuietBox 2 with the same libtt as above, torch_tpu 0.2.0 and SGLang-TorchTPU 5191118, from the main branch of sgl-project/sglang-torchtpu, installed as the PyTorch SGLang guide describes. The server ran the FP8 launch command with --tp-size set to the chip count, --mem-fraction-static 0.85, --max-running-requests 2, --tpu-compile-tokens 64 256 --chunked-prefill-size 256 and --disable-radix-cache. The hybrid models also need --no-enable-multimodal --max-mamba-cache-size 8 and SGLANG_TPU_VIT_PRECOMPILE_SIZES= (empty), and the mixture-of-experts models --ep-size set to the chip count. As above, each number decodes 128 tokens, one request at a time, taking the median of five runs after two warmups.

Sampling with SGLang-TorchTPU

SGLang-TorchTPU filters top-p and top-k without sorting: it searches for each request's cutoff in 30 rounds over the vocabulary, and a top_k of at most 64 picks from the 64 most likely tokens. Qwen3-8B-FP8, one request, tokens per second:

Sampling parameters1 chip4 chips
greedy (temperature: 0)44.4116.0
temperature: 0.742.7105.3
temperature: 0.7, top_p: 0.9539.085.5
temperature: 0.7, top_k: 2043.4109.4
temperature: 0.7, top_p: 0.95, top_k: 2042.4103.5

These speeds come from libtt 0.2.0's unrolled short loops, full-tile reductions over a few vocabulary rows and traced long eager ops; before them, top_p: 0.95 decoded 26.6 tokens/s on one chip and 36.8 on four. Sampling follows the model's probabilities: for each of these settings, the first tokens of 400 requests fit the log-probabilities the server reports.

Batched throughput with SGLang-TorchTPU

Decode throughput on four chips with several requests in flight, as above: each request sends a 19-token code prompt and generates 128 greedy tokens.

total tokens per second across all requests, from sending them until the last one finishes, prefills included
per user each request's decode rate after its first token, the median over requests

ModelMetric1 request4 requests8 requests16 requests
Qwen3-8B-FP8densetotal106367580750
per user115.4105.588.560.5
Qwen3-14B-FP8densetotal71249422609
per user76.170.962.047.4
Qwen3-32B-FP8densetotal36129219344
per user38.736.732.526.7
Qwen3.5-9Bhybridtotal77242360466
per user86.366.357.639.2
Qwen3.8-27B-FP8hybridtotal37115172235
per user42.038.030.120.9
Qwen3-30B-A3B-FP8MoEtotal88315500666
per user96.591.576.052.7
Qwen3.5-35B-A3B-FP8MoEtotal72238339432
per user83.171.256.938.1

The server ran with --max-running-requests 16 --tpu-compile-bs 1 4 8 16 --torch-compile-max-bs 16, the hybrid models with --max-mamba-cache-size 32 and the mixture-of-experts models with --ep-size 4.

Speculative decoding

MTP

Qwen3.5 and Qwen3.8 checkpoints include a multi-token prediction (MTP) layer, which SGLang-JAX can run as the draft model: each step, the MTP layer proposes five tokens and the model checks them in one forward pass. Here is Qwen3.8-27B with its own MTP layer as the draft, one request at a time, in tokens per second:

RequestChipsWithout draftWith draftSpeedup
greedy, 5-token prompt446.0119.82.6×
greedy, 19-token code request446.0102.72.2×
greedy, 215-token summarization request445.756.81.2×
temperature 0.7, 5-token prompt442.8100.72.4×
greedy, 5-token prompt226.772.22.7×
greedy, 19-token code request226.761.92.3×
greedy, 215-token summarization request226.638.61.5×
temperature 0.7, 5-token prompt225.653.52.1×

The greedy text is the same with and without the draft, except for what the model writes on two chips after it has finished answering the summarization request (the requests ignore the end-of-sequence token). The speedup depends on how many of the proposed tokens the model accepts, which varies with the text: it is smallest on the summarization request. Sampling at temperature 0.7 keeps most of it.

SGLang-JAX supports it since pull request #9. To turn it on, add these flags to the launch command and remove --disable-overlap-schedule:

  --speculative-algorithm EAGLE \
  --speculative-draft-model-path Qwen/Qwen3.8-27B \
  --speculative-num-steps 5 \
  --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 6 \
  --grammar-backend none \
  --max-total-tokens 4096

The draft model path is the model itself: SGLang-JAX loads its MTP layer and shares the model's embedding and LM head. We measured the numbers above with overlap scheduling, JAX_DEFAULT_PRNG_IMPL=unsafe_rbg and the same libtt and SGLang-JAX as above, without the draft as well as with it.

SGLang-TorchTPU runs the MTP layer as the draft too, with 3 draft tokens a step. The same requests, in tokens per second:

RequestChipsWithout draftWith draftSpeedup
greedy, 5-token prompt442.082.32.0×
greedy, 19-token code request442.082.22.0×
greedy, 215-token summarization request441.872.71.7×
temperature 0.7, 5-token prompt439.661.61.6×
greedy, 5-token prompt225.350.22.0×
greedy, 19-token code request225.348.91.9×
greedy, 215-token summarization request225.346.51.8×
temperature 0.7, 5-token prompt224.435.91.5×

As with SGLang-JAX, the model accepts about 3 tokens per step. The greedy text with the draft is the same as without it until a near-tie between two tokens goes the other way, after 130 to 460 characters (the 5-token prompt's text on two chips is the same throughout). Sampling at temperature 0.7 with top_p: 0.95 and top_k: 20 as well decodes 53.7 tokens/s on four chips and 43.2 on two. Sampled speeds vary from run to run with the text the samples happen to write, which the draft predicts best when it repeats itself. To turn it on, add these flags to the SGLang-TorchTPU launch command:

  --speculative-algorithm NEXTN \
  --speculative-num-steps 3 \
  --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 4

SGLang-TorchTPU doesn't need a separate draft model path: it loads the checkpoint's MTP layer. We measured with the same SGLang-TorchTPU and libtt as above.

DFlash

DFlash speculative decoding works on one chip with Qwen3 models. Here is Qwen3-8B with the z-lab/Qwen3-8B-DFlash-b16 draft model, in tokens per second:

PromptWithout draftWith draftSpeedup
19-token code request44.6114.72.6×
215-token summarization request43.858.31.3×

To turn it on, add these flags to the launch command:

  --speculative-algorithm DFLASH \
  --speculative-draft-model-path z-lab/Qwen3-8B-DFlash-b16 \
  --speculative-num-steps 1 \
  --speculative-eagle-topk 1 \
  --grammar-backend none \
  --max-total-tokens 4096

Keep --disable-overlap-schedule from the recipe with these flags: SGLang-JAX only runs DFlash with overlap scheduling when --speculative-num-draft-tokens is one more than --speculative-num-steps. We measured the numbers above with --disable-overlap-schedule and the same libtt and SGLang-JAX as above.

SGLang-TorchTPU runs DFlash on one chip too. Qwen3-8B-FP8 with the same draft, in tokens per second:

PromptWithout draftWith draftSpeedup
19-token code request44.395.22.1×
215-token summarization request43.657.01.3×

The draft model accepts 3.1 tokens per step. The greedy text is the same as without the draft until a near-tie goes the other way, after 193 and 200 characters. Add --speculative-algorithm DFLASH --speculative-draft-model-path z-lab/Qwen3-8B-DFlash-b16 --max-total-tokens 4096 to the SGLang-TorchTPU launch command.

Run a model

Start from the multi-chip command in the inference recipe and change --model-path and --tp-size. If your requests sample, also set JAX_DEFAULT_PRNG_IMPL=unsafe_rbg (see Sampling). The mixture-of-experts models also need --moe-backend fused. Qwen3.5 and Qwen3.8 also need CPU builds of PyTorch and torchvision; add --with "torch" --with "torchvision" --index "https://download.pytorch.org/whl/cpu" --index-strategy unsafe-best-match.

Qwen3.8-Flash-Next also needs safetensors with pull request #862 until it is merged, so that its weights stay in the memory-mapped checkpoint instead of being copied into RAM. SGLang-JAX pins an older safetensors, which uv run can't override, so install everything into an environment with the override instead (building safetensors from source needs a Rust toolchain):

echo 'safetensors @ git+https://github.com/pcmoritz/safetensors.git@numpy-zero-copy#subdirectory=bindings/python' > overrides.txt
uv venv --python 3.12 flash-next
uv pip install --python flash-next/bin/python \
  "sglang-jax @ git+https://github.com/relativity-project/sglang-jax.git#subdirectory=python" \
  "jax-tt-plugin" "jax==0.11.1" "jaxlib==0.11.1" "torch" "torchvision" \
  --index "https://download.pytorch.org/whl/cpu" \
  --index-strategy unsafe-best-match \
  --override overrides.txt

Then run the multi-chip command with flash-next/bin/python -m sgl_jax.launch_server in place of uv run ... -m sgl_jax.launch_server, with --model-path Qwen/Qwen3.8-Flash-Next and --tp-size 4.

How we measure

serving_bench.py takes this page's measurements against a running server, SGLang-JAX or SGLang-TorchTPU, launched as described above. It needs only Python's standard library:

curl -fLO https://relativity.cc/examples/serving_bench.py
python3 serving_bench.py single --sampled   # one request at a time
python3 serving_bench.py batched            # 1, 4, 8 and 16 requests at once
  • Requests: every request streams its output and generates exactly 128 tokens, greedy (temperature: 0) unless it samples, with ignore_eos so that it doesn't stop early. The prompts are The capital of France is (5 tokens), a 19-token code request and a 215-token summarization request; the script has their text.
  • Single requests: each prompt runs twice to warm up and then five times, and the tables show the medians. Decode is the 5-token prompt's tokens after the first, divided by the time from its first streamed token to its last. First token is the time from sending the 215-token prompt to its first streamed token, so it includes the prefill. Sampled decode uses the 5-token prompt. MTP and DFlash use the same measurement with the code and summarization requests as well.
  • Batched: the script sends n copies of the code request at once. Total throughput is the requests' 128 × n tokens divided by the time from sending them until the last one finishes, so it includes the prefills and any wait for a free slot. Per user is the median of the requests' decode rates, each measured from the request's own first token, as for single requests. Total is therefore lower than n times per user; at 16 requests, the prefills take a larger share of the time. Each request count first runs two warmup batches, and more until two in a row return every first token within two seconds, since a server compiles programs for new batch shapes when it first sees them. The tables show the median of the three batches after that.

Each configuration gets a fresh server on chips that were just reset.

Known gaps

  • DFlash doesn't compile on more than one chip yet, and doesn't support Qwen3-14B, Qwen3.5 or Qwen3.8 drafts.
  • SGLang-JAX doesn't run the MTP layers of mixture-of-experts checkpoints as drafts yet.
  • To use a single chip of a QuietBox, you need a single-chip mesh descriptor in TT_MESH_GRAPH_DESC_PATH.
  • Qwen3.8-Flash-Next's first request after a start takes about two minutes, while its weights are read from the checkpoint and prepared on the chips.
  • Qwen3.8-Flash-Next's QSA layers attend densely, which matches the model only while a request's context is at most 2,051 tokens.