Skip to content

Commit 366cd12

Browse files
committed
Address audit findings: fix URLs, add missing files, remove dead links
- Fix all clone URLs from ryukez to Ryuketsukami (README, CONTRIBUTING) - Fix LICENSE copyright to Ryuketsukami - Remove unverifiable press links (TechCrunch, MarkTechPost, VentureBeat) - Remove nonexistent assets/ from structure diagram - Add evals/ with 12-test evaluation suite - Add SECURITY.md, CHANGELOG.md, CITATION.cff - Add .github/workflows/tests.yml CI pipeline - Add cross-link to turboquant-compression library repo - Update benchmarks with exact reproducible numbers - Remove unused minimize_scalar import - Fix Unicode chars that cause encoding errors on Windows
1 parent 8f2f6ff commit 366cd12

9 files changed

Lines changed: 345 additions & 34 deletions

File tree

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install numpy scipy pytest
28+
29+
- name: Run evaluation suite
30+
run: pytest evals/ -v
31+
32+
- name: Run self-test
33+
run: python scripts/turboquant.py

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2026-03-28
9+
10+
### Added
11+
12+
- SKILL.md with full agent skill definition and YAML frontmatter
13+
- Complete TurboQuant Python implementation (PolarQuant + QJL)
14+
- Algorithm details reference document
15+
- Evaluation test suite
16+
- CI pipeline (GitHub Actions)
17+
- Full documentation (README, CONTRIBUTING, SECURITY, CITATION)

CITATION.cff

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
cff-version: 1.2.0
2+
title: "TurboQuant Skill"
3+
message: "If you use this software, please cite the original TurboQuant paper."
4+
type: software
5+
authors:
6+
- name: "Ryuketsukami"
7+
license: MIT
8+
repository-code: "https://github.com/Ryuketsukami/turboquant-skill"
9+
keywords:
10+
- turboquant
11+
- agent-skill
12+
- kv-cache
13+
- quantization
14+
- llm-compression
15+
references:
16+
- type: conference-paper
17+
title: "TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate"
18+
authors:
19+
- family-names: Zandieh
20+
given-names: Amir
21+
- family-names: Daliri
22+
given-names: Majid
23+
- family-names: Hadian
24+
given-names: Majid
25+
- family-names: Mirrokni
26+
given-names: Vahab
27+
year: 2026
28+
collection-title: "International Conference on Learning Representations (ICLR)"
29+
url: "https://arxiv.org/abs/2504.19874"

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ algorithm to Claude Code and compatible AI coding agents.
77

88
### Reporting Issues
99

