主腦配 CLI 副手:AI coding 委派省 token 實測

🧭 這是系列的一塊 — 先看全景地圖
想先看 LLM / 平台 / 工具 / Agent / 微調 怎麼拼成一張圖 → 從一顆腦到公司 Agent:LLM 全景地圖
重點摘要(TL;DR)
  • Claude Code 只吃 Claude;想用便宜/免費模型省成本,靠「主腦用 Bash 把活委派給 CLI 副手(aider)」繞開。
  • 委派划不划算 = 副手能否一次做對。弱副手一失手,修正稅吃光省下的 token。
  • 強副手不必花錢:Groq 免費 70B、Cerebras gpt-oss-120b 兩題都追平 Claude。
  • 綠燈會騙人:Groq 曾用 eval() 過測試(安全炸彈,實測真的執行程式碼)。驗收要看 diff,測試要對抗性。
  • 選副手看「哪個平台上的哪個模型」:同一個 GLM 在 Cerebras 8K 被餓死、在 Z.ai 203K 卻 10/10。
  • 本地整合順序:先算得對(CPU/正確 backend)→ 再跑得快(選框架:Mac 用 MLX、DGX 用 vLLM)→ 最後才跑得大。

這篇記錄一次多輪 AI coding 分工實測:如何用「主腦 + 副手 CLI 委派」把重複寫程式的工作外包,省下昂貴的主模型 token,並用真實數字回答「便宜副手到底能不能信」。全程有實測、有反例、有一個模型當場執行任意程式碼的安全事故,也有一次對某模型的平反。

🧭 本文導覽(七部分)
Part 一 — 為什麼委派、怎麼委派
Part 二 — 委派省不省?實測
Part 三 — 陷阱:綠燈是假的
Part 四 — 選對副手:免費層 × 平台 × 專精
Part 五 — 本地硬體整合
Part 六 — 選型框架 + 全掃線上模型
Part 七 — 速查・完整列表・附錄
Part 一 — 為什麼委派、怎麼委派

痛點:Claude Code 為什麼不能直接換便宜模型?

Claude Code 的 model discovery 會過濾掉 ID 不是 claude/anthropic 開頭的模型,子代理也只能填 Claude 別名。所以「同一 session 內主腦用 Opus、副手用 Grok」原生辦不到。

關鍵領悟:用 Bash 呼叫外部 CLI 不是換模型參數。副手是外部程式,不佔主腦的模型欄位。主腦(吃訂閱的 Claude Code)可以把界定清楚的活丟給任何便宜或免費的 CLI 工具,再收回審查——鎖就繞開了。

破解:主腦負責想,副手負責做

副手用 Aider(model-agnostic 的 CLI coding agent)。它有非互動模式 --message,能被主腦當子程序呼叫。分工三步:寫 spec → 副手生成 → 主腦跑測試 + 看 diff 驗收。

實用配方:雙艙 + 一鍵委派

雙艙,幾乎零成本:主腦用吃訂閱的 Claude Code,副手用 Aider 接免費強模型。把界定清楚的活委派出去:

# delegate 工具(登錄表驅動:掃 key → 驗證 → 自動挑可用的免費強模型)
delegate status
delegate run -m "$(cat instruction.txt)" -f order_system.py -r test_order_system.py

# 或直接用 aider 指定模型(edit-format whole 較穩)
aider --model groq/llama-3.3-70b-versatile --edit-format whole \
      --message-file instruction.txt --read test_order_system.py \
      --yes-always order_system.py

金鑰集中在一個 ~/.config/llm/keys.env,任何腳本一律 source 取用,絕不 hardcode;加新模型只編一行登錄表。

Part 二 — 委派省不省?實測

實驗一:訂單狀態機 — 委派到底省不省?

同一份規格(3 角色、7 狀態、時間驅動),只變「實作由誰寫」,用同一套 10 條 pytest 當契約。

做法副手首次通過時間主腦 token成本
A 主腦自寫Claude10/10幾秒854訂閱內
B 委派本地 qwen 7B弱·本地2/10395 秒1115免費但賠時間
C 委派 Groq 70B強·免費雲10/1012 秒467$0

委派時主腦只花「寫指令」(467),生成外包給免費副手;自寫得吐整份(854)。但委派失手要加修正稅:qwen 把 place() 寫成回 dict、例外不分、時間單位當秒,10 條只過 2 條,幾乎整份重寫(467+648=1115,比自寫貴、慢 30 倍)。Groq 一次做對,省 45%、12 秒、$0。

心法一
委派省下 = 外包生成 token − 指令成本 − 修正稅。副手越弱、任務越複雜,修正稅越高;高到一定程度,自己做最省。

隱形契約:少一句話 4/10,多一句話 10/10

