Context-Aware CodeLLM Eviction for AI-assisted Coding
Authors:
- 16 November 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 3287-3298
Abstract
AI-assisted coding tools powered by Code Large Language Models (CodeLLMs) are increasingly integrated into modern software development workflows. To address concerns around privacy, latency, and model customization, many enterprises opt to self-host these models. However, the diversity and growing number of CodeLLMs, coupled with limited accelerator memory, introduce practical challenges in model management and serving efficiency. This paper presents CACE, a novel context-aware model eviction strategy designed specifically to optimize self-hosted CodeLLM serving under resource constraints. Unlike traditional eviction strategies based solely on recency (e.g., Least Recently Used), CACE leverages multiple context-aware factors, including model load time, task-specific latency sensitivity, expected output length, and recent usage and future demand tracked through a sliding window. We evaluate CACE using realistic workloads that include both latency-sensitive code completion and throughput-intensive code reasoning tasks. Our experiments show that CACE reduces Time-to-First-Token (TTFT) by 70% and end-to-end (E2E) latency by 37%, while significantly lowering the number of model evictions by 55% compared to state-of-the-art systems. Ablation studies further demonstrate the importance of multi-factor eviction in balancing responsiveness and resource efficiency. This work contributes practical strategies for deploying scalable, low-latency AI coding assistants in real-world software engineering environments.Keywords
All Related Versions
This publication has 21 references indexed in Scilit:
- Full Line Code Completion: Bringing AI to Desktop2025
- Closing the Gap: A User Study on the Real-world Usefulness of AI-powered Vulnerability Detection & Repair in the IDE2025
- Privacy and Security Challenges in Large Language Models2025
- Multi-Language Software Development: Issues, Challenges, and SolutionsIEEE Transactions on Software Engineering, 2024
- Unveiling security, privacy, and ethical concerns of ChatGPTJournal of Information and Intelligence, 2023
- CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X2023
- A systematic evaluation of large language models of code2022
- Multi-Programming-Language Commits in OSS: An Empirical Study on Apache Projects2021
- A Large Scale Study of Multiple Programming Languages and Code Quality2016
- An empirical analysis of the utilization of multiple programming languages in open source projects2015