Memory limits how many requests a CPU language-model server can handle at once. llama.cpp commits its entire key-value (KV) cache before requests use it. Our kernel measurements identify start-up zero-filling and cache clearing as the cause. We adapt its multi-user server to commit pages on first write, return each finished request's pages to the kernel, and admit requests through an external proxy. The proxy reserves each request's maximum KV requirement, calculated from the model configuration, within a memory budget. In our tests, greedy output and perplexity match unmodified llama.cpp. For Qwen2.5-1.5B on identical requests with 16k context per slot and prompt caching disabled, unmodified llama.cpp uses 12.3 times as much peak memory. Across three sessions, we find no statistically detectable throughput difference (modified/unmodified ratio 0.996, 95% CI 0.92-1.08). Against unmodified llama.cpp running only the slots that fit and queueing other users, extra concurrency raises throughput 1.17-1.26x below CPU saturation. Once the CPU is saturated, throughput is similar. Requests start sooner, but each output token takes longer. We test 1-14B models on Intel and ARM. Of 199 outcomes predicted before testing, 179 match. We report every miss. Returning unused KV memory to the OS lets a CPU server handle more requests at once, but only improves throughput while the CPU has spare capacity.


翻译:暂无翻译

0
下载
关闭预览

相关内容

Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
推荐中的序列化建模:Session-based neural recommendation
机器学习研究会
18+阅读 · 2017年11月5日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 12月3日
VIP会员
最新内容
《评估人机编队性能的标准指标》
专知会员服务
16+阅读 · 11月30日
《美陆军装甲排的自动化任务分配模型》59页
专知会员服务
12+阅读 · 11月30日
乌克兰海陆空无人力量
专知会员服务
7+阅读 · 11月30日
超越技术:美战争部的AI变革管理
专知会员服务
11+阅读 · 11月27日
北约400亿美元反无人机能力投资建设
专知会员服务
9+阅读 · 11月25日
反小型无人机系统方案评估(27页)
专知会员服务
18+阅读 · 11月25日
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员