Commit Graph
9 Commits
Author SHA1 Message Date
7e469a0dc9 feat: benchmark results — turbo3/turbo4 vs q8_0/q4_0 on M5 Max #22
Results on Qwen 3.5 35B-A3B MoE and Qwopus v2 27B:
- turbo3: 4.9× compression, 2.4 tok/s MoE / 1.3 tok/s Dense
- q8_0 baseline: 85.0 tok/s MoE / 17.6 tok/s Dense
- Speed regression: 13-35× (unoptimized Metal shader, tracked in #23)
- Compression ratio target met, speed optimization needed

Codex review corrections applied:
- Fixed methodology description (was inconsistent with actual test params)
- Changed "~35×" to "13-35×" (varies by model)
- Marked quality claims as qualitative/unquantified
- Noted compression ratios are theoretical not empirically measured
- Added missing analysis caveats (single run, no stddev, no warm-up)

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 01:06:59 -05:00
6634deebd0 feat: README overhaul, Apache 2.0 license, benchmark script #22
README updates (per Codex review):
- Fixed overstated "zero accuracy loss" claim — now shows actual metrics
- Added proper llama.cpp fork build instructions with prerequisites
- Added "Plus" branding explanation (post-v1 improvements planned)
- Added prerequisites section (Python, cmake, Xcode)
- Fixed inconsistent build paths (build-turbo vs build)
- Removed unsubstantiated Prince Canuma comparison claim

Added:
- Apache 2.0 LICENSE file (Copyright 2026 Tom Turney)
- benchmarks/benchmark_llama.sh script

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:09:59 -05:00
338e978b09 feat: validate rotation Gaussianization on real KV tensors #18 #20
Critical experiment: real Qwen3-1.7B K cache has kurtosis=900.
After norm extraction + random rotation: kurtosis=2.9 (Gaussian=3.0).
Std matches 1/sqrt(d) to 6 decimal places. Ratio = 1.000 exactly.

Paper's core mathematical claim is validated on real data.
Gaussian codebook is correct — no per-layer calibration needed (#20 closed).

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:36:34 -05:00
4e8443f24e fix: real model validation — DynamicCache API, Phase A results #18
Fixed HuggingFace DynamicCache extraction (transformers 5.x API).
First real tensor validation on Qwen3-1.7B complete.

Key findings:
- Real KV tensors have kurtosis=918 (K) vs Gaussian=3.0
- Norm extraction critical: norms range 6.8-603.8
- 3.5-bit outlier: cosine 0.945, ratio 8.0× on real tensors
- 4-bit uniform: cosine 0.975 on real tensors
- Attention cosines 0.64-0.82 (lower than synthetic due to heavy tails)

Results posted to issue #18.

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:34:03 -05:00
c1a10e4a64 feat: input validation, README, real model validation script #12 #18
- Add input validation to rotation.py: d>=1, pow2 checks on hadamard
  and FWHT, with ValueError messages (#12)
- Add README.md with quick start, results, architecture, roadmap
- Add benchmarks/validate_real_model.py for Phase A validation (#18)
- Close #9, #16 (superseded by #18)

5 new tests for validation guards. 137 total tests passing.

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:29:24 -05:00
1fa6d79b10 feat: outlier comparison benchmark — matches Prince Canuma's ratios
2.5-bit: 4.9× compression (Prince: 4.9×) ✅
3.5-bit: 3.8× compression (Prince: 3.8×) ✅

Quality at 3.5-bit: MSE 0.0009, cosine 0.947
Quality at 2.5-bit: MSE 0.0029, cosine 0.856

Pending: real KV tensor validation from llama.cpp NIAH test.

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:21:53 -05:00
f1c2397680 feat: integration test at real Qwen 3.5 KV cache dimensions #16
Simulates KV cache compression at Qwen 3.5 27B and 35B-A3B dimensions:
28 layers × 8 KV heads × 128 head_dim × up to 8192 tokens.

Results:
- 3-bit K+V: 2.6× compression, K cosine 0.91, attention cosine 0.98
- 4-bit K+V: 1.9× compression, K cosine 0.96, attention cosine 0.99
- Prince Canuma gets 4.9× at 2.5-bit (uses outlier channel strategy)

Next: implement outlier channel strategy for non-integer bit rates
(2.5-bit, 3.5-bit) to match Prince's compression ratios.

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:15:14 -05:00
361ea4cab0 feat: add demo benchmark script for quick validation
Shows single-vector compression, full KV cache compression, and inner
product preservation at 2/3/4-bit quantization levels.

Results:
- 3-bit: 4.9× compression, cosine sim 0.83, IP error 0.02
- 4-bit: 3.8× compression, cosine sim 0.86, IP error 0.01
- KV cache: 4 layers × 8 heads × 512 tokens compressed in 60ms

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:05:53 -05:00
8fa1d293f9 infra: project scaffold — CI, pyproject, CLAUDE.md, PLAN.md #1
Set up bare project infrastructure:
- .gitignore, pyproject.toml, setup.py
- GitHub Actions CI with Python 3.10/3.11/3.12 matrix
- CI enforces >95% coverage when tests exist, skips gracefully when empty
- CLAUDE.md with full development workflow rules
- PLAN.md with phased implementation plan
- Empty turboquant/, tests/, benchmarks/ packages

No algorithm code — scaffold only.

Co-Authored-By: tturney@psyguard.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:43:16 -05:00