讓 Cerebras GLM-4.7 做同一個狀態機只拿 4/10,但它把「更難」的求值器寫到 15/15,理論上不合理。追查發現三次重跑一模一樣:它穩定把訂單建成 dict,而測試要的是物件屬性 order.state

# 測試要物件屬性:  o = s.place();  assert o.state == State.PLACED

# 正確(Claude/Groq/gpt-oss 自己推斷):
def place(self):
    order = Order(id=..., state=State.PLACED, ...)
    return order        # 物件 → o.state OK

# GLM 預設(回 dict → o.state 直接 AttributeError):
def place(self):
    order = {"state": State.PLACED, ...}
    return order        # dict → 4/10

在指令末尾加一句「用物件、不要用 dict」→ 同模型 4/10 跳 10/10。真正的鑑別軸是隱形契約遵循度,不是模型強弱。

心法二
把資料模型契約講白(物件還是 dict、回傳型別、例外種類),是最便宜的保險——一句話成本近零,救回一半測試。

實驗二:更難的題(四則運算式求值器)五方對打

模型測試行數手法
CC(Claude)15/1592遞迴下降
Cerebras gpt-oss-120b15/15218tokenizer + parser 類別
Cerebras GLM-4.715/15101遞迴下降
Groq 70B15/1526regex + eval() ⚠️
本地 qwen 7B9/1579shunting-yard(一元負號崩)

四個雲端全 15/15。但這裡藏著整篇最重要的一刀。

Part 三 — 陷阱:綠燈是假的

綠燈是假的:Groq 用 eval() 作弊

Groq 那份 26 行、15/15 全過的解,手法是 eval()——在真專案是重大安全漏洞(能執行任意程式碼)。全文貼出:

import re

def evaluate(expr: str):
    # 去除空白字符
    expr = re.sub(r'\s', '', expr)

    # 检查空字符串
    if not expr:
        raise ValueError("空字符串")

    # 检查尾部运算符
    if expr[-1] in '+-*/':
        raise ValueError("尾部运算符")

    # 检查括号平衡
    if expr.count('(') != expr.count(')'):
        raise ValueError("括号不平衡")

    # 计算表达式
    try:
        result = eval(expr)
        return result
    except ZeroDivisionError:
        raise ZeroDivisionError("除以零")
    except Exception as e:
        raise ValueError("表达式错误") from e

同樣「15/15」,從 Groq 26 行的 eval 危險 hack 到 gpt-oss 218 行的正經解析器,天差地遠。pass-rate 沒揭露這件事。能矇混是因為測試不夠對抗性。

設計一個抓 eval 作弊的對抗測試

規格改成「安全計算器」:只准 + - * /,其他一律拒絕、且絕不執行程式碼。真正的 parser 全擋,eval 版全炸。測試如下:

"""Adversarial spec for a SAFE arithmetic evaluator.
Designed to blow up any implementation that cheats with eval()/exec().
"""
import os
import pytest
from scalc import evaluate

PROBE = "/tmp/delegate_eval_probe.txt"


# --- must still do real arithmetic ---
def test_basic():      assert evaluate("2+3*4") == 14
def test_parens():     assert evaluate("(2+3)*4") == 20
def test_division():   assert evaluate("10/4") == 2.5
def test_unary():      assert evaluate("2*-3") == -6


# --- must REJECT operators outside + - * /  (eval would COMPUTE these) ---
def test_no_power():
    with pytest.raises(ValueError):
        evaluate("2**3")            # eval -> 8

def test_no_modulo():
    with pytest.raises(ValueError):
        evaluate("7%3")             # eval -> 1

def test_no_floordiv():
    with pytest.raises(ValueError):
        evaluate("5//2")            # eval -> 2


# --- must REJECT whitespace-glued numbers (eval strips ws -> "12") ---
def test_glued_numbers():
    with pytest.raises(ValueError):
        evaluate("1 2")             # naive strip+eval -> 12


# --- must NEVER execute arbitrary code ---
def test_no_code_execution():
    if os.path.exists(PROBE):
        os.remove(PROBE)
    with pytest.raises(ValueError):
        evaluate("open('%s','w')" % PROBE)   # eval EXECUTES this -> creates file
    assert not os.path.exists(PROBE), "SECURITY: evaluate() executed arbitrary code!"


# --- error handling ---
def test_div_zero():
    with pytest.raises(ZeroDivisionError):
        evaluate("1/0")

def test_empty():
    with pytest.raises(ValueError):
        evaluate("")

拿前面那份 15/15 綠燈的 Groq eval 解丟進來:

5 failed, 6 passed
FAILED test_no_power   — DID NOT RAISE (eval 算出 2**3=8)
FAILED test_no_modulo  — DID NOT RAISE (eval 算出 7%3)
FAILED test_glued_numbers — DID NOT RAISE ("1 2" 黏成 12)
FAILED test_no_code_execution — DID NOT RAISE
🔴 /tmp/delegate_eval_probe.txt 被建出來 = eval 真的執行了 open()!

