Commit 6506ad0
bench: improve Document-Level RAG test prompts + Q4_K dequant investigation
Findings from Karpathy loop:
1. Q4_K_M GGUF on-the-fly dequant (TQ_NO_Q4) has a bug — garbage output.
Root cause: likely in fused_dot_q4_k or Metal dispatch. Does NOT affect
normal users (auto Q4 conversion is the default and works correctly).
2. Auto Q4 path (Q8_0 → Q4) works for fact extraction but with artifacts:
"Santos" → "SanSannt", "Park" → "PPar". Semantically correct,
but character-level precision is lost.
3. 1B model instruction-following is the real bottleneck for Document QA.
The model enters "Step 1: Identify..." reasoning chains instead of
directly answering. Better prompts help but don't solve it fully.
4. GGUF on-the-fly Q4_K bug confirmed: logits have -2.68 bias vs Q8_0's
+3.98. Scale/min handling in fused_dot_q4_k suspected but unit test
shows correct formula. Bug may be in per-tensor type dispatch for
mixed Q4_K/Q6_K models (Q4_K_M uses both).
Action: Document QA concept is valid, needs 3B+ Q8 models for reliable
demonstration. The Q4_K on-the-fly bug is tracked for future fix.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 57a2918 commit 6506ad0
206 files changed
Lines changed: 30742 additions & 0 deletions
File tree
- bindings/python
- build_metal
- CMakeFiles
- 3.28.1
- CompilerIdCXX
- CompilerIdC
- CompilerIdOBJC
- ab_test.dir
- benchmark_types.dir
- debug_compare.dir
- demo_real_model.dir
- embed_chat.dir
- embed_kv_compare.dir
- embed_minimal.dir
- llamacpp_integration.dir
- minimal.dir
- quant.dir
- tools
- single_header_example.dir
- standalone.dir
- tq_convert.dir
- turboquant.dir
- src
- backend
- cpu
- metal
- cache
- core
- engine
- turboquant_metallib.dir
- docs/pr
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments