clairic-27b-fp8-sm120 — Block-128 Dynamic W8A8 FP8 (E4M3) for NVIDIA RTX PRO 6000 (SM120)

Full Technical Specification & Benchmark Report: Read ENGINEERING_REPORT.md in geudrik/clairic-sm120-serve for the complete SM120 architecture specification, custom Triton kernel microbenchmarks, 3-repeat concurrency sweeps (N = 32), 8-case selection and 12-case disjoint held-out calibration tables, and controlled ablations.

geudrik/clairic-27b-fp8-sm120 is a Block-128 Dynamic W8A8 FP8 (float8_e4m3fn weights with 128x128 BF16 scales and dynamic per-token-group activation quantization) checkpoint of Cloudflare/clairic for concurrent multimodal extraction, tabular JSON parsing, and ClairicHead typed readout (compute, duration, estimate, forecast) on NVIDIA RTX PRO 6000 Blackwell (sm_120, 95.03 GiB visible GDDR7).

Served through geudrik/clairic-sm120-serve under the published CLI defaults (--kv-cache-dtype auto --mem-fraction-static 0.80 --max-mamba-cache-size 180 --max-running-requests 48 --chunked-prefill-size 16384 --pool-size 24, measured across 3 repeats at N = 32 requests per concurrency level):

  • Size: Compresses model-*.safetensors from 51.75 GiB (55.56 GB) to 28.75 GiB (30.87 GB, 1.80x smaller, -23.00 GiB), or 52.02 GiB to 29.02 GiB (1.79x smaller) including the bundled 276.95 MiB (290.41 MB) FP32 clair_head.safetensors. Requires no calibration dataset.
  • Reference Agreement & Concurrent (C > 1) Stability: Recommended checkpoint for concurrent C > 1 production serving. Matches 51/51 selection-suite fields and 79/79 disjoint held-out fields across all 3/3 repeats under the suite tolerances (exact discrete/structured match, 1e-6 float match, and all 11/11 estimate/forecast fields within 1.86% of the BF16 reference), matching the BF16 reference's ground-truth scores (45/47 selection, 66/71 held-out), and achieves 0 / 30 (0.0%) failures in the C = 2 concurrent mixed-invoice batching stress test where 4-bit E2M1 step amplification flips borderline list prompts on clairic-27b-nvfp4-sm120.
  • Probability Calibration: 3-run median mean absolute confidence difference of 0.0064 (3-run max 0.1408, 0/47 flips at 0.50) on the selection suite and 0.0125 (3-run max 0.2597, 1/72 flip at 0.50) on the 12-case held-out suite; 3-run median mean absolute p_null difference of 0.00005 / 0.00687.
  • Concurrent Throughput: Reaches 1.318 req/s ([1.298–1.323], 8.40 fields/s, 5.87x over the 0.225 req/s TransformersEngine reference) at C = 8 (p50 = 5.60 s, p95 = 11.08 s; disabling the fused greedy sampler reaches 1.339 [1.328–1.342] req/s at C = 8 with identical 51/51 and 79/79 parity).

Companion Repositories


1. Quantization Specification