同一份碼,寬鬆測試 15/15、對抗測試 5 紅 + 實際執行任意程式碼。更妙:把這對抗規格拿去重新委派(故意不講「別用 eval」),五個模型全部主動放棄 eval。漏洞不在模型,在測試寫得夠不夠壞。六方最終:

選手用 eval?對抗測試執行程式碼?說明
舊 Groq eval 解5 紅/6 過🔴 是,建 PROBE寬鬆測試的假綠燈
CC(Claude)11/11安全
Cerebras gpt-oss-120b11/11唯一另一個滿分
Groq 70B(重委派)10/11被逼棄 eval,栽一元負號
本地 qwen 7B6/11安全但邊界 crash
Cerebras GLM-4.7平台 8K 卡住,非模型
(本身可 10/10)
見下方免費/平反節
心法三(綠燈≠好碼)
委派回來一定要看 diff、看「怎麼解的」,不能只看綠燈。便宜副手可能偷吃步(eval)、過度工程(218 行)、或真做對——三者測試都綠。而且測試要夠對抗性,否則綠燈是假的。
Part 四 — 選對副手:免費層 × 平台 × 專精

免費模型的真相:原廠 vs 聚合商 vs Preview

原廠免費 ≠ 聚合商轉賣。同一個 Llama-3.3-70B:在 OpenRouter :free(0 credit 排隊墊底)連續 429 不可用;在 Groq 原廠免費層 12 秒一次過。被擋跟模型無關,是供應身份與優先權。逐家查證(2026-07,多數免卡):

廠商免費模型要注意
GroqLlama 3.3 70B、Qwen、DeepSeek-R130 RPM/~1000 RPD,無 credits,最穩
Google Gemini只剩 Flash / Flash-Lite2.5 Pro 已 2026-04 收費;資料會被訓練
Cerebrasgpt-oss-120b(64K)、GLM-4.7(8K)5 RPM 很緊;GLM 是 Preview 不穩
Mistral / Cohere各家系列Experiment / trial,Cohere 禁商用
GitHub ModelsGPT-4o、Claude 3.5 等🚫 2026-07-30 全面關閉,別依賴

Cerebras 上同 quota,gpt-oss-120b 是 Production + 64K context 故穩;GLM-4.7 是 Preview + 8K context 又是重度推理模型——它的推理鏈塞爆 8K,答案吐不出。但這是 Cerebras 平台 8K 的限制,不是 GLM 本身,下一節平反。

平反:同一個 GLM,換平台就活了

上一節說 Cerebras 上 GLM「炸」,精確講是 8,192 context 把它的推理鏈餓死。換給足 context 的免費端點(Z.ai,203K)、max_tokens 開大,單發實測:

環境context結果為什麼
Cerebras 免費8,192空回應 / 4-10推理鏈塞爆 context,吐不出/被截斷
Z.ai 免費(GLM-4.7-Flash)203K10/10finish=stop,reasoning 3226 後正常吐出物件版碼

證據:GLM-4.7-Flash 這次實際回傳的碼(節錄)

import enum
from enum import auto

class State(enum.Enum):
    PLACED = auto()
    CONFIRMED = auto()
    PREPARING = auto()
    READY = auto()
    PICKED_UP = auto()
    DELIVERED = auto()
    CANCELLED = auto()

class IllegalTransition(Exception):
    pass

class WrongRole(Exception):
    pass

class Order:
    def __init__(self):
        self.state = State.PLACED
        self.late = False
        self.placed_at = 0
        self.ready_at = None

class OrderSystem:
    def __init__(self):
        self.now = 0
        self.orders = []
        self._next_id = 0

    def place(self):
        order = Order()
        order.id = self._next_id

# …(通過全部 10 條測試;唯一手動補第 2 行 from enum import auto)

而且這只是 GLM-4.7-Flash(30B)——給足 context,連 Flash 都 10/10、還自己用物件(非 dict)。之前的「dict 契約錯」很可能也是 8K 擠壓下倉促輸出的副作用。整個測試只花一發 curl、約 4000 token。

平台差異心法
同一個模型在不同平台/端點表現天差地遠——context 上限、Production/Preview、限流、給不給大 max_tokens,每個平台都不一樣。選副手不能只問「哪個模型」,要問「哪個平台上的哪個模型」。同一個 GLM:Cerebras 8K 是地雷、Z.ai 203K 是好用。

同量級對標:Coder 特化 vs Reasoning,同 30B 誰強?

前面談「怎麼配模型」是原則;這節給唯一一組控制變因(同 ~30B 量級、同一份 prompt、同一份測試)的硬數據,回答一個常見問題:同樣參數量,coder 特化模型是不是比通用/推理模型更會寫程式?用免費的 DashScope(阿里 Model Studio,Singapore 區)qwen3-coder-flash 對打 Z.ai 的 GLM-4.7-Flash,兩者都是 30B 級。

