AI Skill Hub 强烈推荐:TurboQuant 是一款优质的AI工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
TurboQuant 是一款基于 Python 开发的开源工具,专注于 AI、LLM、缓存压缩 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
TurboQuant 是一款基于 Python 开发的开源工具,专注于 AI、LLM、缓存压缩 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install turboquant-pro
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install turboquant-pro
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/ahb-sjsu/turboquant-pro
cd turboquant-pro
pip install -e .
# 验证安装
python -c "import turboquant_pro; print('安装成功')"
# 命令行使用
turboquant-pro --help
# 基本用法
turboquant-pro input_file -o output_file
# Python 代码中调用
import turboquant_pro
# 示例
result = turboquant_pro.process("input")
print(result)
# turboquant-pro 配置文件示例(config.yml) app: name: "turboquant-pro" debug: false log_level: "INFO" # 运行时指定配置文件 turboquant-pro --config config.yml # 或通过环境变量配置 export TURBOQUANT_PRO_API_KEY="your-key" export TURBOQUANT_PRO_OUTPUT_DIR="./output"
Consumer-aware compression for embedding indexes and LLM KV caches. TurboQuant Pro compresses each vector by the metric its downstream consumer actually uses — retrieval recall for indexes, attention/generation quality for KV caches — not reconstruction cosine alone, which is repeatedly shown here to be blind, or even anti-correlated, with quality.
pip install turboquant-pro
tqp replay embedding_glove_recall --small # reproduce the headline retrieval claim — CI-gated, runs in seconds
tqp replay embedding_glove_recall).Every headline number — with its reproduction status, dataset, one-click notebook, and hardware — is a row in CLAIMS.md. The acceptance signal everywhere is rank fidelity / a certificate / the consumer's metric — never reconstruction cosine.
The latest published pre-release is 2.0.0a2 (production semantics for the vLLM KV connector, the Postgres track, self-metering anatomy instruments); master carries 2.0.0a3, unreleased (empirical false-clear rate, the reconciled claims ledger, the HF cache mask-size fix — see the Unreleased section of the changelog). The last stable line is 1.9.x (larger-than-RAM search + index format v3), and the tqp CLI and certification platform shipped in 1.8.0. APIs under connectors/ may still move before 2.0.0. Full notes: CHANGELOG.md.
The full table is in docs/api-stability.md (the source of truth); component reference in docs/API.md.
| Tier | Components |
|---|---|
| **Stable** | PCAMatryoshka, embedding compression pipeline, basic TurboQuantKV, TQE1 format |
| **Beta** | ADCIndex, TQEIndex (memmap + format v3), ShardedIndex, TurboQuantKVCache, the rank certificate (tqp certify/verify), the (A2) probe + quality monitor, the tqp index lifecycle, the runtime safe-fallback policy, FAISS / pgvector wrappers |
| **Experimental** | agent tool surface (agent_tools + examples/agentic), tqp query (SQL-ish workload interface), hub anatomy + anti-hub oracle (tqp anatomy/hubdiff), STRATA stratified instruments (area maps, min-over-strata gates, ABSTAIN, attach_strata — unreleased, master only), **vLLM V1 KV connector** (turboquant_pro.connectors — [2.0 roadmap](docs/ROADMAP_2.0.md)), quantizer plugin registry + conformance kit, read-operator provider registry + conformance kit (read_operators), CUDA/Triton fused decode, multi-node shard server (distributed.py), vLLM manager, model-weight compressor, PostgreSQL extension, NATS transport |
Scope & honesty: results are strongest on text embeddings and LLM workloads; multimodal APIs/presets exist but are less validated. "Beats RaBitQ" means under our matched-byte public protocol; "robust across every architecture" means every architecture tested. A recorded long-generation degradation of asym-NF4 KV quant did not survive re-validation (erratum 2026-08-15: measured nf4a gap −0.31 vs the recorded 13.7 on gov_report-512, n=40; a larger real collapse, 26.64, exists under symmetric NF4 only — see benchmarks/kvquant_matrix/REVAL-2026-08-08.md and the CHANGELOG Errata); readscope's C-11c measured operator drift along the sequence — a key compressed against an early operator is later read by a different one, with a 225%-of-uniform mispricing cost, sixteen head-cells against a paired null — and it has now been run against the real degradation curve and refuted as its mechanism (amended C-12, 2026-08-15, on the symmetric-NF4 collapse that does reproduce): teacher forcing removes the consistent growth (sign test p = 0.42) and the error's orientation does no work against a rotated null, so the collapse is autoregressive compounding of a large constant error, not drift. C-11c's drift stands as a measurement; its claim to explain this degradation is dead, recorded in calibration/records/c12-longgen-drift-sym.json. Negative results and caveats are kept first-class in docs/claims.md and the soundness audit.
Not to be confused with the similarly-named turboquant (the HuggingFace KV-cache implementation of the original ICLR TurboQuant algorithm). TurboQuant Pro is a broader, retrieval-first platform that uses that quantizer as one component.
pip install turboquant-pro # core (numpy only) + the `tqp` CLI
pip install turboquant-pro[torch] # + operator tracer (`tqp trace`)
pip install turboquant-pro[fast] # + AVX2 ADC kernel (pybind11)
pip install turboquant-pro[gpu] # + CuPy CUDA 12.x
pip install turboquant-pro[analysis] # + readscope + the tqp-readscope bridge
# (blind read-operator measurement)
pip install turboquant-pro[all] # everything (pgvector, FAISS, NATS, …)
from turboquant_pro import AutoConfig cache = AutoConfig.from_pretrained("llama-3-8b", target="balanced").build_cache() # K4/V3 ```
robust() is one codebook that stays near-fp16 across every architecture tested (including high-GQA models where symmetric NF4 silently collapses). See the KV keys finding.
| Goal | Start here |
|---|---|
| Compress a vector index and search it | [User guide](docs/guides/user_guide.md) · [fast ADC design](docs/DESIGN_fast_adc.md) |
| Keep an index larger than RAM (memmap / shards) | [Production lifecycle](docs/guides/production_lifecycle.md) |
| Compress an LLM KV cache correctly | [KV keys finding](docs/KV_KEYS_FINDING.md) · [operator-aware quantization](docs/guides/operator_aware_quantization.md) |
| Compress model weights | [Model-weight guide](docs/guides/model_weight_compression.md) |
| Certify & third-party-verify a deployment | [Certification](docs/guides/certification.md) |
| Reproduce a headline number yourself | [CLAIMS.md](CLAIMS.md) · [claim replay](docs/guides/claim_replay.md) |
| Integrate (pgvector, FAISS, NATS, vLLM, …) | [Integrations](docs/integrations.md) |
| Drive it from an agent (LangChain / DSPy / MCP / GPT) | [Agent tools](examples/agentic/) · [agent_tools](turboquant_pro/agent_tools.py) |
TurboQuant Pro 是一个高性能的量化工具库,旨在通过先进的量化技术优化大语言模型的 KV Cache 存储与推理效率。该项目通过极高的压缩比与精度保持能力,帮助开发者在有限的显存资源下实现更大规模模型的部署与高效推理。
v1.0.0 版本引入了革命性的 Learned codebook fine-tuning 技术,通过 LearnedQuantizer 在实际数据上训练 codebook,使相同位宽下的余弦相���度从 0.978 提升至 0.99+。此外,项目支持多模态压缩(ModalityPreset),预设了涵盖文本(BGE-M3, E5)、视觉(CLIP, SigLIP)、音频(Whisper)及代码的多种压缩方案,实现全场景覆盖。
您可以通过 Python 包管理工具 pip 快速安装 TurboQuant Pro。安装完成后,可以使用 cfg.build_quantizer()、cfg.build_cache() 或 cfg.build_manager() 等方法灵活构建所需的量化组件,实现从量化器到管理器的一站式部署。
项目提供了极简的 Quick Start 体验。开发者可以直接使用 TurboQuantKV.from_model 加载特定模型(如 llama-3-8b),并根据需求选择不同的压缩目标。通过 compress 方法,您可以将 KV tensor 压缩为 4-bit 或 3-bit 的紧凑格式,并利用 decompress 进行高精度的近似还原。
TurboQuant Pro 具备强大的 Auto-Config API,能够自动检测模型架构并选择最优的压缩配置。通过 AutoConfig.from_dict 结合 HuggingFace 的 config 字典,您可以轻松切换不同的 Target 预设:'quality' 追求极致精度,'balanced' 为官方推荐的默认平衡方案,而 'compression' 则专注于最大化压缩比。
本章节提供了 TurboQuant Pro 的完整功能指南,涵盖了所��公开 API 的详细定义、底层数学理论支撑以及针对不同应用场景的最佳实践建议,帮助开发者精准掌握每个组件的使用时机。
项目构建了完整的模块化流水线。通过 AutoConfig 构建的组件包括 TurboQuantKVCache、RoPEAwareQuantizer 及 TurboQuantKVManager。此外,项目还支持 Streaming KV Cache(两级缓存机制)、NATS Transport Codec(极高的事件压缩比)以及 vLLM Plugin,允许开发者构建从 PCA 降维到 TurboQuant 量化的全链路压缩 Pipeline。
高性能AI工具,优化LLM和向量数据库
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,TurboQuant 是一款质量优秀的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | turboquant-pro |
| 原始描述 | 开源AI工具:Embedding & KV cache compression for LLMs and vector databases. PCA-Matryoshka +。⭐19 · Python |
| Topics | AILLM缓存压缩 |
| GitHub | https://github.com/ahb-sjsu/turboquant-pro |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-21 · 更新时间:2026-06-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。