Auto-Coder常用秘籍 autocoder.chat启动之后的处理

Auto-Coder手册:‍‌​​⁠​‍​‍‍‌‍‍⁠​​‬‌​​‬​‍⁠‬⁠⁠​​​‍​‌‬​​​‌‬‬⁠‍‌​‌​Auto-Coder.Chat: 通向智能编程之路 - 飞书云文档

控制窗口大小与压缩上下文

看到这篇文档里讲过:https://skywalk.blog.csdn.net/article/details/149067759

复制代码
/conf context_prune_safe_zone_tokens:30720
# /conf index_filter_model_max_input_length:30720
/conf index_filter_model_max_input_length:24576
/conf conversation_prune_safe_zone_tokens:24576

当时手里的模型token只有32k,所以三个参数都针对默认值进行了下调,下面为配置参数和默认值:

conversation_prune_safe_zone_tokens 上下文剪枝 51200

conversation_prune_safe_zone_tokens 索引文件建议51200

context_prune_safe_zone_tokens 单文件 24576

配置示例

64k窗口模型

复制代码
/conf conversation_prune_safe_zone_tokens:51200
/conf index_filter_model_max_input_length:51200
/conf context_prune_safe_zone_tokens:24576

128k窗口模型

对于token 窗口是128k的模型,可以选择翻一倍,即:

复制代码
/conf conversation_prune_safe_zone_tokens:102400
/conf index_filter_model_max_input_length:102400
/conf context_prune_safe_zone_tokens:49152

三个配置参数详解

conversation_prune_safe_zone_tokens

如果上下文过长,会触发剪枝动作。具体长度通过

/conf conversation_prune_safe_zone_tokens:51200

默认值为: 51200。 如果是 gemini 2.5 或者 quasar 等窗口很长的模型(code_model,chat_model,model),可以再翻一倍。

index_filter_model_max_input_length

索引文件很大(具体通过 index_filter_model_max_input_length) 来的判断是不是要分割处理。

/conf index_filter_model_max_input_length:51200

默认:51200 。 如果是窗口很大的的模型(index_model,model),可以试着至少提升一倍。

context_prune_safe_zone_tokens

配置单文件剪枝阈值

/conf context_prune_safe_zone_tokens:24576

碰到的问题

不过我也碰到了设置之后还是撑满的情况:

复制代码
conversation tokens: 180560 -> 101349 (conversation round: 352)
╭─ 🔥 Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error: Connection failed. Error: r code: 400 - {'object': 'error', 'message': "This model's maximum context length is 131072 tokens. However, you │
│ requested 144864 tokens (136768 in the messages, 8096 in the completion). Please reduce the length of the messages or completion.", 'type':       │
│ 'BadRequestError', 'param': None, 'code': 400}    

所以我只能/auto /new 一下重新运行

相关推荐
Coder_Boy_4 小时前
技术发展的核心规律是「加法打底,减法优化,重构平衡」
人工智能·spring boot·spring·重构
牛奔4 小时前
Go 如何避免频繁抢占?
开发语言·后端·golang
会飞的老朱6 小时前
医药集团数智化转型,智能综合管理平台激活集团管理新效能
大数据·人工智能·oa协同办公
聆风吟º7 小时前
CANN runtime 实战指南:异构计算场景中运行时组件的部署、调优与扩展技巧
人工智能·神经网络·cann·异构计算
寻星探路8 小时前
【深度长文】万字攻克网络原理:从 HTTP 报文解构到 HTTPS 终极加密逻辑
java·开发语言·网络·python·http·ai·https
Codebee9 小时前
能力中心 (Agent SkillCenter):开启AI技能管理新时代
人工智能
lly2024069 小时前
Bootstrap 警告框
开发语言
2601_9491465310 小时前
C语言语音通知接口接入教程:如何使用C语言直接调用语音预警API
c语言·开发语言
曹牧10 小时前
Spring Boot:如何测试Java Controller中的POST请求?
java·开发语言
聆风吟º10 小时前
CANN runtime 全链路拆解:AI 异构计算运行时的任务管理与功能适配技术路径
人工智能·深度学习·神经网络·cann