← 回首頁
Ollama
Context length exceeded
Error: the input is longer than the model's context window
🔍 為什麼會發生
输入的 token 数超过模型的上下文窗口。比如 8K 上下文模型,输入了 10000 token。
🛠️ 怎麼修
- 截断输入:只保留最近 N 条对话
- 调大 num_ctx:在 API 请求里加
options: {num_ctx: 16384}(注意会多吃显存)
- 换更大上下文的模型:Qwen2.5 支持 128K,Llama 3.3 支持 128K
- 查模型上下文:模型页面一般会标
context length
看更多加密貨幣工具
本站為技術速查,內容僅供參考。錯誤訊息以官方文件為準。