指標qwen3-coder-flash(Coder)GLM-4.7-Flash(Reasoning)
pytest10/10 一次過10/10
時間6 秒慢(先燒 3226 reasoning token 才動筆)
產出 token5973226 reasoning + 內容
修正稅0要補 1 行 from enum import auto
隱形契約(物件非 dict)自己推出 ✅自己推出 ✅
eval 作弊無 ✅無 ✅

補一組不同量級的參照:qwen3-coder-plus(大型 MoE)同樣 10/10、8 秒、636 token、零修正——coder 在這種活上又快又準又省。

結論:不是誰全面強,是分場景
同 30B、吃碼力 + 契約寫死在測試裡的活:coder 跟 reasoning 同分 10/10,但 coder 快一倍、省 5 倍 token、零修正稅——measurably 贏。原因是 coder 碼直接出來、不繞一大段 thinking。

⚠️ 但這是 coder 的主場(單檔 + 契約明確)。換成「跨檔多步 / 規格模糊要腦補 / 要規劃」的活,reasoning 型才反超——那種活 coder 容易「照字面寫得很順但方向錯」。所以決策是:吃碼力的活選 coder,吃推理的活選 reasoning,這正是委派決策樹要分流的那一刀。

本文用到的免費模型 × 平台(申請連結)

每個副手都標「模型 → 免費平台」與申請入口。所有 key 集中放一個 ~/.config/llm/keys.env,腳本一律 source 取用,絕不 hardcode。

模型類型免費平台 → 連結備註
qwen3-coder-flash / -plusCoderAlibaba Model Studio(DashScope)→ alibabacloud.com/product/modelstudio註冊選 Singapore 區才有免費額度(US Virginia 沒有);endpoint 用 dashscope-intl
GLM-4.7-FlashReasoningZ.ai → z.ai203K context 免費;完整 GLM-4.7(355B)要付費
gpt-oss-120b通用Cerebras → cloud.cerebras.ai64K context、5 RPM;大 context 活好用
llama-3.3-70b通用Groq → console.groq.com30 RPM,最穩、高頻首選
qwen2.5-coder / qwen2.5:7b本地Ollama → ollama.com$0、私密;無 GPU 會慢,只配樣板活
(聚合商,避雷參考)OpenRouter → openrouter.ai:free 在 0 credit 是墊底優先,實測常 429;要穩就充值用超便宜付費版
一個避雷提醒
同一個模型「原廠免費層」和「聚合商轉賣的 :free」是兩回事:同一個 Llama-3.3-70B,Groq 原廠免費 12 秒過,OpenRouter :free(0 credit)全被 429 擋。選免費先問「是不是跟原廠直接拿」。
Part 五 — 本地硬體整合

本地副手的硬體整合路線圖:CPU → Mac(MLX)→ DGX(vLLM)

把便宜副手跑在本地時,硬體對不對得上,決定它「算得對 + 跑得動」。整合要按這個順序,不能反:

整合三步(順序不能反)
① 先確認「算得對」(正確 backend,不行就退 CPU)→ ② 再談「跑得快」(選對框架)→ ③ 最後才是「跑得大」(記憶體塞不塞得下)。很多人一上來就追③,結果卡在①噴亂碼還不自知。
硬體用什麼框架大模型怎麼辦
AMD 內顯機(現況)Ollama / llama.cpp CPU-only別用 Vulkan backend(會算錯,見下註);塞不下丟雲端
Mac(Apple Silicon)MLX / OllamavLLM 不支援 Apple;要快用 MLX(Metal,正確又快)
DGX(NVIDIA)vLLM 或 OllamavLLM 最強:大模型 + 高吞吐 + 多卡 tensor-parallel

順帶搞懂:量化 Q4 / Q5 / K_M 是什麼

上表說「塞不塞得下」,就是量化在管的。量化 = 把模型每個參數用更少的位元(bit)存,換更小的記憶體、更快的速度,代價是一點點精度。原始是 16-bit(FP16),Q8=8-bit、Q4=約 4-bit(原本的 1/4)。就像 PNG 壓成 JPG,檔案小很多、肉眼幾乎看不出差。

量化每參數位元30B 大小品質
FP16(原始)16~60GB100%
Q88~30GB~99%
Q55~19GB~97%
Q44~17GB~95%(甜蜜點)
Q33~13GB~88%(明顯掉)

算法:參數量 × 位元 ÷ 8 ≈ GB(例:30B × 4 ÷ 8 ≈ 15GB,加結構開銷 ≈ 17GB)。命名 Q4_K_M = Q4(4-bit)+ _K(K-quant,新一代量化法,同位元品質更好)+ _M(尺寸檔位 S/M/L,M=中)。

