memory reduction

  • Efficient Text Search with Binary and Int8 Embeddings


    200ms search over 40 million texts using just a CPU server + demo: binary search with int8 rescoringEfficient search over large text datasets can be achieved by using a combination of binary and int8 embeddings, significantly reducing memory and computation requirements. By embedding queries into dense fp32 embeddings and then quantizing them to binary, a binary index is used to quickly retrieve a subset of documents. These are then rescored using int8 embeddings, which are smaller and faster to load from disk, to achieve near-original search performance. This method allows for substantial savings in storage and memory while maintaining high retrieval accuracy, making it a cost-effective solution for large-scale text search applications. This matters because it enables faster and more efficient data retrieval, which is crucial for handling large datasets in various applications.

    Read Full Article: Efficient Text Search with Binary and Int8 Embeddings

  • EdgeVec v0.7.0: Fast Browser-Native Vector Database


    [P] EdgeVec v0.7.0: Browser-Native Vector Database with 8.75x Faster Hamming Distance via SIMDEdgeVec is an open-source vector database designed to run entirely in the browser using WebAssembly, offering significant performance improvements in its latest version, v0.7.0. The update includes an 8.75x speedup in Hamming distance calculations through SIMD optimizations, a 32x memory reduction via binary quantization, and a 3.2x acceleration in Euclidean distance computations. EdgeVec enables browser-based applications to perform semantic searches and retrieval-augmented generation without server dependencies, ensuring privacy, reducing latency, and eliminating hosting costs. These advancements make it feasible to handle large vector indices in-browser, supporting offline-first AI tools and enhancing user experience in web applications. Why this matters: EdgeVec's advancements in browser-native vector databases enhance privacy, reduce latency, and lower costs, making sophisticated AI applications more accessible and efficient for developers and users alike.

    Read Full Article: EdgeVec v0.7.0: Fast Browser-Native Vector Database

  • Exploring Ternary LLM Core with BitNet Inspiration


    Exploring a 1.58-bit / ternary LLM core inspired by BitNet (CUDA attention, GTX 1050 tests)An experimental project explores the potential of low-bit large language model (LLM) inference using ternary weights, inspired by the BitNet 1.58-bit paper. The project involves creating a custom LLM core that replaces FP16-heavy matrix multiplication layers with ternary linear layers, using a Straight-Through Estimator for training and a custom CUDA attention kernel without softmax to enhance compute efficiency and stability. Initial tests on a GTX 1050 show successful end-to-end training, reduced memory footprint, and coherent output in character-level Shakespeare training, although the model is not yet competitive with larger FP16/INT8 models and requires careful tuning. This matters because it explores the potential for efficient, low-power LLM inference on consumer GPUs, which could lead to more accessible AI technologies.

    Read Full Article: Exploring Ternary LLM Core with BitNet Inspiration