Files
projectAIpopular/config/config.yaml

50 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# 多专业小模型 + 路由模型系统 — 配置
# 默认全 mock 模式(零依赖、离线可跑)。要接入真实模型,把对应
# 后端 type 改为 hf / api 即可(见 README)。
# ============================================================
system:
name: multi-expert-router
version: 0.1.0
router:
low_confidence_threshold: 0.60 # 分类置信度低于此值 -> 直接走大模型
judge_fallback_threshold: 0.70 # Judge 质量分低于此值 -> 升级大模型
default_temperature: 0.2
classifier:
type: rule # rule(零依赖)| hftransformers
model: Qwen/Qwen3-0.6B
confidence_floor: 0.55
domains:
- code
- math
- legal
- medical
- general
experts:
code: { type: mock, model: Qwen/Qwen2.5-Coder-7B-Instruct }
math: { type: mock, model: Qwen/Qwen3-4B-Instruct }
legal: { type: mock, model: Qwen/Qwen3-4B-Instruct }
medical: { type: mock, model: Qwen/Qwen3-4B-Instruct }
general: { type: mock, model: Qwen/Qwen3-1.7B-Instruct }
fallback:
type: mock # mock | apiOpenAI 兼容,如 DeepSeek
model: deepseek-chat
base_url: https://api.deepseek.com/v1
api_key_env: DEEPSEEK_API_KEY
judge:
type: rule # rule(零依赖)| llm
model: Qwen/Qwen3-1.7B-Instruct
cache:
enabled: true
semantic_enabled: true # 语义缓存(字符 n-gram 相似度,零依赖)
similarity_threshold: 0.88
promote_frequency: 5 # 命中 N 次后提升为精确缓存