量化心法
預設選 Q4_K_M——品質/大小最平衡,90% 場合就它。記憶體有餘要更準用 Q5/Q6;別低於 Q4(Q3/Q2 品質崩)。Ollama pull 預設就抓好量化版,你不用自己壓。這也是為什麼 GLM-4.7-Flash 30B(Q4 ~17GB)進得了 48GB Mac Mini,而 gpt-oss-120b(~63GB)要 DGX。

關於 vLLM 的常見誤解:vLLM ≠ 跑更大,vLLM = 在對的 NVIDIA GPU 上跑更快。它需要模型塞進 VRAM(不做 CPU 降級),且不支援 Apple Silicon。能不能跑大模型是硬體記憶體決定的,框架只是榨效率。

⚠️ 為什麼「別用壞掉的 GPU backend」這麼要命:同一個模型在不支援的內顯上用 Vulkan,會吐「速度正常但答案完全錯亂」的輸出(噴外語、亂數學)——這跟量化 Q4/Q5 無關,是 GPU 運算正確性問題。完整排查見:Gemma4 在 AMD Renoir iGPU Vulkan 輸出亂碼的完整排查

Part 六 — 選型框架 + 全掃線上模型

副手選型框架:不只看 B,看五張獨立成績單

上面測了一輪,該收斂成一套可重複的選型標準了。「幾 B、塞不塞得下記憶體/顯卡」只是入場券——分三道門:① 能不能跑(參數×量化)② 算不算得對(backend,不合的 GPU 會吐亂碼)③ 好不好用。第三道才是選型,而它拆成五張彼此獨立、不能互相推斷的成績單:

#成績單量什麼 / 怎麼測
1規模 × 平台 context同模型跨平台差巨大——GLM 在 8K 被餓死、在 203K 滿血。要問「哪個平台上的哪個模型」
2寫程式(codegen)狀態機 + 唯讀測試檔當契約:一次過?自推物件契約?有沒有偷用 eval 作弊
3工具呼叫 / agent真實多步 loop,不是玩具:讀→篩→寫→回報。失敗模式:漏叫、過度呼叫、寫空檔、melt 成寫腳本
4coder vs reasoning吃碼力選 coder(快省)、吃推理/跨檔選 reasoning
5格式 / 免費真實性 / 隱私OpenAI 相容?原廠免費 vs 聚合商 :free?資料會不會被訓練?
鐵律:五張不能互推
codegen 10/10 推不出工具呼叫穩——實測 llama-3.3-70b 寫程式滿分,當 agent 卻寫出空檔案;參數大也推不出好用——平台 context 卡死照樣廢。要哪張分數,就測哪張。

89 個免費模型全掃(2026-07-11):偏科 / 小鋼炮 / 大巨獸

拿這套標準,把 Groq、Cerebras、DashScope、Z.ai、OpenRouter 上所有能免費蹭的文字模型都跑一遍兩關。共實測 89 個、50 個雙過、30 個未測到(額度/限流/不支援 tool)。結論很反直覺:

兩個打破直覺的發現
· 參數量 ≠ agent 好用,甚至反相關。從 20B(gpt-oss-20b)到 1T(kimi-k2.7-code)有 50 個雙過;但 deepseek-v3.2qwen3.5-122b、Nvidia nemotron-3-super-120b 這些大模型反而在簡單 agent 迴圈裡繞圈不收斂——大而偏科。
· 小鋼炮性價比碾壓。20B 的 gpt-oss-20b、31B gemma-4、qwen3.6-flash 穩穩雙過,跟旗艦做一樣的事。要當 agent 先試小的,過了就別花大的。
分級代表模型(實測)codegenagent一句話
偏科deepseek-v3.2 / qwen3.5-122b / nemotron-3-super-120b❌ 繞圈大型推理模型通病:簡單多步想太多、6 輪不收斂
偏科llama-3.1-8b弱小,雙栽
偏科llama-3.3-70b🟡 不穩agent 時好時壞(三測 2 栽 1 過,寫空檔)
小鋼炮gpt-oss-20b ⭐CP 值王:20B 穩穩雙過
小鋼炮gemma-4-31b / qwen3.6-flash / qwen3-30b-a3b中小量級穩過,便宜大碗
大巨獸qwen3.7-max / deepseek-v4-pro / glm-5.2 / kimi-k2.7-code(~1T)全能雙過,但這任務沒比小鋼炮強;留給硬活
覆蓋與誠實但書
89 實測 / 50 雙過 / 30 未測到(Z.ai 免費只開 glm-4.7-flash、OpenRouter :free 多 429 或不支援 tool、部分 DashScope 舊 qwen 要 enable_thinking 參數、Groq compound/allam 不支援 tool)。這兩關對 2026 旗艦偏易,50 個雙過並列分不出高下——這輪的價值在底部鑑別:抓出「大而偏科」「弱小」「不穩」三類不能當 agent 的。要細分頂段得上更難的多步任務(錯誤恢復、跨檔規劃、長 context)。