The 407 eligible 2D linear weight matrices whose dimensions are divisible by 128 (1024, 4096, 5120, 6144, 10240, 12288, 17408) are quantized to float8_e4m3fn with BF16 weight_scale_inv grids of shape [out_features // 128, in_features // 128] and "activation_scheme": "dynamic" (W8A8):

Component Precision / Format Matrices Notes
Dense SwiGLU MLPs (gate_proj, up_proj, down_proj) float8_e4m3fn + 128x128 BF16 weight_scale_inv (W8A8 dynamic) 192 (64 blocks) Halves MLP weight bytes without calibration data
Gated DeltaNet projections (in_proj_qkv, in_proj_z, out_proj) float8_e4m3fn + 128x128 BF16 weight_scale_inv (W8A8 dynamic) 144 (48 blocks) Linear-attention projections divisible by 128
Gated Full Attention (q_proj, k_proj, v_proj, o_proj) float8_e4m3fn + 128x128 BF16 weight_scale_inv (W8A8 dynamic) 64 (16 blocks) Preserves head_dim = 256 GQA accuracy
Inactive MTP layer (mtp.layers.0.{mlp,self_attn}) float8_e4m3fn + 128x128 BF16 weight_scale_inv 7 Retained from Shard 18 (mtp_num_hidden_layers: 0)
Gated DeltaNet recurrences (in_proj_a, in_proj_b, conv1d, A_log, dt_bias, norms) BF16 / FP32 (unquantized) All 48 blocks in_proj_a and in_proj_b have 48 output rows (excluded from block-128 quantization)
lm_head, embed_tokens, and 27-layer ViT (model.visual.*) BF16 (unquantized) 2 + full ViT Preserves post-mask confidence, p_null, read_slots, and OCR
clair_head.safetensors (ClairicHead) FP32 (276.95 MiB / 290.41 MB) 72.6M params Loaded on GPU by maybe_run_extend (TF32 linear + BF16 router KV)

2. Benchmarks on NVIDIA RTX PRO 6000 (sm_120, 95.03 GiB Visible)

Conditions: 1x NVIDIA RTX PRO 6000 Blackwell Server Edition (driver 620.70.06, 2,430 MHz max graphics clock), lmsysorg/sglang:v0.5.23-cu130 (sglang 0.5.23, torch 2.14.1+cu130, triton 3.8.0, flashinfer 0.7.2). Comparison tolerances: exact for discrete/list/object, isclose(rel_tol=1e-4, abs_tol=1e-2) for floats, <= 8% for estimate/forecast. Raw JSONs are bundled in benchmarks/results/v2_audit/.

2.1 Concurrent Scaling, Parity, and Calibration (N = 32 Requests / Concurrency Level)

Configuration (KV / mem_frac / mamba / pool) Size (Backbone / Total) Selection Match (51) / GT (47) Held-Out Match (79) / GT (71) Mean (3-Run Max) Abs Δ Conf (Sel / Held) C=1 req/s (p50/p95) C=8 req/s (p50/p95) C=16 req/s (p50/p95) C=32 req/s (p50/p95)
Ref TransformersEngine BF16 (sdpa, Semaphore(1)) 51.75 / 52.02 GiB Ref 51/51 / 45/47 Ref 79/79 / 66/71 0.0000 (0.0000) / 0.0000 (0.0000) 0.225 (2.27 / 17.62 s) 0.225 (35.59 / 35.67 s) 0.225 (71.22 / 71.28 s) 0.225 (72.26 / 141.85 s)
SGLang BF16 (auto / 0.85 / 150 / 24)* 51.75 / 52.02 GiB 51/51 / 45/47 79/79 / 66/71 0.0037 (0.0585) / 0.0069 (0.1208) 0.560 (1.62 / 3.99 s) 0.856 (8.76 / 17.24 s) 0.681 (18.57 / 38.13 s) 0.691 (36.01 / 46.21 s)
clairic-27b-fp8-sm120 CLI Defaults (auto / 0.80 / 180 / 24, 3x med) 28.75 / 29.02 GiB 51/51 / 45/47 79/79 / 66/71 0.0064 (0.1408) / 0.0125 (0.2597) 0.842 (1.00 / 2.57 s) 1.318 (5.60 / 11.08 s) 1.259 (11.53 / 21.97 s) 1.137 (23.69 / 28.04 s)
clairic-27b-fp8-sm120 No Fused Sampler (auto / 0.80 / 180 / 24, 3x med) 28.75 / 29.02 GiB 51/51 / 45/47 79/79 / 66/71 0.0064 (0.1408) / 0.0125 (0.2597) 0.842 (1.00 / 2.57 s) 1.339 (5.57 / 11.06 s) 1.285 (10.90 / 21.76 s) 1.033 (25.90 / 30.85 s)
clairic-27b-nvfp4-sm120 CLI Defaults (auto / 0.80 / 180 / 24, 3x med) 20.85 / 21.12 GiB 50/51 / 44/47 76/79 / 69/71 0.0338 (0.6860) / 0.0577 (0.7974) 1.076 (0.75 / 2.13 s) 1.768 (4.09 / 8.82 s) 1.733 (8.35 / 15.33 s) 1.420 (17.98 / 22.48 s)
Ablation: FP8 + NEXTN MTP (auto / 0.85 / 90 / 24) 28.75 / 29.02 GiB 48/51 / 43/47 73/79 / 61/71 0.0822 (0.8690) / 0.1429 (0.9620) 0.958 (0.80 / 2.45 s) 1.115 (7.24 / 11.38 s) 0.839 (17.41 / 31.03 s) Not run (max_run=24)

*sglang_bf16_auto_kv_v2 logged one recoverable CUDACachingAllocator OOM cache-flush warning at C = 32; all clairic-27b-fp8-sm120 runs logged zero OOM warnings.

2.2 Warm Per-Case Single-Request Latencies (3-Run Medians)

Case ID Modality & Schema Fields Ref TransformersEngine clairic-27b-fp8-sm120 (3x Med) Speedup
case1_text_invoice Text scalars + list + enum 9 3.20 s 0.89 s 3.61x
case2_text_table_objects Markdown table object list 4 2.45 s 1.11 s 2.21x
case3_image_receipt Receipt PNG + line-item objects 7 6.13 s 1.56 s 3.92x
case4_two_page_po_images 2-page PO PNGs (85,525 input tok) 8 17.76 s 2.38 s 7.47x
case5_clairic_head_typed compute, duration, estimate, forecast 5 0.21 s 0.13 s 1.65x
case6_hybrid_multimodal_ar_and_head Receipt PNG + AR + ClairicHead 5 7.12 s 0.54 s 13.23x
case7_long_context_mixed 2,358-token operations report 9 5.57 s 2.57 s 2.16x
case8_compact_triage Compact 4-field triage 4 0.52 s 0.27 s 1.94x
ho04_scan_thermal_receipt_image Skewed noisy JPEG receipt 7 6.35 s 1.84 s 3.46x
ho06_two_page_eco_images 2-page skewed JPEG ECO (82,265 tok) 7 17.32 s 2.33 s 7.42x

2.3 SM120 Triton Kernel Microbenchmarks

Kernel / Subsystem Shape & Condition Reference SM120 Kernel Speedup Peak Extra HBM
fused_span_argmax_prob F = 8, S = 65,273, W = 64 1.777 ms 0.064 ms 27.77x 257.99 -> 0.13 MiB
run_fused_greedy_logprob (sampler microbench) B = 1 .. 64, V = 248,320 BF16 0.085 – 1.146 ms 0.120 – 0.263 ms 0.71x – 4.36x 30.34 -> 0.06 MiB (@B=64)
fast_read_slots rows = 1024, H = 5120, V = 248,320 14.236 ms 6.955 ms 2.05x 606.26 -> 485.01 MiB
ClairicHead (S = 34,808, GPU / E2E w/ CPU) 6 typed fields, 3 seeds (randn * 0.1) 704.35 / 2,224.14 ms 14.64 / 1,568.33 ms 48.11x GPU / 1.42x E2E 1,786.54 -> 608.62 MiB

3. SGLang v0.5.23 Unified Diff Set (patches/)

patches/sglang-v0.5.23-clairic-sm120.patch and patches/apply_sglang_patch.py are bundled in this repository:

python3 patches/apply_sglang_patch.py --check
python3 patches/apply_sglang_patch.py
  1. LogitsProcessor.forward (CLAIRIC_HEAD_DIR): On TP rank 0, intercepts read_typed EXTEND passes tagged via token_ids_logprobs = [248319, 248318, hi, lo] (two unassigned tail sentinel IDs + two in-range IDs carrying the integer tag), runs fast_read_layout_gpu_only using the unquantized BF16 lm_head.weight, writes the compact FP32 readout vector (3.8–132.8 KiB) to /dev/shm, and evicts stale chunks older than 120 s on subsequent LogitsProcessor calls.
  2. Sampler.forward (CLAIRIC_FUSED_SAMPLER=1): Executes run_fused_greedy_logprob on post-grammar-mask greedy batches without an extra kernel bitmask (not SGLANG_RETURN_ORIGINAL_LOGPROB), avoiding [B, 248,320] log_softmax allocations (<= 1.56e-5 end-to-end logprob difference vs SGLang's default sampler).

4. Serving and Reproduction Instructions

4.1 Concurrent Serving on NVIDIA RTX PRO 6000 (sm_120)

git clone https://huggingface.co/geudrik/clairic-sm120-serve
pip install -e ./clairic-sm120-serve
hf download geudrik/clairic-27b-fp8-sm120 --local-dir /models/clairic-27b-fp8-sm120
python3 /models/clairic-27b-fp8-sm120/patches/apply_sglang_patch.py

# Mode A (CLI Default — recommended for multi-field AR + multimodal + ClairicHead workloads)
clairic-sm120-serve \
  --model-path /models/clairic-27b-fp8-sm120 \
  --kv-cache-dtype auto \
  --mem-fraction-static 0.80 \
  --max-mamba-cache-size 180 \
  --max-running-requests 48 \
  --chunked-prefill-size 16384 \
  --pool-size 24 \
  --port 8000

# Mode B (Single-pass ClairicHead or 1-field workloads ONLY — disables intra-request prefix sharing)
clairic-sm120-serve \
  --model-path /models/clairic-27b-fp8-sm120 \
  --disable-radix-cache \
  --kv-cache-dtype auto \
  --mem-fraction-static 0.72 \
  --max-mamba-cache-size 96 \
  --max-running-requests 96 \
  --chunked-prefill-size 16384 \
  --pool-size 32 \
  --port 8000

4.2 Reproduce Quantization and Benchmarks

git clone https://huggingface.co/geudrik/clairic-sm120-serve /workspace/clairic-sm120-serve
cd /workspace/clairic-sm120-serve
pip install --no-deps -e .
python3 patches/apply_sglang_patch.py

# 1. Regenerate this 28.75 GiB (29.02 GiB total) Block-128 Dynamic FP8 checkpoint
python3 quantization/quantize_fp8_block128.py \
  --src-dir /models/clairic \
  --dst-dir /tmp/clairic-fp8 \
  --scale-dtype bfloat16

# 2. Reproduce 3-repeat CLI-default evaluation across both selection (8-case) and held-out (12-case) suites
python3 benchmarks/bench_sglang_engine.py \
  --label sglang_fp8_cli_defaults_v2 \
  --model-path /tmp/clairic-fp8 \
  --head-source-path /tmp/clairic-fp8 \
  --golden-json benchmarks/results/v2_audit/golden_workload_v2.json \
  --heldout-golden-json benchmarks/results/v2_audit/golden_heldout_v2.json \
  --output-json /tmp/sglang_fp8_cli_defaults_v2.json \
  --pool-size 24 \
  --kv-cache-dtype auto \
  --mem-fraction-static 0.80 \
  --max-mamba-cache-size 180 \
  --max-running-requests 48 \
  --chunked-prefill-size 16384 \
  --requests-per-c 32 \
  --repeats 3

5. Qualification Scope and Limitations

  • Qualified: 1x NVIDIA RTX PRO 6000 Blackwell Server Edition (sm_120, 95.03 GiB visible), lmsysorg/sglang:v0.5.23-cu130, the CLI-default configuration above across 3 repeats on the 8-case selection and 12-case held-out suites.
  • MTP (mtp_num_hidden_layers: 0): Leave mtp_num_hidden_layers at 0. Enabling NEXTN corrupts ClairicHead readouts (48/51 selection, 73/79 held-out; hypothesized to stem from the draft worker's step-0 LogitsProcessor overwriting /dev/shm outputs), flips held-out AR text confidences across 0.50, and reduces C = 8 / C = 16 throughput by 15.4% / 33.3%.
  • Untested: tp_size > 1, GPUs other than sm_120 (Block-128 FP8 targets sm_90/sm_100/sm_120 but was measured only on sm_120), Mode B on FP8 (measured on NVFP4+FP8), fix_mistral_regex=True tokenizer loading, live HTTP sweep on FP8, and multi-hour production soak runs.
Downloads last month
165
Safetensors
Model size
28B params
Tensor type
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for geudrik/clairic-27b-fp8-sm120

Base model

Qwen/Qwen3.8-27B
Quantized
(9)
this model