feat(inference): CJK 保守 token 估算(T9 架构审查整改)
- Issue11: approximate_token_count 重写 - 新增 _is_cjk_char(CJK 统一表意/扩展A/假名/韩文/兼容/全角六大 Unicode 范围) - CJK 字符按 1.5 token/字符(旧 4 字符 1 token 严重低估,裁剪失效致 API 超限) - 其余字符仍 4 字符 1 token;最少 1 token - 同步 config-design.md token_estimation 注释 - 新增 4 用例,全量 186 passed / 100.00%(995 stmts/252 br)
This commit is contained in:
@@ -133,7 +133,7 @@ models:
|
||||
timeout_sec: 90
|
||||
|
||||
llm_calls:
|
||||
token_estimation: tiktoken # tiktoken | approximate;tiktoken 缺失自动回落 approximate(内置估算器)
|
||||
token_estimation: tiktoken # tiktoken | approximate;tiktoken 缺失自动回落 approximate(内置估算器,T9 起对 CJK 保守 ×1.5/字符)
|
||||
max_context_tokens: 32000 # 上下文窗口上限
|
||||
truncation_policy: # 超限裁剪策略(runtime §2.6)
|
||||
priority:
|
||||
|
||||
Reference in New Issue
Block a user