Repository navigation
Add lossless vector compression research, benchmarks, and EXPERIMENTAL implementation - #70
Merged
Merged
Conversation
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
…nd hardware optimizations Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Explore lossless compression mechanisms for large vectors
Add lossless vector compression research, benchmarks, and hardware-optimized implementations
Dec 8, 2025
Owner
|
@copilot Ja implementieren, mit Hinweis auf "wissenschaftlicher" Versuch und möglichen Rollback (derzeite Implementierung ggf. nur auskommentieren. |
- Add lossless compression utilities (Sparse CSR, Delta+VarInt, Dictionary) - Integrate into VectorIndexManager as optional experimental feature - Preserve existing SQ8 implementation (not deleted, only as fallback) - Add configuration support via config:vector_compression_lossless - Disabled by default - must be explicitly enabled - Clear experimental warnings and rollback documentation - Priority: Lossless > SQ8 > Raw storage - Full backward compatibility maintained Co-authored-by: makr-code <[email protected]>
Contributor
Author
Implemented lossless vector compression as experimental feature (commit 12aeeac). Key points:
Configuration: {
"enabled": false, // Default: disabled
"mode": "auto", // Auto-select best method
"fallback_to_sq8": true
}Rollback safety:
Documentation:
|
- Add missing includes: <cstring> for memcpy, <unordered_set> - Add range validation for Delta+VarInt to prevent int32 overflow - Add debug logging when lossless compression is not applicable - Improve error handling and diagnostics Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
Add lossless vector compression research, benchmarks, and hardware-optimized implementations
Add lossless vector compression research, benchmarks, and EXPERIMENTAL implementation
Dec 8, 2025
makr-code
marked this pull request as ready for review
December 8, 2025 14:25
10 tasks
7 of 26 tasks
11 of 25 tasks
Copilot AI
added a commit
that referenced
this pull request
May 8, 2026
…resolved - SphincsPlus (#14): GenerateKeyPairFn/SignFn/VerifyFn bridges with thread-safe static setters; Ed25519 simulation retained as default; fail-closed on throw for sign/verify; tests in tests/test_sphincsplus_bridge.cpp - Argon2idKeyDerivationService (#31): DeriveKeyFn bridge; setDeriveKeyFn() checks before #if THEMIS_HAS_ARGON2 block; exception falls through to built-in; tests in tests/test_kdf_argon2_bridge.cpp - NCCLVectorBackend (#67): AllReduceFn bridge; setAllReduceFn(); stub allReduce() delegates to fn when set (fail-closed on throw); tests in tests/test_nccl_allreduce_bridge.cpp - OpenCLVectorBackend (#69): ComputeDistancesFn bridge; setComputeDistancesFn(); stub computeDistances() delegates to fn (fail-closed on throw); tests in tests/test_opencl_bridge.cpp - OneAPIVectorBackend (#70): ComputeDistancesFn bridge added to stub class in oneapi_backend.cpp; setComputeDistancesFn(); computeDistances() delegates to fn (fail-closed on throw) - OPA adapter (#16): marked RESOLVED — WasmEvalFn bridge already present - src/STUB_INVENTORY.md: rows #14/#16/#31/#67/#69/#70 marked RESOLVED with strikethrough pattern; footer updated to 177 resolved / 74 active / 🟡 30 Co-authored-by: Copilot <[email protected]> Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
May 8, 2026
… test API correctness Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/e537e2a5-d799-4c9c-acc0-0ae57a3d27b4 Co-authored-by: makr-code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Research and benchmark suite for lossless vector compression mechanisms, including comparative analysis with lossy methods, hardware-specific optimizations (SIMD, GPU, AI accelerators), and EXPERIMENTAL production implementation.
Documentation
docs/performance/performance_vector_compression_lossless.md(1,247 lines)Test Suite
tests/test_vector_compression_lossless.cpp(595 lines)Benchmarks
benchmarks/bench_vector_compression_lossless.cpp(829 lines)benchmarks/bench_lossy_vs_lossless.cpp(871 lines)benchmarks/VECTOR_COMPRESSION_BENCHMARK_README.md(472 lines)NEW: Production implementation integrated into VectorIndexManager
Status: Scientific experiment - disabled by default, may be rolled back
Files Added:
include/utils/lossless_vector_compression.h- Core compression algorithmsinclude/utils/lossless_vector_integration.h- VectorIndexManager integrationinclude/utils/LOSSLESS_COMPRESSION_README.md- Usage and rollback guideFiles Modified:
src/index/vector_index.cpp- Integrated experimental compression (existing SQ8 implementation preserved)Safety Features:
Configuration (disabled by default):
{ "enabled": false, // Must be explicitly enabled "mode": "auto", // Auto-select best method "sparse_threshold": 0.95, "fallback_to_sq8": true // Use existing SQ8 if not applicable }Enable experimental feature:
curl -X PUT http://localhost:8765/config/vector_compression_lossless \ -d '{"enabled": true, "mode": "auto"}'Rollback (if needed):
curl -X PUT http://localhost:8765/config/vector_compression_lossless \ -d '{"enabled": false}'Key Findings
Example Usage
Integration
Experimental lossless compression is now integrated into
VectorIndexManagerwith:Note: This is a scientific experiment. The implementation can be easily disabled or removed if needed. See
include/utils/LOSSLESS_COMPRESSION_README.mdfor complete rollback instructions.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.