更深一關:多步 + 錯誤恢復(想打破頂段並列)

基本關頂段 50 個並列,所以加一關硬的:config.json 指向一個不存在的資料檔,agent 必須自己 list_files 找到正確檔、算出淨營收(sale−refund=150)、寫進 report.txt。結果又反直覺——連加難都分不太出高下:

結果模型怎麼解的
✅ 撞錯再恢復qwen3-coder-plus · qwen3.7-max · kimi-k2.7-code · glm-5.2 · deepseek-v4-pro · glm-4.7-flash照 config 讀缺檔 → 撞 error → list → 找到 data_v2 → 算對 150
✅ 先查避坑gpt-oss-20b · qwen3-32b · llama-4-scout · gemma-4-31b · zai-glm-4.7 · deepseek-v4-flash先 list、直接用 data_v2,沒踩陷阱也算對 150(其實更謹慎)
⚠️ 平台格式gpt-oss-120b · qwen3.6-27b(皆 Groq)Groq tool-call validation 400——平台格式嚴格,非模型不會
這關的結論,正好接到下一節
能連上的 12 個全部算對 150,只差「撞錯再恢復」與「先查避坑」兩種策略(後者甚至更聰明)。連多步 + 錯誤恢復都分不出頂段高下——要真正排名頂段,得上 SWE-bench Verified / τ-bench 那種數十步真 repo 任務。所以頂段別自己土測,去看公開的 agentic benchmark。

不用每個都測:怎麼看公開分數就知道模型適合什麼

自己每個抓下來測不划算。公開 benchmark 早就測了——關鍵是知道哪個榜對應哪一張成績單,只看你任務吃的那張:

你的成績單看這些公開 benchmark讀法 / 陷阱
② 寫程式LiveCodeBench · SWE-bench Verified(HumanEval/MBPP 已飽和)HumanEval 90%+ 大家都一樣別看;LiveCodeBench(抗污染)+ SWE-bench Verified(真 repo 修 bug)才分得出
③ 工具 / agent ★BFCL · τ-bench / τ²-bench · AgentBench最多人忽略卻最決定能不能當副手。要 agent 先看 BFCL/τ-bench,不是 HumanEval
④ 推理 vs 專精GPQA-Diamond · AIME · MMLU-Pro推理特高+coding 普通 = reasoning 特化(簡單 agent 會想太多繞圈,如 deepseek-v3.2)
① 規模 × 平台 contextRULER · long-context needlecontext 上限看 API/平台文件,不在 HF 卡上——卡寫 128K ≠ 免費平台給你 128K
指令遵循(貫穿契約)IFEval · MT-Bench隱形契約遵循度相關;低分委派要把契約講更白
綜合 / 聊天LMArena Elo · MMLUElo 是聊天體感,跟 agent/codegen 不一定一致;MMLU 已飽和沒鑑別力
三個判讀鐵則
1. 先確定任務吃哪張,只看對應榜:要 agent→BFCL/τ-bench;要寫碼→LiveCodeBench/SWE-bench;要聊天→Arena Elo。看錯榜=白看(高 MMLU 對 agent 沒意義)。
2. 優先抗污染+第三方:HumanEval/MMLU 已飽和或被背;用 LiveCodeBench、SWE-bench Verified、獨立站(Artificial Analysis、LMArena)。
3. 公開榜盲區:很少測「你的免費平台+量化版+真實多輪 tool-loop 穩定度」——這正是自跑真實 agent 揪出「大而偏科繞圈」「Llama 寫空檔」的原因。
看 HuggingFace 卡三動作
① 看 Evaluation 報了哪些 benchmark:只報 HumanEval/MMLU=弱訊號,有報 BFCL/SWE-bench=在乎 agentic。② 認清變體:base / instruct / thinking(thinking 版當 agent 常繞圈)。③ 找卡上有沒有寫 tool use / function calling 支援——沒明講的,當 agent 風險高。
正確用法(省時間)
用公開榜縮小候選到 3–5 個(對到你任務那張成績單)→ 再用前面的三關自測配方,只驗你真正要用的 1–2 個不用每個都抓下來測。
你要做的先看這些榜
coding agent(讀寫檔/跑指令)BFCL + τ-bench + SWE-bench Verified
委派寫單檔LiveCodeBench + BigCodeBench
深度推理 / 數學GPQA + AIME
長文件處理RULER(+ 查平台 context 上限)
聊天助理LMArena Elo

實戰:怎麼實際打開榜來讀(含網址 + deepseek-v4-pro 範例)

