# Dedicated Q8 runtime, ported to accept a cut vocabulary The shipped dedicated runtime (`deployment/qwen35-specialized-v3` in the research repository) is a patched llama.cpp that fuses this architecture's recurrent path and runs the 14-label head natively. It refused any vocabulary other than 128,000 at two points: | where | check | |---|---| | `qwen35-classifier.cpp` | `llama_vocab_n_tokens(...) != 128000` -> throw | | `src/models/qwen35.cpp` | `GGML_ASSERT(n_layer == 4 && n_embd == 1024 && tok_embd->ne[1] == 128000)` | Both are model-identity guards, not computational dependencies: the specialised tail keeps the last four token rows and skips `inp_out_ids`, and reads `n_embd`, `n_cls_out`, `n_seqs` and `n_tokens` only. The hand-written Q8 kernels operate on hidden 1024. The two files here are those sources with the vocabulary equality relaxed; architecture, depth and width are still enforced. ## What was measured after the port Three vocabulary cuts load and run at full specialisation level, with output **bit-identical** to the generic path, and lower native compute: | cut | tokens in probe | level 0 | level 12 | change | |---|---:|---:|---:|---:| | v16k | 33 | 14.94 ms | 10.68 ms | -28.5% | | v32k | 25 | 11.47 ms | 7.36 ms | -35.8% | | v64k | 23 | 10.32 ms | 7.26 ms | -29.7% | Token counts differ per cut for the same sentence, so compare within a row, not across rows. ## Boundaries - This is a development port. It has not been through the v3 validation scripts (`validate_runtime.py`, `validate_reload.py`, `validate_threads_service.py`). - The timings above are single-sentence native compute medians on a host with a desktop session running, not the benchmark's isolated document-level protocol. **No number in the model card came from this runtime**; those came from the benchmark's own `profile_inference.py`. - The runtime needs a GGUF **with a classification head**. The repository root is headless, so train a head first and convert that checkpoint. - aarch64 / A53 NEON variants were not built or tested. - The five binaries of the frozen v3 build are unchanged; every sha256 still matches. ## Files | file | sha256 | |---|---| | `qwen35-classifier.cpp` | `76ede06e20b4f23fb57799e93ac4cafd0d02f068c1215bb30f7ce53c7ae76eba` | | `qwen35.cpp` | `10453eaae33efaa53790d6e28ed72459342927b86e9ff888db11527b36d74225` |