Repository navigation
Conversation
| when the K cache is TurboQuant, and the attention output is de-rotated when the V cache is TurboQuant. | ||
| `--kv turbo4-3`, `turbo4-2`, `turbo3`, `turbo2` and `turbo3-2` select narrower K/V centroids. | ||
| `--kv turbo4-3`, `turbo4-2`, `turbo3`, `turbo2` and `turbo3-2` select narrower K/V centroids. All of them | ||
| currently use the same 4-bit nibble packing and cache size as `--kv turbo4`. |
There was a problem hiding this comment.
🟠 High · Correctness · 1 of 2
The new claim that all turbo variants share turbo4's packing and cache size cannot be checked from this diff. If any of turbo4-3, turbo4-2, turbo3, turbo2 or turbo3-2 uses a different bit width or packing than turbo4, users sizing GPU memory from this doc will under- or over-allocate the KV cache. The diff gives no code or test evidence for the claim.
Prompt for your AI agent
File: docs/USAGE.md
Line: 149
Issue: The new claim that all turbo variants share turbo4's packing and cache size cannot be checked from this diff. If any of turbo4-3, turbo4-2, turbo3, turbo2 or turbo3-2 uses a different bit width or packing than turbo4, users sizing GPU memory from this doc will under- or over-allocate the KV cache. The diff gives no code or test evidence for the claim.
Make the smallest change that fixes this, add a test, and change nothing unrelated.
Reply /dismiss (optionally with a reason) if this isn't helpful - Aletheore won't raise it again on this repo.
| `--kv turbo4-3`, `turbo4-2`, `turbo3`, `turbo2` and `turbo3-2` select narrower K/V centroids. | ||
| `--kv turbo4-3`, `turbo4-2`, `turbo3`, `turbo2` and `turbo3-2` select narrower K/V centroids. All of them | ||
| currently use the same 4-bit nibble packing and cache size as `--kv turbo4`. | ||
| - `--k TYPE` and `--v TYPE` set the two cache formats independently (CUDA). Either half may be `f16`, `q8`, |
There was a problem hiding this comment.
🔵 Low · Maintainability · 2 of 2
'Currently' is undated and has no version reference, so the statement will go stale without anyone noticing. When a later change gives turbo3 or turbo2 a packed narrower layout, this sentence stays in the docs and tells users the old cache size is still in effect, so the doc contradicts the code.
Prompt for your AI agent
File: docs/USAGE.md
Line: 150
Issue: 'Currently' is undated and has no version reference, so the statement will go stale without anyone noticing. When a later change gives turbo3 or turbo2 a packed narrower layout, this sentence stays in the docs and tells users the old cache size is still in effect, so the doc contradicts the code.
Make the smallest change that fixes this, add a test, and change nothing unrelated.
Reply /dismiss (optionally with a reason) if this isn't helpful - Aletheore won't raise it again on this repo.
Aletheore Flash Lite reviewWhat this PR does. This PR adds a documentation note to docs/USAGE.md stating that the narrower turbo KV cache options (turbo4-3, turbo4-2, turbo3, turbo2, turbo3-2) currently use the same 4-bit nibble packing and cache size as turbo4. It affects users who run Strata with these
2 finding(s) posted as inline review comment(s).
Review detailsReviewed 1 file(s); skipped 0. Dismissed 0; outside PR diff 0. Grounding: 2 of 2 proposed finding(s). Fix all with your agent |
🔍 Aletheore evidence diffWhat changed
Aggregate deltas
|
Docs-only correction.
docs/USAGE.md:148says the turbo variants select narrower centroids, which is true, but it can be read as implying smaller cache formats. The code packs every turbo mode into 4-bit nibbles:kv_mode_wordsinsrc/cuda/mod.rs:144maps modes 4 through 6 to the same word width, andkv_put_tqinsrc/cuda/kernels.cu:2857-2870writes one byte per two values plus one fp16 corrected norm per 128.turbo3,turbo2and the mixed variants therefore use the same cache size asturbo4and only change the centroids.For reference, TheTom's CUDA header stores turbo4 codes as nibbles in
qs[j / 2]but stores turbo3 as a 2-bit code plane inqs[j / 4]plus a 1-bit sign plane insigns[j / 8], which is a genuinely smaller 50 B per 128 layout. That packing is not implemented here yet. Source: https://raw.githubusercontent.com/TheTom/llama-cpp-turboquant/feature/turboquant-kv-cache/ggml/src/ggml-cuda/turbo-quant.cuhThis PR adds no benchmark numbers and changes no behavior.