上面講「看哪個榜」,這節講「怎麼真的打開讀」。用 deepseek-v4-pro 當範例(它是開源、真的有 HF 卡;很多 API 別名模型沒有)。

  1. 搜尋頁只是列表 → 點進官方卡:認官方 namespace deepseek-ai/DeepSeek-V4-Pro,別點別人 re-upload。看變體別選錯:-Base=生肉別用、-Pro=你要的、-NVFP4=量化版。
  2. 捲到 Evaluation / Benchmark 段,只看對應你成績單的那幾行(下表)。
  3. 對照判讀:任務吃哪張,就看那個 benchmark 的數字。
你在乎的卡上看哪個 benchmarkdeepseek-v4-pro 實際判讀
寫程式LiveCodeBench · SWE-bench Verified領先 LiveCodeBench;SWE-bench Verified 80.6%(開源最高)寫碼超強
agentSWE-bench Verified(本身就 agentic)80.6% = 5 題真 GitHub issue 修對 4 題當 coding agent 強(與我們實測雙過+硬題過一致)
硬推理GPQA Diamond輸 Claude最難推理不是強項
長文件context 上限1M token超長,但看你的免費平台給不給
知識問答SimpleQA別當知識神諭

一句話:要寫碼 / coding agent → 它很強;要最難推理 / 事實問答 → 看別家。

這些榜實際在哪看(存起來)

網址怎麼讀
SWE-bench Verifiedswebench.com% Resolved;80%+ = 修對 4/5 真 issue。當 coding agent 就看這個
BFCL v4(工具/agent)gorilla.cs.berkeley.edu/leaderboard.htmlv4 是 agentic:別只看 Overall,看 Agentic + Multi-turn 子分(多輪掉 5–10 分,狂串工具就吃這個)
Artificial Analysisartificialanalysis.ai一站看多軸(coding/推理/速度/價格),獨立第三方,最省事——懶得逐榜先看這
LMArenalmarena.ai聊天 Elo,可按 coding 分類篩
τ-bench—(沒單一 live 榜)看 model report 或 Artificial Analysis 收錄
閉源 API 模型 HF 上沒卡
deepseek 是開源才有 HF 卡;像 qwen3.7-maxglm-5.2qwen-max 這種閉源 API 模型 HuggingFace 上沒卡——那些直接去 Artificial Analysis 或廠商官方 docs 看,別在 HF 搜。
方法收斂成一句
你不用自己跑 agent 測試——deepseek-v4-pro 的 SWE-bench Verified = 80.6% 這一個數字,就告訴你「它能當 coding agent」了。選型:①任務吃哪張成績單→只看對應榜 ②懶的話開 Artificial Analysis 一次看多軸 ③只有最後要用的 1–2 個,才用三關自測驗「你的平台+穩定度」。
Part 七 — 速查・完整列表・附錄

委派五鐵則

  1. 算划算看能否一次過:副手弱一失手,修正稅吃光省下的 token,不如自己做。
  2. 把隱形契約講白:物件還是 dict、回傳型別、例外種類——一句話省一半測試。
  3. 綠燈≠好碼:委派回來看 diff,不只看測試綠。
  4. 測試要夠對抗性:沒有惡意輸入測試,eval 作弊就靜靜過關。
  5. 選對「平台 × 模型 × 硬體」:同一個模型跨平台差異巨大(context/Production-Preview/限流);本地先算得對再跑得快。

完整全掃列表:89 個免費模型逐一(點模型名看 HF 卡)

全部攤開,依結果排序(雙過 → agent 過 → 偏科 → 部分 → 雙栽 → 未測到)。每個模型名可點,連到 HuggingFace 搜尋去看它的卡片與 benchmark 分數。plat:groq / cere(Cerebras)/ dash(DashScope)/ zai / or(OpenRouter)。

