tensorfish/squid5090
À propos
Highly Optimized Inference Engine for Inkling Mini 2 on NVIDIA 5090
IA et apprentissage automatiqueProgression mesurée des étoiles
- in 24h
- +1
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalsquid5090
A single-binary, zero-Python TigerStyle Zig + Blackwell CUDA (sm_120a) text & vision inference engine and OpenAI-compatible HTTP/SSE server for thinkingmachines/Inkling-2-Mini on an NVIDIA RTX 5090.
Upfront Attribution: Several core Blackwell kernel designs and features in
squid5090— including Programmatic Dependent Launch (PDL) overlap, 16-CTA cluster DSMEM/mbarrierBF16 controllers & single-pass router, single-barrierwarp_reduce_scatter/block_sum_bcast, 1-launch cluster DSMEM decode attention (attn_cluster_decode_kernel), coalesced 128B-sectoruint4MXFP8 BF16 Tensor Core MoE decode, spill-free 16-columnU=3FP8/NVFP4mma.m16n8k16GEMVs & LM-head, 128-CTA multi-block stochastic LM-head sampling with 64-bit Gumbel, Top-K1024radix Markov drafting with an embedded corpus-frequency shortlist (src/draft_shortlist.bin) + dynamic context shortlist, the128×128×64cp.asyncMoE prefill pipeline, device-side{2, 4, 8}CUDA Graph conditional switch drafting (cudaGraphCondTypeSwitch), the native 23-layer BF16 Vision Tower (model.visual.*) & image preprocessing contract, and the 1.8 MB runtime-gated Fisher-LDA abliteration format & tooling — were adapted fromsatellitedown/inkling-2-mini-abliterated-ingine(Apache-2.0). Image decoding uses vendoredstb_image.h(MIT/Public Domain) and optionallibwebp(BSD-3-Clause). Opt-in prompt-lookup drafting was inspired byAtomicBot-ai/atomic-engine, and the roofline workflow followssybil-solutions/inference-optimisation-skill. Full attributions live inNOTICE.

