SmolLM3-3B FPL assistant (one model, two tasks)
This is a single model trained on two tasks. It is HuggingFaceTB/SmolLM3-3B with two rounds of LoRA fine-tuning merged into the weights. There are no adapters to load and no switching between models: the system prompt picks the task.
| Task 1: player search | Task 2: transfer advisor | |
|---|---|---|
| Input | A natural-language FPL question | A squad as JSON at a gameweek deadline |
| Output | One run_query tool call, or a short refusal | Up to 8 searches with run_query, reasoning in <think>, then a decision JSON: hold, or 1 to free_transfers transfers |
| Mode | /no_think, single turn | /think, agentic multi-turn |
| System prompt | prompts/task1_system.txt | prompts/task2_system.txt |
| Tool schema | tools/run_query_task1.json | tools/run_query_task2.json |
| Result | 99.1% exact match on the 580-question Task 1 test set (the Task 1 adapter alone: 95.7%) | +6.84 points per team over 3 GWs vs holding on 200 held-out real teams (real managers +2.65; teacher +5.59 on the first 100) |
The weights are a full merged model in bf16 safetensors (about 6.2 GB, two shards). They load in transformers and in mlx-lm.
This repo used to hold only the Task 1 MLX LoRA adapter (PatrickBLB/smollm3-3b-fpl-query). That adapter is still in the git history; the merged model here replaces it and keeps its Task 1 skill.
How it was built
- Task 1 (player search). QLoRA with mlx-lm on a 4-bit MLX SmolLM3-3B, on 5,032 teacher-written and back-verified questions (details below). That adapter was then fused into the 4-bit model and de-quantized to bf16. This bf16 model is the starting point for Task 2.
- Task 2 (transfer advisor), strong-to-weak distillation. A large teacher,
nvidia/nemotron-3.5-super-vl-120b-a12b, played the advisor on real FPL squads with the same tool. Its full agentic traces (reasoning, searches and decision) were turned into training data, and a new LoRA was trained on them on Kaggle (2× T4), with Task 1 examples mixed in so the model would not forget Task 1. That LoRA was merged into the weights.
The distillation is off-policy and sequence-level: the teacher is used through an API, so there are no logits; the student learns to reproduce the teacher's text.
Task 2 data
- Real squads. 5,000 managers sampled at random from the FPL overall league for the 2026-27 season. For each manager and decision gameweek GW t, the situation is the squad, bank and free transfers at the GW t deadline (the GW t-1 picks; a GW t-1 free hit reverts to GW t-2). Free transfers are estimated from the manager's history (+1 per GW, up to 5; chip weeks keep the count; a hit pins the exact count). No manager names are stored.
- Split by gameweek. Train on decisions in GW2-6; 5% of the managers are moved out of train into a validation set (same GWs, different managers). GW7-8 are held out as the test set.
- Point-in-time inputs. Every field the model sees (form, minutes, starts, xGI, clean sheets, xGC per 90, fixtures and FDR) is computed from data up to the deadline only.
- Teacher traces. The teacher got a decision checklist prompt, had to run at least 3 searches (at most 6; 8 with 3 or more free transfers) and could make up to
free_transferstransfers with no hits. Code ran the tool and checked every decision for legality (positions, budget, club limit), invented names and unsupported numbers; failing traces were repaired or dropped. - Labels (hindsight veto). A transfer is kept as the label only if its real points over the next 3 GWs beat holding by at least 2 points per transfer. Otherwise the teacher's own committed hold write-up becomes the label.
| Split | Teams (traces) | Teacher transfer | Veto hold | Teacher hold | Task 1 examples | Total examples |
|---|---|---|---|---|---|---|
| train | 1,885 | 1,120 | 637 | 128 | 566 | 2,451 |
| val | 96 | 29 | 125 |
A Task 2 example is one whole trace (about 4 assistant turns) of about 5,100 tokens (max 6,573), with the loss on every assistant turn and on nothing else. About 815 tokens per trace are trained.
Task 2 training
PEFT LoRA in fp16 (T4 has no bf16) on top of the bf16 Task 1 model, with the LoRA weights in fp32.
| Setting | Value |
|---|---|
| LoRA | r 16, alpha 32, dropout 0.05, q,k,v,o,gate,up,down_proj in all 36 layers |
| Optimizer | AdamW, lr 1e-4, weight decay 0 |
| Schedule | cosine with 5% linear warmup over 614 updates |
| Batch | 1 × gradient accumulation 8 (307 updates per epoch) |
| Epochs | 1.63 (update 501 of 614) |
| Precision | fp16 autocast, GradScaler, gradient clipping 1.0, gradient checkpointing |
| Task 1 mix | 0.3 Task 1 examples per Task 2 trace |
| Hardware | Kaggle 2× T4, model split across both GPUs |
| Seed | 42 |
Chat template: SmolLM3's own, rendered with the date pinned to 2026-01-01. Training tokens were checked, turn by turn, to be identical to the prompts the inference loop builds.
Validation loss (Task 2 / Task 1): 2.21 / – at the start, 0.444 / 0.017 after epoch 1, 0.418 / 0.017 at update 501. Task 1 loss stayed flat throughout, so mixing in Task 1 examples kept the first skill.
Task 2 results
Set A: 100 validation teams (used to pick the checkpoint)
100 validation teams (real managers, GW2-6, not trained on). The metric is the real points gain over the next 3 gameweeks of the advised moves vs keeping the squad unchanged (hold = 0). Greedy decoding, with the recovery loop described under "How to use".
| Policy | Mean gain (3 GW) | Positive | Negative | Holds |
|---|---|---|---|---|
| Teacher (nemotron 120B + checklist) | +5.59 | 60% | – | 7% |
| This model (update 501, ~1.6 epochs) | +6.88 | 60% | 18% | 19% |
| Same run after 1 epoch | +4.97 | 49% | 21% | 26% |
| Same run after 2 epochs (update 613, end of schedule) | +5.28 | 54% | 27% | 14% |
| Real managers (what they actually did, hits subtracted) | +3.09 | 31% | 18% | 49% |
| Simple heuristic (code) | +0.20 | 45% | 49% | 3% |
| Always hold | 0 | – | – | 100% |
Details for this model on the 100 teams:
- 100% valid decision JSON and 100% legal decisions after recovery; 98% of tool calls valid; 3.07 searches per team.
- Recovery used: 6 illegal-move retries, 2 "decide now" nudges, 5 fallbacks to hold.
- Problem teams (a starter with no recent minutes): +9.03, holds 18%. Normal teams: +5.66, holds 18%.
- Transfers per team: 0 → 19, 1 → 59, 2 → 18, 3 → 4.
- Invented player names: 0%. Teams with at least one number not found in the data: 4%.
- About 55 s per team on an Apple M5 (mlx-lm).
The published weights are update 501. Training on to the end of the schedule (update 613) lowered the validation loss a little (Task 2 0.418 → 0.415) but scored worse on decisions, so it was not kept.
Being above the teacher is most likely noise: compared team by team with the 1-epoch model, the gap is +1.9 ± 1.2 (one standard error). Read it as "about teacher level".
Set B: 100 more validation teams (never used for any choice)
Set A was used to choose between checkpoints, so its numbers are slightly optimistic. Set B is 100 other validation teams (seed 7, no overlap with set A, same mix: 60 normal, 39 problem, 1 strong), scored once, with the published weights only. The teacher was not run on set B.
| Policy | Mean gain (3 GW) | Positive | Negative | Holds |
|---|---|---|---|---|
| This model | +6.80 | 57% | 20% | 21% |
| Real managers | +2.21 | 27% | 13% | 60% |
| Simple heuristic (code) | +0.24 | 52% | 46% | 0% |
| Always hold | 0 | – | – | 100% |
- 100% legal decisions after recovery; 97.4% of tool calls valid; 3.07 searches per team.
- Recovery used: 11 illegal-move retries, 1 "decide now" nudge, 5 fallbacks to hold.
- Problem teams: +7.41 (holds 21%). Normal teams: +6.50 (holds 22%).
- Transfers per team: 0 → 21, 1 → 59, 2 → 18, 3 → 2.
- Invented player names: 0%. Teams with at least one number not found in the data: 4%.
The score on the untouched set B (+6.80) matches set A (+6.88), so the result holds up and was not a lucky pick. Over both sets (200 teams) the model gains +6.84 per team against +2.65 for what the real managers did.
Task 1 results
| Model | Exact match | Schema-valid | Field F1 | Exec exact | Out-of-scope accuracy |
|---|---|---|---|---|---|
| SmolLM3-3B bf16 (no fine-tune) | 19.7% | 57.2% | 0.475 | 19.9% | 89.0% |
| Task 1 adapter alone (4-bit + LoRA) | 95.7% | 99.0% | 0.985 | 96.4% | 100% |
| This model (Task 1 + Task 2) | 99.1% | 100% | 0.997 | 99.1% | 100% |
By style: clear 100%, terse 99.3%, casual 98.6%, slang 98.6%. By archetype, 10 of 12 score 100%; in_form 96.3% and free-sampled queries 98.5%. fixture_play, the adapter's weakest archetype (85.7%), is now 100%.
Training on Task 2 did not cost Task 1 anything. It even improved: likely from the Task 1 examples mixed into Task 2 training and from running in bf16 instead of on a 4-bit base.
How to use
Task 1: one tool call
import json
from huggingface_hub import snapshot_download
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = snapshot_download("PatrickBLB/smollm3-3b-fpl-assistant")
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
system = open(f"{repo}/prompts/task1_system.txt").read()
tool = json.load(open(f"{repo}/tools/run_query_task1.json"))
msgs = [{"role": "system", "content": system},
{"role": "user", "content": "Premium midfielders at £8.0m or more with the biggest xGI, top 20."}]
ids = tok.apply_chat_template(msgs, tools=[tool], add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
# <tool_call>
# {"name":"run_query","arguments":{"limit":20,"position":["MID"],"price_min":8.0,"sort_by":"xgi"}}
# </tool_call>
With mlx-lm: model, tok = mlx_lm.load(repo) and the same prompt.
Task 2: the advisor loop
The user message is the squad as compact JSON, in the shape described in the Task 2 system prompt:
{"gw":4,"bank":3.0,"free_transfers":2,"squad":[{"id":1,"name":"David Raya Martín","team":"ARS","pos":"GKP","price":6.0,"starter":true,"form":5.0,"mins_l3":270,"starts_l5":3,"avail":"likely","cs_l5":2,"xgc90_l5":0.3,"fx_next1":1,"fdr_next3":3.3,"fdr_next5":3.0,"max_buy":9.0}, ...]}
The loop:
- Render
[system, user]withtools=[run_query_task2]and generate. The model writes<think>...</think>and then a<tool_call>{"name":"run_query","arguments":{...}}</tool_call>. - Run the query on your own player table (point-in-time, players already in the squad left out, at most 5 rows) and append
{"role":"assistant", ...}and{"role":"tool","content":"<tool_response>\n[rows as JSON]\n</tool_response>"}. Generate again. - Repeat until the model answers with the decision JSON instead of a tool call:
{"action":"transfer","transfers":[{"out_id":557,"in_id":40},{"out_id":332,"in_id":388}],"reasoning":"..."}or{"action":"hold","reasoning":"..."}. - Check legality yourself (same position, not already owned, bank after all moves ≥ 0, at most 3 per club, at most
free_transfersmoves). The results above use this recovery: after the search limit, a "decide now" message; one retry with the reason when a decision is illegal; then hold.
The model only writes queries and decisions. Your code has to execute the tool and validate the moves; the model has no data of its own.
Limitations
- Small evaluation. 200 validation teams; differences of 1-2 points per team are within noise. The GW7-8 test set has not been scored yet.
- The metric is narrow. Points over the next 3 GWs of the transfers vs holding. Captaincy, bench order, hits, chips and price changes are not scored, and 3-GW points are noisy (luck).
- One season, early weeks. Task 2 was trained on 2026-27 GW2-6 only. Behaviour later in a season, around blanks and doubles, or in other seasons is untested.
- No hits and no chips. The model never suggests a points hit, wildcard, free hit, bench boost or triple captain.
- Selling prices. Current prices are used as selling prices; real FPL selling prices after a price rise are lower.
- Availability.
availis a minutes proxy (no recent minutes = doubtful), not FPL injury news. - Holding is the weak spot. Many hold labels come from the hindsight veto, which the model cannot see. It still holds on some teams where its own search found a good swap.
- Task 1 keeps the limits of the original adapter: fixed
run_queryschema, data from one 2026-10-24 snapshot, FPL and English only. - Teacher data. Task 1 questions were written by
minimaxai/minimax-m3.1-flashand Task 2 traces bynvidia/nemotron-3.5-super-vl-120b-a12b; use is also subject to those models' terms.
Task 1 training details (original adapter)
- Query sampling. 1,500 structured queries from the 2026-10-24 snapshot (569 players, 20 teams), over 11 archetypes plus free-sampled queries; every query returns at least one player.
- Teacher paraphrases.
minimaxai/minimax-m3.1-flashwrote 4 questions per query (clear, casual, terse, slang); about 10% got typos or lower case. - Verification. The teacher translated each question back to JSON; only exact matches were kept, and leaked field names and near-duplicates were dropped (5,632 of 5,996 kept). 558 extra
fixture_playquestions were added to train only. - Split by query (all paraphrases of a query in one split): train 5,032 / val 578 / test 580.
- QLoRA with mlx-lm on the 4-bit base: rank 16, scale 20, dropout 0.05, all 36 layers, lr 1e-4 cosine with warmup, batch 4 × accumulation 2, max length 1,024, loss on the assistant turn only, 1 epoch.
Arguments are in canonical form: only non-default fields, sorted keys and lists, floats to 1 dp. Defaults: fit_only=true, sort_by=total_points, order=desc, limit=10.