Revert "P8:/portal/daemon/extract 萃取模型 scout → qwen3-30b(真筆記實測:品質不降、額度天花板翻倍)"

This reverts commit aa6b899276.
This commit is contained in:
uncle6me-web
2026-08-09 00:51:41 +08:00
parent 3447efc94e
commit 894d9abeb1
2 changed files with 3 additions and 22 deletions
+3 -12
View File
@@ -780,18 +780,9 @@ portalRouter.post('/portal/daemon/extract', (c) =>
`## 關聯\n- 實體A ${REL} 關係 ${REL} 實體B3-8 行,用上面實體名)\n\n原稿:\n${srcText}`;
try {
// 🔴 模型選型(P8 短板齊平,2026-08-09 實測換的)
// 免金鑰路的短板=Workers AI 免費 10,000 neurons/日。用 leo 真實筆記 8 篇
// × 5 模型實測(arcrun-rag docs/benchmarks/p8-extractor-quality/
// usage.neurons 為 CF 回應原生計量):
// llama-4-scout84 n/檔 ⇒ 119 檔/日(t181 選的舊現役,當時只比延遲與完整度)
// qwen3-30b-a3b-fp843 n/檔 ⇒ 232 檔/日,格式合規 8/8、
// 三元組平均 7.6 條全可解析(scout 5.0),品質不降反升
// granite-4.0-h-micro11.7 n/檔(最便宜)但 5/8 缺段、三元組幾乎全滅 ⇒ 否決
// ⇒ 換 qwen3-30b:同額度天花板直接翻倍,品質有據(P8:要換模型就要實測並講清楚)。
// (聊天用的 workers_ai_chat recipe 仍是 scout,選型見 api-recipe-seeds.ts:140
// 萃取與聊天自此分開選型——萃取是額度大戶,聊天量小不動。)
const out = (await c.env.AI.run('@cf/qwen/qwen3-30b-a3b-fp8', {
// 模型與 workers_ai_chat recipe 同一支(選型實測見 api-recipe-seeds.ts:140
// llama-4-scout 2373ms/答案最完整;對照 Gemini gemma-4-31b-it 16.87 秒且吐英文草稿)。
const out = (await c.env.AI.run('@cf/meta/llama-4-scout-17b-16e-instruct', {
messages: [{ role: 'user', content: prompt }],
max_tokens: 2048,
temperature: 0.2,