Deep Dives:
LITE.md— Plain-English, 3Blue1Brown-style animated guide to GPU roofline optimization, speculative decoding, and geometric Fisher-LDA abliteration.LEARNINGS.md— Complete technical reference: CUDA kernels, roofline math, KLD/quality analysis, remaining optimization headroom, and theuvabliteration pipeline.
Benchmarks & Quality (Single RTX 5090, c=1)
All numbers below are measured directly on one RTX 5090 (32 GiB GDDR7) with squid5090's built-in bench, kld, and generate commands. Every precision mode is evaluated for exact FP64 KL divergence vs. the unmodified exact / bf16 checkpoint on the checked-in tools/kld_corpus.txt (7,784 tokens, 7.6× past the 1,024-token local sliding window so all 8 quantized global KV layers are directly tested).
1. Precision × Long-Context Quality (KLD) × Decode Throughput (mtp=7, Adaptive {2,4,8} DSpark, Vision ON)
| Mode / KV | Mean KLD (7,784 tok) | Top-1 Match | PPL (Ref 2.7048) |
Code (T=0.0 / T=1.0) |
Code-Copy (T=0.0 / T=1.0) |
Chat (T=0.0 / T=1.0) |
Prose (T=0.0 / T=1.0) |
Weight VRAM (+Vision) |
|---|---|---|---|---|---|---|---|---|
exact / bf16 (official) |
0.0000 | 100.00% | 2.7048 | 246.7 / 225.2 tok/s | 419.2 / 237.2 tok/s | 229.0 / 217.1 tok/s | 201.9 / 191.0 tok/s | 18.28 GiB (18.88) |
exact / fp8 |
0.0035 | 98.39% | 2.7007 | — | — | — | — | 18.28 GiB (18.88) |
exact / q4 |
0.0078 | 97.15% | 2.7063 | — | — | — | — | 18.28 GiB (18.88) |
fp8 / fp8 (default ≤448K) |
0.0059 | 97.40% | 2.6981 | 425.6 / 442.5 tok/s | 545.1 / 477.5 tok/s | 340.2 / 316.1 tok/s | 321.3 / 313.2 tok/s | 17.11 GiB (17.71) |
fp8 / q4 (default 512K) |
0.0093 | 96.69% | 2.7105 | 412.4 / 460.3 tok/s | 540.5 / 519.4 tok/s | 334.4 / 333.6 tok/s | 313.3 / 307.2 tok/s | 17.11 GiB (17.71) |
nvfp4 / fp8 |
0.0230 | 94.99% | 2.7485 | — | — | — | — | 14.66 GiB (15.26) |
nvfp4 / q4 (opt-in max speed / 1M) |
0.0267 | 94.58% | 2.7569 | 425.2 / 424.6 tok/s | 508.4 / 490.9 tok/s | 398.2 / 350.3 tok/s | 339.3 / 324.9 tok/s | 14.66 GiB (15.26) |
- Accuracy-first default (
--mode fp8):squid5090 servedefaults to--mode fp8(keeping ALL 24 MoE expert layers in 100% official checkpoint precision — L0–19 NVFP4 + L20–23 MXFP8 via coalesced 128B-sectoruint4BF16 Tensor Core MMA — plus official BF16 routers/controllers in single-pass 16-CTA DSMEM cluster kernels, 1-launch cluster decode attention, CUDA 13.4+L2::evict_firststreaming loads, spill-free 16-colU=3FP8 MMA attention +lm_head, nativesm_120ablock-scaled MoE + FP8cublasLtprefill, and FP8 DSpark with an embedded corpus-frequency 32K shortlist (src/draft_shortlist.bin) + 16K dynamic context extension and Top-K1024exact BF16 Markov folding). This delivers0.0059–0.0093long-context KLD (ΔPPL -0.0068to+0.0056over 7,784 tokens — 9× smaller PPL delta than 4-bit) while reaching545.1 tok/sT=0.0copy,442.5–460.3 tok/sT=1.0code,519.4 tok/sT=1.0copy (fp8/q4),29/30(96.7%) on 30-task reasoning, and17,741 tok/sHTTP (18,318 tok/sCLI,20,007 tok/sB=2048chunk peak) cold 18.9K prefill! - Temperature transparency:
benchdefaults to--temp 0.0(greedy);servedefaults to--temp 1.0 --top-p 0.95(matching Inkling-2-Mini's officialgeneration_config.json), using exact Leviathan/Chen stochastic rejection sampling (q_i(v)drafted from DSpark + residual resampling from $\mathrm{norm}(\max(0, p - q))$ inside the CUDA Graph). With the embedded corpus-frequency 32K shortlist, pure overlapped DSpark outperforms CPU 3-gram lookup on general workloads, so--prompt-lookupis now opt-in for verbatim RAG/copy bursts. - Native Vision Tower (
model.visual.*, ON by default inserve): Loads all 422 BF16 vision tensors (~609 MiBinside the single weightVRAMArena, zero permanent workspace VRAM) and encodes a320×200image in4.4 msvia cuBLAS BF16 Tensor Core GEMMs, with automatic0.0 msmulti-turn prefix-cache reuse via content-addressed negative synthetic token IDs. Pass--no-visionto save~609 MiBVRAM on text-only deployments. - Short- vs. long-context KLD: On 529-token prompts (inside the 1,024-token BF16 local window), KLD is
0.0030(fp8/fp8),0.0050(fp8/q4), and0.0184(nvfp4/q4). At 7,784 tokens (7.6× past the local window, shown above),q4global KV adds only+0.0034KLD overfp8KV (ΔPPL +0.0056infp8/q4). - Choosing a mode: Keep the default
--mode fp8(--kv autoselectsfp8≤ 448K andq4at 512K–1M) for near-lossless accuracy (0.0059–0.0093KLD,313–545 tok/s,512K+ vision in22.87 GiBwith--embed-host); opt in to--mode nvfp4 --kv q4when you want peak greedy chat speed (398.2 tok/s) or 1M context in23.5 GiB.
2. Real Long-Context Recall vs. Synthetic 1M Step-Latency Scaling (--mode nvfp4 --kv q4)
Real prefilled single-needle passkey retrieval (planted at 50% prompt depth) is reported separately from synthetic zeroed-KV step latency (squid5090 longctx):
| Context Depth | Test Type | Prefill Latency / Rate | Decode Speed (c=1) |
Total VRAM (0 spill) | Result / Note |
|---|---|---|---|---|---|
20K (19,978 tok) |
Real cold prefill | 2,282 ms (8,755 tok/s) |
453.6 tok/s | 16.7 GiB | 9,181 tok/s B=2048 chunk peak |
64K (65,530 tok) |
Real prefilled Needle (50% depth) | 8.46 s (7,742 tok/s) |
318–331 tok/s | 16.7 GiB | Verbatim recall PASS |
128K (131,057 tok) |
Real prefilled Needle (50% depth) | 21.89 s (5,988 tok/s) |
166.6 tok/s | 17.4 GiB | Verbatim recall PASS (COBALT-FALCON-7492) |
256K (262,115 tok) |
Real prefilled Needle (50% depth) | 57.29 s (4,575 tok/s) |
123.9 tok/s | 17.9 GiB | Verbatim recall PASS (OBSIDIAN-HERON-3815) |
512K (523,961 tok) |
Real prefilled Needle (50% depth) | 171.13 s (3,062 tok/s) |
74.4 tok/s | 20.3 GiB | Verbatim recall PASS (VERMILION-LYNX-9064) |
1M (1,048,000 tok) |
Synthetic longctx (zeroed KV) |
— | 45.7 tok/s (B=1, 21.86 ms/tok)102.4 P1 / 108.0 P0 ( B=4 @dl=2.5) |
23.23 GiB | Real KV allocation & step latency; @dl=2.5 is synthetic multiplier |
| Warm 16K / 82.5K turn | Real HTTP prefix cache | 71.9 ms / 62.4 ms |
446.7 / 237.5 tok/s | 23.2 GiB | Host-RAM local checkpoints (0 extra VRAM); 32 MiB static HTTP buffer |
3. LoopCD-Hidden Contrastive Decoding (arXiv:2610.02185)
Inkling-2-Mini runs its 12-layer recurrent core (L6..L17) for $R = 3$ passes ($h_1 \to h_2 \to h_3$) before entering the 6-layer Coda (L18..L23). squid5090 implements LoopCD-Hidden (Eq. 2 of Liu et al., 2026) directly inside the existing Loop→Coda mega-fusion kernel (mega_mlp_post_next_depth_norm_kernel at visit 42) with zero extra CUDA kernel launches, zero extra KV cache, zero CUDA Graph rebuilds on per-request changes, and automatic prefix-cache invalidation whenever loopcd_omega or loopcd_ref changes:
$$h' = h_3 + \omega,(h_3 - h_b), \qquad b \in {1, 2}$$
- Zero-overhead & lossless verification: When $\omega = 0.0$ (default), the kernel skips the
fmafcleanly (0.000000delta vs. baseline;fp8/q4KLD stays0.009574). When $\omega > 0$,exactmode retains 100% bit-exactmtp=0 == mtp=7parity, andfp8/q4(T=1.0,mtp=7) decode throughput stays equal or slightly faster (247.5 → 260.4 tok/sat $\omega = 0.2$,acc: 49.2% → 52.5%). - Empirical RTX 5090 sweep (
fp8/q4, 30-task Math + Code + Logic benchmark & 7,784-tok KLD):- Thinking mode (
enable_thinking=true, default): $\omega \in {0.1, 0.2}$ with $h_b = h_1$ (and $\omega = 0.3$ with $h_2$) lifts accuracy from25/30 (83.3%)→27/30 (90.0%, +6.7 pts)(10/10Math,10/10Logic,7/10Code), with $\omega = 0.1$ using 5.5% fewer thinking tokens (11,893vs12,584) and raising 7,784-tok top-1 match (96.93% → 96.96%,ΔPPL +0.0065). Above $\omega \ge 0.5$, generation degrades (24/30), matching Appendix G.1 of the paper. - Direct mode (
enable_thinking=false): Unmodified baseline ($\omega = 0.0$) scores29/30 (96.7%)vs27–28/30at $\omega \in [0.2, 0.5]$, sosquid5090keeps--loopcd-omega 0.0as the opt-in default and exposes--loopcd-omega/--loopcd-refon both CLI and per-request HTTP JSON ("loopcd_omega": 0.1, "loopcd_ref": 1).
- Thinking mode (
4. Live Same-Hardware Cross-Engine Benchmark & Accuracy (1× RTX 5090)

100% live apples-to-apples methodology: Every single row below —
ingine(CUDA 13.4),basalt v0.5.7(MX8pack converted directly from the same checkpoint), and all 4squid5090modes (CUDA 13.4, native Vision ON) — was measured live on the exact same RTX 5090 (driver 590.48.01, identical unmodified Inkling-2-Mini weights, identical 4 HTTP SSE prompts generating 512 tokens each atT=0.0andT=1.0, top_p=0.95median of 3 runs, identical cold 18,937-token HTTP SSE prefill, and identical 30-task Math + unit-tested Python Code + Logic accuracy suite atreasoning_effort = lowandnone).squid5090also passes bit-exactexact/bf16parity (mtp=0 == mtp=7).
| Engine / Mode (unmodified weights) | Chat T=0 / T=1 |
Prose T=0 / T=1 |
Code T=0 / T=1 |
Copy T=0 / T=1 |
Cold 18.9K HTTP Prefill | 30-Task Acc (low / none) |
VRAM Footprint* | Vision | Max Context (1× 5090) |
|---|---|---|---|---|---|---|---|---|---|
ingine (fp8/fp8, CUDA 13.4) |
361.1 / 368.7 | 346.9 / 302.3 | 442.3 / 525.8 | 632.5 / 542.5 | 10,985 tok/s | 29/30 (96.7%) / 27/30 (90.0%) | 20.8 GiB | Yes | 262K (0 spill) |
basalt v0.5.7 (MX8/int8) |
320.3 / 276.0 | 284.4 / 264.6 | 365.5 / 303.0 | 452.9 / 378.8 | 17,494 tok/s | 29/30 (96.7%) / 28/30 (93.3%) | 19.8 GiB | Yes | 1M (RAM spill >256K) |
basalt v0.5.7 (MX8/fp8) |
334.1 / 271.4 | 265.8 / 257.1 | 319.1 / 292.0 | 425.1 / 352.6 | 16,307 tok/s | 29/30 (96.7%) / 27/30 (90.0%) | 19.7 GiB | Yes | 1M (RAM spill >256K) |
squid5090 (exact/bf16) |
229.0 / 217.1 | 201.9 / 191.0 | 246.7 / 225.2 | 419.2 / 237.2 | 9,875 tok/s | 29/30 (96.7%) / 29/30 (96.7%) | 20.7 GiB | Yes | 64K–128K (0 spill) |
squid5090 (fp8/fp8, ≤448K def.) |
340.2 / 316.1 | 321.3 / 313.2 | 425.6 / 442.5 | 545.1 / 477.5 | 17,741 tok/s (CLI: 18,318) | 29/30 (96.7%) / 28/30 (93.3%) | 19.5 GiB | Yes | 256K–448K (0 spill) |
squid5090 (fp8/q4, 512K def.) |
334.4 / 333.6 | 313.3 / 307.2 | 412.4 / 460.3 | 540.5 / 519.4 | 17,476 tok/s (CLI: 18,168) | 28/30 (93.3%) / 28/30 (93.3%) | 19.2 GiB | Yes | 512K (22.9 GiB, 0 spill) |
squid5090 (nvfp4/q4, opt-in 1M) |
398.2 / 350.3 | 339.3 / 324.9 | 425.2 / 424.6 | 508.4 / 490.9 | 14,758 tok/s | 28/30 (93.3%) / 28/30 (93.3%) | 16.8 GiB | Yes | 1,048,576 (23.5 GiB, 0 spill) |
*VRAM = squid5090 weight + runtime arenas at 32K ctx with native Vision ON (-0.60 GiB with --no-vision); ingine and basalt measured net @64K. Pure B=1 (mtp=0) squid5090 fp8/fp8 runs at 279.3 tok/s CLI. For reference, llama.cpp (IQ4_NL GGUF, no DSpark draft, published in Basalt docs) runs at 92.5–94.5 tok/s decode and 3,093 tok/s prefill.
- Honest per-engine summary from our live RTX 5090 runs:
ingineleads peakfp8/fp8code/copy decode (442–526code,543–633copy) andT=1.0chat (369) — at the cost of slower cold prefill (10,985 tok/s), higher VRAM (20.8 GiB), and a262Kcontext ceiling.basalt v0.5.7leads multi-feature breadth (constrained JSON grammar, parallel slots, multi-GPU, elastic RAM-spilled 1M context) and strong cold prefill (17,494 tok/s).squid5090now beatsbasalt v0.5.7on all 8 of 8 decode benchmarks in every single quantized mode (fp8/fp8,fp8/q4, andnvfp4/q4), leads cold 18.9K HTTP prefill (17,741 tok/sfp8/fp8,17,476 tok/sfp8/q4— 1.61× faster thaningine!), leads greedy chat (398.2nvfp4/q4) andT=1.0prose (324.9nvfp4/q4/313.2fp8/fp8vsingine302.3), matchesbasaltand beatsingineon 30-task accuracy (29/30low /28/30none infp8/fp8,29/30&29/30inexact/bf16), includes native 23-layer BF16 Vision (4.4 msViT encode,0.0 msmulti-turn prefix cache), fits zero-spill 512Kfp8/q4(+ Vision!) in22.87 GiBand 1Mnvfp4/q4in23.5 GiB, ships as a ~20 MiB zero-Python single binary (CUDA13.0–13.4+), and adds zero-overhead LoopCD-Hidden.
5. Native Vision Support (Images + Text)
squid5090 serve loads Inkling-2-Mini's built-in 23-layer BF16 Vision Tower (model.visual.*, 422 tensors, ~609 MiB inside the single weight VRAMArena, zero permanent workspace VRAM) automatically by default:
- API formats: Accepts OpenAI
{"type":"image_url","image_url":{"url":"data:image/...;base64,..."}}, OpenAI Responses-style{"type":"input_image","image_url":"..."}, and Anthropic{"type":"image","source":{"type":"base64","data":"..."}}content parts inuserandtoolmessages. - Image formats & preprocessing: Built-in
stb_image.hdecodes PNG, JPEG, GIF, BMP; build withzig build -Dwebp=true(requireslibwebp-dev) to add WebP & animated WebP support. Transparent RGBA/GA images are composited onto an 8×8 grey checkerboard (204/153), oversized images are downscaled with aspect-preserving separable area averaging to--image-max-tokens(default256tiles of40×40px), and embeddings are scattered straight into prefill hidden states skippingembed_norm. - Automatic
0.0 msmulti-turn vision prefix caching: Each decoded image is represented by content-addressed negative synthetic token IDs (SplitMix64over final RGB pixels), so follow-up turns referencing the same image hit the host-RAM prefix KV cache automatically (vis=0.0ms,images_encoded=0).
Current Scope & Limitations
- No constrained grammar / JSON-schema decoding yet (standard OpenAI
tools/tool_callsstreaming is supported). - Single-user (
c=1) slot architecture: Optimized for lowest single-user latency and fitting up to 1M context in 23.5 GiB with2 cudaMallocarenas and zero post-init hostmallocon text requests; not a multi-user batching server. - HTTP request buffer: Static
32 MiBrequest & prompt-render buffers (handles 512K–1M-token JSON and base64 image payloads; returns HTTP413above32 MiB).
Quickstart (Linux Build & Install)
1. Linux Requirements
- OS: Linux x86_64 (tested on Ubuntu 24.04 / Debian 12–13)
- GPU: NVIDIA Blackwell GPU (
sm_120a, e.g., RTX 5090) with ≥ 16 GiB free VRAM (≥ 23.5 GiB for full 1M context) - NVIDIA Driver:
580+(tested on590.48.01) - CUDA Toolkit: CUDA
13.0+withnvccandcuBLAS(tested on CUDA13.1&13.4at/usr/local/cuda; CUDA13.4+automatically enablesL2::evict_firststreaming weight cache hints) - Build Tools:
g++,git,curl, optionallibwebp-dev(for-Dwebp=true), and Zig0.17.1+
sudo apt-get update && sudo apt-get install -y build-essential git curl libwebp-dev
export PATH="/usr/local/cuda/bin:$PATH"
nvcc --version && zig version
Runtime links only against libc, libstdc++, libcudart, libcublas, libcublasLt, libpthread (plus libwebp/libwebpdemux when built with -Dwebp=true) — zero Python, CMake, Make, or external packages.
2. Clone, Build & Download Weights
git clone https://github.com/tensorfish/squid5090.git
cd squid5090
zig build -Dwebp=true # defaults to -Doptimize=fast (ReleaseFast); omit -Dwebp=true if libwebp-dev isn't installed
uvx --from huggingface-hub hf download thinkingmachines/Inkling-2-Mini \
--local-dir /opt/models/inkling-2-mini
(Built-in draft shortlist: squid5090 embeds a corpus-frequency-ranked 32K shortlist src/draft_shortlist.bin + 16,384 dynamic context rows directly into the binary — zero external files needed. Set SQUID_DRAFT_VOCAB=full to force the full 200K draft vocabulary.)
3. Run the OpenAI API Server, CLI, or KLD Evaluator
# Default high-accuracy OpenAI HTTP/SSE server (FP8 Tensor Core MMA + official L0-23 MoE, 512K Q4 KV, ~22.6 GiB VRAM, 0.0096 KLD)
./zig-out/bin/squid5090 serve /opt/models/inkling-2-mini \
--host 0.0.0.0 --port 8000 --mode fp8 --kv q4 --ctx 524288 --mtp 7 --temp 1.0 --top-p 0.95
# Near-lossless 256K FP8 KV (0.0061 long-ctx KLD, dPPL -0.0030, ~22.6 GiB VRAM)
./zig-out/bin/squid5090 serve /opt/models/inkling-2-mini \
--host 0.0.0.0 --port 8000 --mode fp8 --kv fp8 --ctx 262144 --mtp 7 --temp 1.0 --top-p 0.95
# Opt-in max-speed / 1M context NVFP4 mode (~23.2 GiB at 1M, 0.0263 KLD)
./zig-out/bin/squid5090 serve /opt/models/inkling-2-mini \
--host 0.0.0.0 --port 8000 --mode nvfp4 --kv q4 --ctx 1048576 --mtp 7 --temp 1.0 --top-p 0.95
# Optional: enable 1.8 MB runtime-gated Fisher-LDA abliteration (zero weight modification)
./zig-out/bin/squid5090 serve /opt/models/inkling-2-mini \
--host 0.0.0.0 --port 8000 --mode fp8 --kv q4 --ctx 524288 --mtp 7 \
--ablation /opt/models/inkling-2-mini/inkling-2-mini-abliterated.safetensors
# Benchmark (supports --temp 0.0 or --temp 1.0)
./zig-out/bin/squid5090 bench /opt/models/inkling-2-mini \
--prompt "Write a Python LRU cache with tests." --mode nvfp4 --kv q4 --mtp 7 --temp 1.0 --max-tokens 1024 --runs 3
# Reproduce exact FP64 long-context KLD (7,784 tokens) vs official exact/bf16
./zig-out/bin/squid5090 logits /opt/models/inkling-2-mini --prompt-file tools/kld_corpus.txt --raw --ctx 8192 --mode exact --kv bf16 --out /tmp/ref.bin
./zig-out/bin/squid5090 kld /opt/models/inkling-2-mini --prompt-file tools/kld_corpus.txt --raw --ctx 8192 --ref /tmp/ref.bin --mode fp8 --kv q4
./zig-out/bin/squid5090 kld /opt/models/inkling-2-mini --prompt-file tools/kld_corpus.txt --raw --ctx 8192 --ref /tmp/ref.bin --mode nvfp4 --kv q4
Install as a persistent systemd service:
sudo cp deploy/squid5090.service /etc/systemd/system/squid5090.service
sudo systemctl daemon-reload && sudo systemctl enable --now squid5090.service
curl -s http://localhost:8000/health
Key CLI Flags
| Flag | Default | Description |
|---|---|---|
--mode |
fp8 (serve), exact (CLI) |
Weight precision: exact (BF16 dense) | fp8 (FP8 TC MMA dense + official L0–23 MoE, 0.006–0.0096 KLD) | nvfp4 (0.026 KLD, max speed) |
--kv |
auto |
Global KV cache format: bf16 | fp8 | q4 (enables up to 1M context in 23.2 GiB) |
--ctx |
65536 (serve), 8192 (CLI) |
Context window size up to 1048576 |
--mtp |
7 (serve), 0 (CLI) |
DSpark drafter (0 = off, 7 = adaptive {2,4,8} CUDA Graph switch) |
--spec-threshold |
0.80 |
Markov confidence threshold for {2,4,8} verify width (0.0 = fixed B=8) |
--temp / --top-p / --top-k |
1.0 / 0.95 / 0 (serve), 0.0 (CLI) |
GPU sampling & exact Leviathan/Chen rejection sampling defaults (overridable per-request) |
--loopcd-omega / --loopcd-ref |
0.0 / 1 |
Opt-in LoopCD-Hidden (arXiv:2610.02185) strength $\omega \in [-1, 2]$ (try 0.1–0.2 for thinking) & ref pass 1 ($h_1$) or 2 ($h_2$); overridable per HTTP request |
--max-tokens |
128 (CLI), 16384 (HTTP fallback) |
Max generated tokens per request |
--keep-history-thinking |
off | Re-inject prior turns' reasoning_content (off by default to prevent multi-turn thinking copy loops) |
--prompt-lookup |
off | Opt-in hybrid O(1) prompt-lookup drafter for long verbatim RAG/code-copy bursts |
--no-vision |
off (serve) |
Disable native 23-layer BF16 Vision Tower (model.visual.*) to save ~609 MiB VRAM |
--image-max-tokens / --max-images |
256 / 16 |
Max 40×40 visual tiles per image (aspect-preserving area-average downscale) & max images per request |
--ablation |
none | Optional 1.8 MB runtime-gated Fisher-LDA .safetensors (see tools/ablate.py) |
--api-key |
$SQUID_API_KEY |
Optional Authorization: Bearer <key> auth for serve (constant-time compare, arbitrary key length) |
Documentation & Attribution
LITE.md— High-level, 3Blue1Brown-style animated guide to LLM optimization and abliteration.LEARNINGS.md— Consolidated technical reference: GPU kernels, KLD analysis, roofline audit, unexploited levers, and theuvabliteration pipeline.tools/kld_corpus.txt— Checked-in 7,784-token multi-domain KLD evaluation corpus.ledger.jsonl— Machine-readable record of every benchmark, KLD sweep, and needle run.LICENSE/NOTICE— Apache-2.0 license and complete open-source attributions.
Explorer des projets similaires
Chargement…