10-
- Use the [GitHub Issues](https://github.com/ryukez/turboquant-skill/issues) tab
10+
- Use the [GitHub Issues](https://github.com/Ryuketsukami/turboquant-skill/issues) tab
1111
- Include your environment (Python version, OS, Claude Code version)
1212
- For accuracy issues, include the dimension, bit-width, and a minimal reproduction
1313

@@ -17,8 +17,9 @@ algorithm to Claude Code and compatible AI coding agents.
1717
2. Create a feature branch: `git checkout -b feat/your-feature`
1818
3. Make your changes
1919
4. Run the self-test: `python scripts/turboquant.py`
20-
5. Commit with a descriptive message: `git commit -m "feat: add batch compression"`
21-
6. Push and open a Pull Request
20+
5. Run the eval suite: `pytest evals/ -v`
21+
6. Commit with a descriptive message: `git commit -m "feat: add batch compression"`
22+
7. Push and open a Pull Request
2223

2324
### What We're Looking For
2425

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2026 turboquant-skill contributors
3+
Copyright (c) 2026 Ryuketsukami
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# TurboQuant Skill — LLM KV Cache Compression for AI Coding Agents
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
4+
[![Tests](https://github.com/Ryuketsukami/turboquant-skill/actions/workflows/tests.yml/badge.svg)](https://github.com/Ryuketsukami/turboquant-skill/actions/workflows/tests.yml)
45
[![Agent Skills](https://img.shields.io/badge/Agent_Skills-Compatible-blue.svg)](https://github.com/anthropics/skills)
56
[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-yellow.svg)](https://python.org)
67
[![ICLR 2026](https://img.shields.io/badge/Paper-ICLR_2026-red.svg)](https://arxiv.org/abs/2504.19874)
78

89
> **An AI agent skill implementing Google's TurboQuant compression algorithm** — the data-oblivious vector quantization framework that reduces LLM KV cache memory by **6x** and delivers up to **8x speedup** with **zero accuracy loss**. Compatible with Claude Code, Codex CLI, and all agents supporting the [Agent Skills specification](https://github.com/anthropics/skills).
910
11+
> **Looking for the standalone Python library?** See [turboquant-compression](https://github.com/Ryuketsukami/turboquant-compression) — pip-installable with 27 tests and full documentation.
12+
1013
---
1114

1215
## What is TurboQuant?
@@ -27,10 +30,6 @@ TurboQuant compresses each KV cache vector from 32-bit floats down to **3-4 bits
2730
| **Calibration needed** | None — fully data-oblivious |
2831
| **Retraining needed** | None — works with any pretrained model |
2932

30-
### Why It Matters
31-
32-
TurboQuant is being called [Google's "DeepSeek moment"](https://techcrunch.com/2026/03/25/google-turboquant-ai-memory-compression-silicon-valley-pied-piper/) — a software-only breakthrough that dramatically reduces the hardware cost of AI inference. It works with any transformer model (Gemma, Mistral, Llama, GPT, Claude) without modification.
33-
3433
---
3534

3635
## What is This Repo?
@@ -56,20 +55,20 @@ When installed, your AI coding agent can:
5655

5756
```bash
5857
# Clone into your skills directory
59-
git clone https://github.com/ryukez/turboquant-skill.git ~/.claude/skills/turboquant-skill
58+
git clone https://github.com/Ryuketsukami/turboquant-skill.git ~/.claude/skills/turboquant-skill
6059
```
6160

6261
### For Codex CLI
6362

6463
```bash
65-
git clone https://github.com/ryukez/turboquant-skill.git ~/.codex/skills/turboquant-skill
64+
git clone https://github.com/Ryuketsukami/turboquant-skill.git ~/.codex/skills/turboquant-skill
6665
```
6766

6867
### For Project-Level Installation
6968

7069
```bash
7170
# Add to your project's .claude/skills/ directory
72-
git clone https://github.com/ryukez/turboquant-skill.git .claude/skills/turboquant-skill
71+
git clone https://github.com/Ryuketsukami/turboquant-skill.git .claude/skills/turboquant-skill
7372
```
7473

7574
The skill is automatically discovered by any compatible agent when relevant tasks arise.
@@ -153,6 +152,7 @@ scores = cache.attention_scores(query)
153152

154153
```bash
155154
python scripts/turboquant.py
155+
pytest evals/ -v
156156
```
157157

158158
This runs a comprehensive validation suite testing:
@@ -171,13 +171,19 @@ turboquant-skill/
171171
├── README.md # This file
172172
├── CONTRIBUTING.md # Contribution guidelines
173173
├── LICENSE # MIT License
174+
├── SECURITY.md # Security policy
175+
├── CHANGELOG.md # Release history
176+
├── CITATION.cff # Citation metadata
174177
├── .gitignore
178+
├── .github/
179+
│ └── workflows/
180+
│ └── tests.yml # CI pipeline (Python 3.10–3.13)
175181
├── scripts/
176182
│ └── turboquant.py # Complete Python implementation (420 lines)
177183
├── references/
178184
│ └── algorithm_details.md # Deep mathematical details and comparisons
179-
── assets/ # Templates and static resources
180-
└── evals/ # Test cases for skill evaluation
185+
── evals/
186+
└── test_turboquant.py # Evaluation test suite (pytest)
181187
```
182188

183189
---
@@ -211,23 +217,25 @@ Results from the bundled self-test (`d=256, n=64 vectors`):
211217

212218
| Variant | Bits | MSE | Cosine Sim | IP Correlation | Compression |
213219
|---------|------|-----|------------|----------------|-------------|
214-
| PolarQuant | 2-bit | 0.007803 | 0.9961 || 16.0x |
215-
| PolarQuant | 3-bit | 0.001962 | 0.9990 || 10.7x |
216-
| PolarQuant | 4-bit | 0.000491 | 0.9998 || 8.0x |
217-
| TurboQuant | 3+1 bit ||| 0.9983 | 8.0x |
218-
| TurboQuant | 4+1 bit ||| 0.9996 | 6.4x |
220+
| PolarQuant | 2-bit | 0.000461 | 0.9394 || 16.0x |
221+
| PolarQuant | 3-bit | 0.000133 | 0.9829 || 10.7x |
222+
| PolarQuant | 4-bit | 0.000037 | 0.9952 || 8.0x |
223+
| TurboQuant | 3+1 bit ||| 0.8605 | 8.0x |
224+
| TurboQuant | 4+1 bit ||| 0.8604 | 6.4x |
225+
226+
> **Note:** These benchmarks use `d=256` for fast CI. Production KV caches typically use `d=4096+`, where relative errors are significantly lower due to concentration-of-measure effects.
219227
220228
---
221229

222230
## How This Compares to Other Methods
223231

224232
| Method | Data-Oblivious | Retraining | Bits | Speed |
225233
|--------|---------------|-----------|------|-------|
226-
| **TurboQuant** | Yes | None | 3-4 | O(d) |
227-
| Product Quantization | No | Required | 4-8 | O(d·k) |
228-
| GPTQ | No | Required | 3-4 | O(d) |
229-
| AWQ | No | Required | 4 | O(d) |
230-
| SqueezeLLM | No | Required | 3-4 | O(d) |
234+
| **TurboQuant** | Yes | None | 3-4 | O(d) |
235+
| Product Quantization | No | Required | 4-8 | O(d·k) |
236+
| GPTQ | No | Required | 3-4 | O(d) |
237+
| AWQ | No | Required | 4 | O(d) |
238+
| SqueezeLLM | No | Required | 3-4 | O(d) |
231239

232240
TurboQuant's key advantage: **zero calibration data needed**. Other methods require representative data samples to build quantization schemes. TurboQuant works on any vector from any model, immediately.
233241

@@ -256,12 +264,11 @@ See also:
256264

257265
---
258266

259-
## Related Resources
267+
## Related
260268

261-
- [Google's TurboQuant announcement](https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/)Official blog post
269+
- [turboquant-compression](https://github.com/Ryuketsukami/turboquant-compression)Standalone pip-installable Python library with 27 tests
262270
- [Anthropic Agent Skills](https://github.com/anthropics/skills) — The skill specification this repo follows
263-
- [MarkTechPost coverage](https://www.marktechpost.com/2026/03/25/google-introduces-turboquant-a-new-compression-algorithm-that-reduces-llm-key-value-cache-memory-by-6x-and-delivers-up-to-8x-speedup-all-with-zero-accuracy-loss/) — Technical summary
264-
- [VentureBeat coverage](https://venturebeat.com/infrastructure/googles-new-turboquant-algorithm-speeds-up-ai-memory-8x-cutting-costs-by-50/) — Industry impact
271+
- [arXiv:2504.19874](https://arxiv.org/abs/2504.19874) — Original TurboQuant paper
265272

266273
---
267274

SECURITY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------|----------|
7+
| 0.1.x | Yes |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability, please report it responsibly:
12+
13+
1. **Do not** open a public issue
14+
2. Email ryuketsukami@gmail.com with details
15+
3. Include steps to reproduce the vulnerability
16+
4. Allow reasonable time for a fix before public disclosure
17+
18+
We will acknowledge receipt within 48 hours and provide a timeline for resolution.

0 commit comments

Comments
 (0)