Basics · Sigmoid Calibration · 128 vs 512 Window · Dynamic Int8 Padding Audit

Threshold, Token Window & Padding Calibration

Explore three core mechanics documented in the zgpu-ai/zlm-v1-iab-classify-edge model card: how independent sigmoid thresholds control Content vs Audience density, what changes between the 128-token serving window and the 512-token training window, and why disabling fixed-128 [PAD] tokens stabilizes dynamic int8 scores.

1. Three-Pass Calibration Run

Select a short reference, a >128-token topic-shifting article, or a mixed-domain paragraph:

0.50
6
WordPiece Length–
128 Unpadded Top–
Fixed-128 Pad Drift–
512 Extended Top–
Total Latency (3 passes)–
NaN Count–

2. Sigmoid Threshold Density Curve (τ = 0.10 → 0.90)

Active Labels vs Threshold

128-token unpadded pass

Threshold Sweep Table

Exact counts across 2,271 labels
Count of Content and Audience labels exceeding each sigmoid threshold
Threshold τ Content ≥ τ Audience ≥ τ Total

3. Side-by-Side Mode Comparison

A · Production (128 Unpadded)

Recommended default

Run calibration to view production unpadded predictions.

B · Fixed-128 Padded

Measures dynamic int8 drift

Run calibration to measure how trailing [PAD] tokens nudge QUInt8 logits.

C · Extended (512 Tokens)

Training context length

Run calibration on a >128-token article to see late-document topics emerge.

4. Inspect 3-Pass Calibration Worker

Show the code · worker.js — handleCompareModes() (128 unpadded vs fixed-128 padded vs 512)