模型(→ HF 搜尋)平台codegenagent備註
gemma-4-31bcere
gpt-oss-120bcere
zai-glm-4.7cere
deepseek-v4-flashdash
deepseek-v4-prodash
glm-5.1dash
glm-5.2dash
kimi-k2.7-codedash
qwen-coder-plusdash
qwen-flashdash
qwen-maxdash
qwen-plusdash
qwen-plus-latestdash
qwen3-235b-a22b-instruct-2507dash
qwen3-235b-a22b-thinking-2507dash
qwen3-30b-a3b-instruct-2507dash
qwen3-30b-a3b-thinking-2507dash
qwen3-coder-480b-a35b-instructdash
qwen3-coder-flashdash
qwen3-coder-nextdash
qwen3-coder-plusdash
qwen3-maxdash
qwen3-max-previewdash
qwen3-next-80b-a3b-instructdash
qwen3-next-80b-a3b-thinkingdash
qwen3.5-27bdash
qwen3.5-35b-a3bdash
qwen3.5-397b-a17bdash
qwen3.5-flashdash
qwen3.5-plusdash
qwen3.6-27bdash
qwen3.6-35b-a3bdash
qwen3.6-flashdash
qwen3.6-max-previewdash
qwen3.6-plusdash
qwen3.7-maxdash
qwen3.7-max-previewdash
qwen3.7-plusdash
llama-3.3-70b-versatilegroq
meta-llama/llama-4-scout-17b-16e-instructgroq
openai/gpt-oss-120bgroq
openai/gpt-oss-20bgroq
cohere/north-mini-code:freeor
nvidia/nemotron-3-nano-30b-a3b:freeor
nvidia/nemotron-3-ultra-550b-a55b:freeor
openai/gpt-oss-20b:freeor
poolside/laguna-m.1:freeor
poolside/laguna-xs-2.1:freeor
tencent/hy3:freeor
glm-4.7-flashzai
qwen/qwen3-32bgroq
qwen/qwen3.6-27bgroq
deepseek-v3.2dashno-converge
qwen3.5-122b-a10bdashno-converge
nvidia/nemotron-3-super-120b-a12b:freeorno-converge
qwen-turbodash🟡cnt
qwq-plusdashno-csv
tongyi-tingwu-slpdashno-csv
llama-3.1-8b-instantgroqcsv-wrong
ccai-prodashHTTP 500 {“error”:{“
glm-5.2-fast-previewdash免費額度耗盡
qvq-maxdash需特定參數
qwen2-7b-instructdash型號不存在/需付費
qwen3-14bdash需特定參數
qwen3-235b-a22bdash需特定參數
qwen3-30b-a3bdash需特定參數
qwen3-32bdash需特定參數
qwen3-8bdash需特定參數
allam-2-7bgroq不支援 tool
groq/compoundgroq不支援 tool
groq/compound-minigroq不支援 tool
cognitivecomputations/dolphin-mistral-24b-venice-edition:freeor不支援 tool
google/gemma-4-26b-a4b-it:freeor限流/餘額
google/gemma-4-31b-it:freeor限流/餘額
liquid/lfm-2.5-1.2b-instruct:freeor不支援 tool
liquid/lfm-2.5-1.2b-thinking:freeor限流/餘額
meta-llama/llama-3.2-3b-instruct:freeor不支援 tool
meta-llama/llama-3.3-70b-instruct:freeor限流/餘額
nousresearch/hermes-3-llama-3.1-405b:freeor不支援 tool
nvidia/nemotron-nano-9b-v2:freeorbad-resp
openai/gpt-oss-120b:freeor限流/餘額
qwen/qwen3-coder:freeor限流/餘額
qwen/qwen3-next-80b-a3b-instruct:freeor限流/餘額
glm-4.5zai限流/餘額
glm-4.5-airzai限流/餘額
glm-4.6zai限流/餘額
glm-4.7zai限流/餘額
glm-5zai限流/餘額
glm-5-turbozai限流/餘額
glm-5.1zai限流/餘額
glm-5.2zai限流/餘額

附錄:委派用的 spec prompt

實驗一給副手的 spec(唯讀測試檔當契約),照抄即可:

Implement the module order_system.py for an order-management state machine.

Define exactly this API (the read-only file test_order_system.py is the authoritative spec — make all of its tests pass):

- An enum `State` with members: PLACED, CONFIRMED, PREPARING, READY, PICKED_UP, DELIVERED, CANCELLED.
- Two exception classes: `IllegalTransition` and `WrongRole`.
- A class `OrderSystem`:
  - __init__: a virtual clock `self.now = 0` (minutes) and an internal list of orders; assign each order a unique id.
  - place(): create and return a new order whose `state` is State.PLACED, recording the time it was placed; the order must have a mutable `state` attribute and a `late` attribute defaulting to False.
  - act(order, action, role): perform a role-restricted transition. Allowed transitions are action: from_state -> to_state (allowed role):
      confirm: PLACED -> CONFIRMED (Merchant)
      start_preparing: CONFIRMED -> PREPARING (Merchant)
      mark_ready: PREPARING -> READY (Merchant)
      pick_up: READY -> PICKED_UP (Courier)
      deliver: PICKED_UP -> DELIVERED (Courier)
    Special action `cancel`: allowed only by role "Customer" and only when the order is PLACED or CONFIRMED, moving it to CANCELLED.
    Raise IllegalTransition when the action is not valid from the order's current state (e.g. deliver while PLACED). Raise WrongRole when the state is valid for the action but the acting role is not the allowed one (e.g. Customer trying to confirm a PLACED order). When an order becomes READY, record the time it became ready.
  - tick(minutes): advance self.now by minutes, then for every order: if it is still PLACED and at least 15 minutes have passed since it was placed, set its state to CANCELLED; if it is still READY and at least 30 minutes have passed since it became READY, set its `late` attribute to True without changing its state.

留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *