Jeff – Jev-compatible 0.8B decision models, trained at home, ~30 ms
https://github.com/firelex/jeff📌 Jeff:家用單卡 GPU 就能練出的 0.8B 決策模型
TL;DR:開源專案 Jeff 用一張工作站 GPU 完成訓練,30 毫秒內就能做出多選項的零樣本決策判斷。
談到訓練語言模型,直覺會想到動輒數百張 GPU 的資料中心。但 Jeff 這個獨立開源專案,只用一張 RTX PRO 6000 workstation GPU 就在本地把 0.8B 與 2B 的決策模型練了出來,推論延遲只要 22 毫秒。
🤔 為什麼需要「決策模型」而不是聊天模型
許多正式環境需要的不是生成文字,而是「在幾個選項裡選一個」:客服要分流到哪個 team、語音助理聽到的指令對應哪個動作、遊戲角色該往哪走。這類任務若丟給一般 LLM 生成文字再 parse,既慢又不穩定。Jeff 鎖定的正是這個場景:輸入一段情境描述與任意數量的選項(zero-shot,選項不需要出現在訓練資料裡),模型直接對每個選項回傳一個校準過的機率,單次 forward pass 完成,不用生成文字也不用 parsing。
🧩 與 Jev 相同介面,重點在「小而快」
Jeff 是 Qwen3.5 與 Gemma4 的 fine-tune 版本,採用與 Jev 相同的 request 格式(兩者無關,Jeff 是獨立專案,不隸屬 Jev 開發商 TypeSafe;訓練程式碼則從開源的 AutoJev recipe 起步)。它支援三種問題型態:choice(在最多 254 個選項中選一個,這是 v1.1 版 Qwen 模型才有的上限,Gemma4 版本仍是 26 個)、noul(yes/no 的機率)、score(在自訂量表上打分),而且一次 request 可以同時問多個獨立問題。
最值得注意的是訓練方式完全在本地完成:0.8B 模型約訓練 2 小時、2B 約 3.5 小時,都在一張 RTX PRO 6000 上跑完;訓練資料是由開源模型 Qwen3.8-Flash-Next 在兩臺 DGX Spark 上生成的合成資料,測試則在 MacBook 上進行。作者強調沒有用任何雲端 GPU,訓練資料裡也沒有 closed model 的輸出,closed model 僅用來抽樣檢查合成資料品質。
📊 效能與 benchmark 數據
0.8B 模型在 RTX PRO 6000 上推論約 22 毫秒、在 Apple M4 Max(透過 MLX)約 28 毫秒。在五個公開 benchmark(BBH、Financial PhraseBank、JudgeBench、RAGTruth、WinoGrande)的平均分數上:
| 模型 | 平均分(5 benchmarks) |
|---|---|
| Qwen3.5-0.8B(未訓練) | 45.3 |
| Jeff-Qwen3.5-0.8B | 79.1 |
| Qwen3.5-2B(未訓練) | 46.5 |
| Jeff-Qwen3.5-2B | 82.0 |
| Gemma4 E2B(未訓練) | 62.5 |
| Jeff-Gemma4-E2B | 81.6 |
| Jev(官方公布) | 83.0 |
| AutoJev-27B(官方公布) | 84.9 |
在分類與 grounding 類任務上,Jeff 已經追平甚至打敗更大的 Jev;但在偏推理的 benchmark(BBH、JudgeBench,以及 JevBench 的困難題)上,Jeff 明顯落後,作者也坦言這是小模型的預期結果。v1.1 版本另外做了「長列表測試」,0.8B 模型表現從 40% 大幅提升到 95%,但 2B 模型在原本 benchmark 上分數略降(83.1% 降到 82.0%)。
作者也用 Doom、Frogger、Pac-Man 三款遊戲做 zero-shot 測試,每回合把情境與合法動作都轉成文字描述讓模型選擇。0.8B 版本在 Doom 和 Frogger 上的表現與手寫規則 bot 相當,每步推論僅需 29 到 49 毫秒(M4 Max 上),對照 Jev 在 Doom 上透過 API 呼叫平均 212 毫秒(兩者測試硬體不同,僅供參考)。
如果 zero-shot 準確率不夠用,README 還給出了一個 fine-tune 範例:用 60 萬筆 Lichess 棋局(Stockfish 標註)訓練 Jeff-Qwen3.5-0.8B,3.5 小時內把 1000 題測試棋局的解題率從 zero-shot 的 15.5% 推到 55.8%(未訓練模型僅 6.2%)。作者澄清這不是強棋力(約 1000 Elo、無搜尋),重點是速度:一張 GPU 就能同時跟上約 600 場人類 blitz 對局的節奏。
⚠️ 這是什麼,也不是什麼
作者講得很清楚:這些是很小的模型,擅長在選項之間做出快速、校準良好的判斷,適合嵌進本地程式;但推理能力比不上跑在更大模型上的 Jev。若 zero-shot 準確率不夠,一個小規模的 fine-tune(README 提到的語音導航案例,半小時內把 held-out 準確率從 31.7% 推到 95.8%)通常能帶來更大幅度的提升。
🎯 實務啟示
如果你的系統裡有大量「選 A 或 B 或 C」的判斷邏輯(intent 分類、內容審核、路由決策),與其呼叫大型 LLM 生成文字再 parse,Jeff 這類 zero-shot 決策模型提供了更省資源的選項:單次 forward pass、幾十毫秒延遲,還能用少量自有資料快速 fine-tune。對想在本地或邊緣裝置跑推論、預算有限的團隊,這是值得列入評估清單的開源方案。
🔗 來源
- 標題:Jeff – Jev-compatible 0.8B decision models, trained at home, ~30 ms
- 作者/機構:firelex
- 連結:https://github.com/firelex/jeff
#AI #MachineLearning #OpenSource #LLM #ZeroShot #EdgeAI #ModelFineTuning #DecisionModels #Qwen #GitHub
原始資料 Hacker News · 收集於 2026-09-29
摘要原文
Jeff New: v1.1 (29 September 2026). Jeff-Qwen3.5-0.8B and Jeff-Qwen3.5-2B now choose among up to 254 options (v1.0: 26), with better calibration. On our long-list test the 0.8B goes from 40% to 95%. The 2B's benchmark score dips from 83.1% to 82.0%. Details in the changelog ; v1.0 stays available on Hugging Face as revision v1.0 . Fine-tunes of Qwen3.5 and Gemma 4 for zero-shot classification: small, fast decision models you slot into your code, with the same request format as Jev. You describe a situation and list the options in plain words; Jeff returns a calibrated probability for each option from a single forward pass. No generated text, no parsing: about 22 ms per decision on an RTX PRO 6000 and 28 ms on an Apple M4 Max (MLX). Zero-shot means the options can be anything: support queues, user intents, moderation labels, voice commands, game moves. Your categories don't need to appear in the training data; you describe them, and Jeff picks. What it is, and what it isn't. These are very small models. They make extremely fast, well-calibrated judgement calls between options, and they slot easily into your local code. On benchmarks they approach, and sometimes beat, Jev; but at this size their reasoning won't match Jev's, which runs on a much larger model. If zero-shot accuracy isn't good enough for your purposes, a short fine-tune on your own examples takes you much further: our voice-navigation fine-tune moved held-out accuracy from 31.7% to 95.8% in under half an hour on one GPU. Built entirely on local hardware. Training on one RTX PRO 6000 workstation GPU (the 0.8B trains in about 2 hours, the 2B in about 3.5), all synthetic training data written by an open model (Qwen3.8-Flash-Next) on two DGX Sparks, testing on a MacBook. No cloud GPUs, and no closed-model output in the training data; a closed model was used only to spot-check the quality of a sample of the synthetic data. Independent project. Jeff uses the same request format as Jev, but it is not affiliated with or endorsed by TypeSafe, the makers of Jev. Our training code starts from the open-source AutoJev recipe. Models on Hugging Face: Jeff-Qwen3.5-0.8B · Jeff-Qwen3.5-2B · Jeff-Gemma4-E2B · chess fine-tune: Jeff-Qwen3.5-0.8B-Chess Quick start To serve a model you only need the serving install ( --no-default-groups leaves out the training, data and evaluation packages; plain uv sync installs everything): uv sync --no-default-groups # CPU uv sync --no-default-groups --extra cuda # NVIDIA GPU: adds the fast kernels (much slower without them) uv sync --no-default-groups --extra mac # Apple silicon: adds MLX uv run --no-default-groups hf download mstrasser/Jeff-Qwen3.5-0.8B --local-dir checkpoints/jeff-0.8b # NVIDIA GPU or CPU (PyTorch) JEFF_CHECKPOINT=checkpoints/jeff-0.8b PORT=8765 uv run --no-default-groups jeff-serve # Apple silicon (MLX, much faster on a Mac; Qwen models only) JEFF_BACKEND=mlx JEFF_CHECKPOINT=checkpoints/jeff-0.8b PORT=8765 uv run --no-default-groups --extra mac jeff-serve curl -s localhost:8765/v1/systemone -H ' content-type: application/json ' -d ' { "model": "jeff-latest", "state": "Refund request: the customer says the parcel arrived crushed and wants their money back.", "questions": { "route": {"type": "choice", "instructions": "Which team should handle this?", "criteria": {"1": "Refunds and payments", "2": "Damaged or lost parcels", "3": "Account and login problems"}}, "angry": {"type": "noul", "instructions": "Is the customer angry?"} } } ' Each answer has a probability per option, the chosen option and a confidence. Three question types: choice (pick one of up to 254 options with the v1.1 Qwen models, 26 with Jeff-Gemma4-E2B), noul (yes/no, returned as a probability) and score (a point on a scale you describe). Several independent questions in one request are answered together. Benchmarks 4,599 questions from five public benchmarks, plus JevBench's public hard tier (105 items, scored separately): Benchmark Qwen3.5-0.8B untrained Jeff-Qwen3.5-0.8B Qwen3.5-2B untrained Jeff-Qwen3.5-2B Gemma 4 E2B untrained Jeff-Gemma4-E2B Jev (published) AutoJev-27B (published) Overall (5 benchmarks) 45.3 79.1 46.5 82.0 62.5 81.6 83.0 84.9 BBH 39.5 64.9 46.0 68.7 51.3 66.4 94.3 82.8 Financial PhraseBank 36.0 95.7 53.4 94.7 86.0 96.1 77.0 84.2 JudgeBench 56.6 63.1 57.4 59.4 46.9 60.6 78.6 78.9 RAGTruth 49.1 85.6 35.9 87.7 63.8 87.4 77.3 88.9 WinoGrande 49.2 69.0 52.2 78.8 51.0 77.4 90.7 83.3 JevBench hard (separate) 36.2 46.7 45.7 57.1 41.0 48.6 73.3 70.3 Bold: the winner of Jeff against Jev in each row. Bold italic: AutoJev-27B where it is the best of all models in the row; it is shown for reference, since the head-to-head comparison is with Jev. The Qwen columns are v1.1; Jeff-Gemma4-E2B is v1.0. The published Jev and AutoJev figures were measured on a different sample of the same benchmarks. Jeff's overall score comes from classification and grounding, where it matches or beats the large models; on the reasoning-heavy benchmarks (BBH, JudgeBench, JevBench) it stays well below them, as you would expect at this size. Games: a zero-shot test Measured with v1.0 of the Jeff models. To test zero-shot performance on tasks unlike anything in the benchmarks, we had Jeff play three games. Games aren't the ideal zero-shot test, since a game's state isn't typical unstructured data; but they are a common, and fun, way to test a System 1 model. Each turn, the code describes the situation and the legal moves in words, and the model picks one. The options state what each move leads to (Frogger: "you would be hit by a car and lose a life"; Doom: "the nearest monster is a little to your left"), but never which move is right. Each result is 20 episodes, seed 1234; ▶ opens a video of the run's first episode. Jeff-Qwen3.5-0.8B playing, zero-shot (the bold row in the table below; click a clip for the full video): Doom Frogger Pac-Man Model Doom, kills (monster's direction in words) Frogger, crossings (consequences) Pac-Man, pellets of 98 (consequences) Random moves −0.05 0 11.2 Hand-coded rule bot 6.55 ▶ 10.25 ▶ 94.1 ▶ Qwen3.5-0.8B, untrained 5.0 ▶ 1.0 ▶ 25.8 ▶ Jeff-Qwen3.5-0.8B 6.55 ▶ 10.3 ▶ 57.0 ▶ Qwen3.5-2B, untrained 0.55 ▶ 0.05 ▶ 72.1 ▶ Jeff-Qwen3.5-2B −0.9 ▶ 6.0 ▶ 41.2 ▶ Gemma 4 E2B, untrained −0.55 ▶ 0 ▶ 3.2 ▶ Jeff-Gemma4-E2B 0.55 ▶ 0.15 ▶ 53.2 ▶ Jev (published, Doom) 6.55, told the aiming rule; −0.60 without it — — Jeff-0.8B decides in 29–49 ms per move on an M4 Max; Jev's published Doom run took 212 ms per call over its API. The two times were not measured on the same hardware. To play them yourself: uv sync --extra games uv run python -m jeff.games --game doom --player jeff --criteria situation --url http://127.0.0.1:8765 --video --out runs/games/doom.json uv run python -m jeff.games --game frogger --player jeff --criteria outcomes --url http://127.0.0.1:8765 --out runs/games/frogger.json uv run python -m jeff.games --game pacman --player rule --out runs/games/pacman-rule.json Fine-tuning example: chess When zero-shot isn't enough, fine-tune. As a worked example we trained Jeff-Qwen3.5-0.8B on 600,000 Lichess positions, labelled by Stockfish, in about 3½ hours on one GPU. On 1,000 held-out chess puzzles: Model Puzzles solved Qwen3.5-0.8B, untrained 6.2% Jeff-Qwen3.5-0.8B, zero-shot (no chess training) 15.5% Jeff-Qwen3.5-0.8B-Chess 55.8% It is not a strong player: about 1,000 Elo with no search, and it loses to Stockfish's weakest setting. The point is speed. Each move is one forward pass in tens of milliseconds, so one GPU keeps up with about 600 human blitz games at once. 100 games at once in real time; the featured game is its one win of the 100, a nine-move checkmate. The full video, results and training details are on the model card . The code to reproduce it, step by step, is in examples/chess . (561 points, 217 comments on Hacker News)
由 claude-code/sonnet 自動生成