The demand for better prediction accuracy and higher execution performance in neural networks continues to grow. The emergence and success of Large Language Models (LLMs) have led to the development of many cloud-based tools for software engineering tasks such as code suggestion. While effective, cloud deployment raises concerns over privacy, latency, and reliance on connectivity. Running LLMs locally on personal devices such as laptops would address these issues by enabling offline use and reducing response time. However, local deployment is challenging: commodity devices lack high-performance accelerators like GPUs and are constrained by limited memory and compute capacity, making it difficult to execute large models efficiently.
We present Ditto, a novel method for optimizing both the model size of Code LLMs and their inference programs, particularly for statically-typed programming languages such as C. Our approach integrates two key components: (1) a model compression technique inspired by product quantization, which clusters model parameters into codebooks and quantizes them to lower bit widths while ensuring that outputs remain within a bounded error, as well as synthesizing the inference program for the quantized model; and (2) a compilation pass integrated into LLVM that automatically detects and replaces unoptimized General Matrix-Vector Multiplication (GEMV) operations—the most computationally intensive component in code models—with implementations from Basic Linear Algebra Subprograms (BLAS) libraries, which are highly optimized for runtime performance. The output of Ditto is an optimized and compiled executable for running selected Code LLMs. We evaluate Ditto on three popular Code LLMs—Code Llama, MagicCoder, and OpenCodeInterpreter, achieving up to 10.5× faster inference and 6.4× lower memory usage compared with their original inference pipeline, while maintaining accuracy close to that of the full-precision models (with an average loss of only 0.27% in pass@1). Furthermore, Ditto outperforms the state-of-the-art int8 quantization baseline, achieving up to 6.61% higher pass@1 accuracy, 2.2× speedup, and 1.6× memory usage reduction, which demonstrates the effectiveness of our approach.
Tue 7 JulDisplayed time zone: Eastern Time (US & Canada) change
16:00 - 17:30 | Code LLMResearch Papers / Industry Papers at MB 3.210 Chair(s): Michael Lyu The Chinese University of Hong Kong | ||
16:00 20mTalk | Neuron-Guided Interpretation of Code LLMs: Where, Why, and How? Research Papers Zhe Yin Shanghai Jiao Tong University, Xiaodong Gu Shanghai Jiao Tong University, Beijun Shen Shanghai Jiao Tong University Pre-print | ||
16:20 20mTalk | Beyond Language Boundaries: Uncovering Programming Language Families for Code Language Models Research Papers Shangbo Yun Shanghai Jiao Tong University, Jianghong Huang Shanghai Jiao Tong University, Xiaodong Gu Shanghai Jiao Tong University, Beijun Shen Shanghai Jiao Tong University Pre-print | ||
16:40 20mTalk | Engineering Pitfalls in AI Coding Tools: An Empirical Study of Bugs in Claude Code, Codex, and Gemini CLI Industry Papers Ruixin Zhang York University, Wuyang Dai York University, Hung Viet Pham York University, Gias Uddin York University, Canada, Jinqiu Yang Concordia University, Song Wang York University | ||
17:00 20mTalk | Compiling Code LLMs into Lightweight Executables Research Papers Jieke Shi Singapore Management University, Junda He Singapore Management University, Zhou Yang University of Alberta; CIFAR AI Chair; Alberta Machine Intelligence Institute , Chengran Yang Singapore Management University, Singapore, Mykhailo Klymenko CSIRO's Data61, Thong Hoang CSIRO's Data61, Xiwei (Sherry) Xu Data61, CSIRO, Zhenchang Xing CSIRO's Data61, David Lo Singapore Management University Pre-print | ||