mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 12:55:26 +00:00
Phase 1-4 implementation of ADR-090 with 114 tests passing. ## Core Quantization (src/quantize/) - pi_quant.rs: PiQuantizer with π/k step sizes, Pi3BitBlock, Pi2BitBlock - pi_quant_simd.rs: NEON/AVX2/scalar dequantization kernels (2.1x speedup) - hadamard.rs: Fast Walsh-Hadamard O(n log n), INV-4 orthogonality verified - incoherence.rs: IncoherenceTransform for QuIP-style decorrelation - quip.rs: Q2_QuIP variant combining incoherence + 2-bit K-quant - security.rs: WeightIntegrity, GGUF validation, bounds checking ## QAT Infrastructure (src/qat/) - config.rs: QatConfig, SteVariant, QuantGranularity with builder pattern - ste.rs: Straight-through estimator (Standard, Clipped, LSQ, EWGS) - differentiable_quant.rs: DifferentiableQuantizer trait, PiQuantDifferentiable - calibration.rs: CalibrationEngine with mixed-domain support - distillation.rs: Teacher-student composite loss (L_task + L_KD + L_reasoning) - reasoning_loss.rs: Chain-of-thought fidelity preservation - training_loop.rs: QatTrainer orchestrator with checkpointing - lora_qat.rs: Memory-efficient LoRA-QAT (50 MB vs 114 GB for full QAT) ## WASM Integration (ruvllm-wasm/) - pi_quant_wasm.rs: PiQuantWasm with SIMD128 kernel, JSON serialization - quant_bench_wasm.rs: QuantBenchWasm for in-browser benchmarking - Feature flags: pi-quant, qat ## Tests (114 passing) - pi_quant_tests.rs (35): Round-trip, block packing, bounds checking - hadamard_tests.rs (23): Orthogonality, invertibility, energy preservation - ste_tests.rs (24): Gradient correctness, PyTorch reference comparison - simd_equivalence_tests.rs (19): SIMD ≈ scalar within 1 ULP (INV-8) - acceptance_gates.rs (13): G1-G5 quality and security gates ## Benchmarks (benches/pi_quant_bench.rs) - Hadamard 4096: 5.3 μs (target <50 μs) ✓ - NEON dequant: 2.54 GiB/s (2.1x over scalar) - QAT backward: 7.3 Gelem/s ## Invariants Verified - INV-1: STE gradient flow - INV-2: Scale positivity (α > 0) - INV-3: Step size constraint (π/k) - INV-4: Hadamard orthogonality - INV-5: Calibration provenance - INV-8: SIMD ≈ scalar (≤1 ULP) Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| adr | ||
| analysis | ||
| api | ||
| architecture | ||
| benchmarks | ||
| cloud-architecture | ||
| cnn | ||
| code-reviews | ||
| dag | ||
| development | ||
| examples | ||
| gnn | ||
| guides | ||
| hnsw | ||
| hooks | ||
| implementation | ||
| integration | ||
| nervous-system | ||
| optimization | ||
| plans/subpolynomial-time-mincut | ||
| postgres | ||
| project-phases | ||
| publishing | ||
| research | ||
| ruvllm | ||
| security | ||
| sparse-inference | ||
| sql | ||
| testing | ||
| training | ||
| .gitkeep | ||
| .nojekyll | ||
| index.html | ||
| INDEX.md | ||
| README.md | ||
| REPO_STRUCTURE.md | ||
| research-openfang.md | ||
RuVector Documentation
Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.
📚 Documentation Structure
docs/
├── adr/ # Architecture Decision Records
├── analysis/ # Research & analysis docs
├── api/ # API references (Rust, Node.js, Cypher)
├── architecture/ # System design docs
├── benchmarks/ # Performance benchmarks & results
├── cloud-architecture/ # Cloud deployment guides
├── code-reviews/ # Code review documentation
├── dag/ # DAG implementation
├── development/ # Developer guides
├── examples/ # SQL examples
├── gnn/ # GNN/Graph implementation
├── guides/ # User guides & tutorials
├── hnsw/ # HNSW index documentation
├── hooks/ # Hooks system documentation
├── implementation/ # Implementation details & summaries
├── integration/ # Integration guides
├── nervous-system/ # Nervous system architecture
├── optimization/ # Performance optimization guides
├── plans/ # Implementation plans
├── postgres/ # PostgreSQL extension docs
├── project-phases/ # Development phases
├── publishing/ # NPM publishing guides
├── research/ # Research documentation
├── ruvllm/ # RuVLLM documentation
├── security/ # Security audits & reports
├── sparse-inference/ # Sparse inference docs
├── sql/ # SQL examples
├── testing/ # Testing documentation
└── training/ # Training & LoRA docs
Getting Started
- guides/GETTING_STARTED.md - Getting started guide
- guides/BASIC_TUTORIAL.md - Basic tutorial
- guides/INSTALLATION.md - Installation instructions
- guides/AGENTICDB_QUICKSTART.md - AgenticDB quick start
- guides/wasm-api.md - WebAssembly API documentation
Architecture & Design
- architecture/ - System architecture details
- cloud-architecture/ - Global cloud deployment
- adr/ - Architecture Decision Records
- nervous-system/ - Nervous system architecture
API Reference
- api/RUST_API.md - Rust API reference
- api/NODEJS_API.md - Node.js API reference
- api/CYPHER_REFERENCE.md - Cypher query reference
Performance & Benchmarks
- benchmarks/ - Performance benchmarks & results
- optimization/ - Performance optimization guides
- analysis/ - Research & analysis docs
Security
- security/ - Security audits & reports
Implementation
- implementation/ - Implementation details & summaries
- integration/ - Integration guides
- code-reviews/ - Code review documentation
Specialized Topics
- gnn/ - GNN/Graph implementation
- hnsw/ - HNSW index documentation
- postgres/ - PostgreSQL extension docs
- ruvllm/ - RuVLLM documentation
- training/ - Training & LoRA docs
Development
- development/CONTRIBUTING.md - Contribution guidelines
- development/MIGRATION.md - Migration guide
- testing/ - Testing documentation
- publishing/ - NPM publishing guides
Research
- research/ - Research documentation
- cognitive-frontier/ - Cognitive frontier research
- gnn-v2/ - GNN v2 research
- latent-space/ - HNSW & attention research
- mincut/ - MinCut algorithm research
🚀 Quick Links
For New Users
- Start with Getting Started Guide
- Try the Basic Tutorial
- Review API Documentation
For Cloud Deployment
- Read Architecture Overview
- Follow Deployment Guide
- Apply Performance Optimizations
For Contributors
- Read Contributing Guidelines
- Review Architecture Decisions
- Check Migration Guide
For Performance Tuning
- Review Optimization Guide
- Run Benchmarks
- Check Analysis
📊 Documentation Status
| Category | Directory | Status |
|---|---|---|
| Getting Started | guides/ | ✅ Complete |
| Architecture | architecture/, adr/ | ✅ Complete |
| API Reference | api/ | ✅ Complete |
| Performance | benchmarks/, optimization/, analysis/ | ✅ Complete |
| Security | security/ | ✅ Complete |
| Implementation | implementation/, integration/ | ✅ Complete |
| Development | development/, testing/ | ✅ Complete |
| Research | research/ | 📚 Ongoing |
Total Documentation: 170+ comprehensive documents across 25+ directories
🔗 External Resources
- GitHub Repository: https://github.com/ruvnet/ruvector
- Main README: ../README.md
- Changelog: ../CHANGELOG.md
- License: ../LICENSE
Last Updated: 2026-02-26 | Version: 2.0.4 (core) / 0.1.100 (npm) | Status: Production Ready