70% Smaller, 100% Accurate: Lossless LLM Compression for Efficient GPU Inference
Summary of Research on Retrieval-Augmented Generation and DFloat11 In recent years, large language models (LLMs) have gained significant attention due to their powerful capabilities in natural language processing. However, the deployment of these models in industrial settings faces substantial challenges, primarily related to high inference costs and resource limitations. Two recent studies address these issues by proposing innovative solutions: one focuses on optimizing vector embedding services for better cost efficiency, while the other introduces a novel compression framework for LLMs. Retrieval-Augmented Generation (WindVE) Researchers from an AI and machine learning institution known as the Zhiyuan Community analyzed the deployment costs of vector embedding technology in LLM inference services. They found that vector embedding and retrieval operations contribute significantly to latency, often accounting for up to 20% of the total delay. This observation led to the development of a theoretical formula that demonstrates how enhancing concurrent query processing can reduce deployment costs. The team then designed a queue manager to efficiently offload peak queries from CPUs to other processors, such as neural processing units (NPUs). The WindVE system, which leverages a CPU-NPU heterogeneous architecture, optimizes this process. The queue manager uses a linear regression model to determine the optimal queue depth, a critical parameter affecting system performance. By doing so, WindVE maximizes the utilization of the performance differences between CPUs and NPUs, effectively handling spikes in traffic. Experimental results show that WindVE's concurrent processing capability is 22.3% higher compared to non-offloading schemes. It also outperforms the currently leading vector embedding framework, FlagEmbedding, by maintaining low latency while reducing overall deployment costs. These findings are particularly significant for industries with strict cost controls, as they facilitate the adoption of LLMs in practical applications. Industry experts have praised the research, noting that it addresses a crucial problem in real-world deployments and offers a practical solution. The Zhiyuan Community, a research institute dedicated to advancing AI and machine learning, has been at the forefront of developing innovative technologies to streamline the deployment of LLMs. Dynamic-Length Float (DFloat11) Compression Framework Another key challenge in deploying LLMs is their large size, which requires significant memory resources. To tackle this issue, a research team developed the Dynamic-Length Float (DFloat11) compression framework. DFloat11 aims to reduce the volume of LLMs without compromising precision, making them more manageable for resource-constrained hardware. The design of DFloat11 is based on the low entropy characteristic of BFloat16 weight representations in LLMs. This low entropy indicates inefficiencies in existing storage formats. By applying entropy encoding, DFloat11 assigns dynamic lengths to weights based on their frequency of occurrence, achieving near-optimal compression results. To ensure efficient inference on compressed models, the team also developed a specialized GPU kernel for quick online decompression. The implementation of DFloat11 involves three main aspects: Memory-Efficient Lookup Tables (LUTs): Decomposing memory-intensive LUTs into multiple compact tables that fit entirely into the GPU's fast cache. Two-Stage Kernel Design: Using lightweight auxiliary variables to coordinate thread read/write positions. Transformer Block-Level Decompression: Minimizing latency during the inference process by adopting a block-level decompression strategy. Experiments conducted on the latest LLMs, including Llama-3.1, Qwen-2.5, and Gemma-3, demonstrated that DFloat11 can reduce model volumes by approximately 30% while maintaining output accuracy. Notably, compared to methods that offload part of the uncompressed model to CPUs, DFloat11 improves token generation throughput by 1.9 to 38.8 times. Furthermore, under a fixed GPU memory budget, DFloat11 can handle contexts 5.3 to 13.17 times longer than those processed by uncompressed models. One remarkable achievement is that DFloat11 allows for lossless inference of the ultra-large model Llama-3.1-405B, which has a size of 810GB, using a node equipped with eight 80GB GPU memories. The impact of DFloat11 extends beyond immediate deployment efficiencies. It sets a foundation for the development of even larger and more efficient language models in the future. The research team has open-sourced both the code and models, encouraging broader participation and further advancements in the field. The DFloat11 research team comprises experts from top research institutions and universities, bringing extensive experience in machine learning and distributed computing. Their innovation in this domain has been hailed by industry insiders as a significant breakthrough that will greatly enhance the accessibility and applicability of LLMs, especially in scenarios with limited resources. Industry Insights and Company Profiles Both studies, WindVE and DFloat11, have received positive evaluations from industry experts. They are seen as crucial steps toward making LLMs more cost-effective and scalable. The Zhiyuan Community, known for its commitment to AI and machine learning, continues to lead the way in optimizing these models for industrial use. Meanwhile, the open-source nature of DFloat11 fosters collaboration and innovation among the developer community, driving forward the field of big data and high-performance computing. These advancements not only highlight the ongoing efforts to overcome the technical and economic barriers associated with LLM deployment but also underscore the potential for significant progress in the coming years. As more research teams join the effort, the future of LLMs in various applications looks increasingly promising.