Open models include weights, tokenizers, and configuration—not a chat app. Follow one prompt through vLLM/Ollama: IDs become vectors, logits, text, then EOS. What makes it speak and stop?
下载开源大模型后,磁盘里躺着的不是可执行聊天程序,而是权重、分词器和配置等静态文件。我沿着一次真实推理拆开它们如何被 vLLM/Ollama 驱动:文本怎样变成 token、向量与概率,又怎样流式返回;最后究竟是 EOS、停止规则还是 EOF 让模型闭嘴?这篇文章还会解释 KV Cache 为何能让生成显著提速。
vLLM tuning should not stop at checking whether the API returns an answer. TTFT, TPOT, throughput, KV Cache usage, queue length, and tail latency form the real feedback loop.
vLLM 调优不能只看服务是否返回答案,而要围绕 TTFT、TPOT、吞吐量、KV Cache 使用率和尾延迟建立监控闭环。本文用本地脚本串起启动、测量、压测和指标采集。
In high-concurrency LLM serving, model weights are rarely the only memory problem. KV Cache grows with requests and tokens, so PagedAttention and Continuous Batching are the real keys to vLLM throughput.
高并发大模型服务真正容易爆掉的不是模型参数,而是随请求增长的 KV Cache。理解 PagedAttention 和 Continuous Batching,才能看懂 vLLM 为什么能把吞吐做上去。
70B模型配了4张80G卡,长文本一推就爆。查了一圈发现不是显存容量问题,是max_length设太大,kv cache按最坏情况预分配显存。上线前没做profiling,差点多花20万买卡。