Livesport/bio-generator-qwen3.5-4b
Livesport Player-Bio Generator — LoRA adapter for Qwen/Qwen3.5-4B (v6)
PEFT LoRA adapter (serve on base Qwen/Qwen3.5-4B; vLLM-ready, multi-LoRA compatible). Generates short, factual football-player biographies from structured SportAPI data, in the target language given in the prompt. Distilled (SFT) from a teacher into a small student.
What it does
Input = structured player facts (name, nationality, position, birth date, career club stints with apps/goals/assists, transfers with fees, cards, national-team caps, availability). Output = a grounded bio using only the provided facts (no invented clubs/dates/stats/positions), scaling length to the data.
Training (v6)
- Base:
Qwen/Qwen3.5-4B• Method: LoRA (Unsloth SFT via TRL), bf16 + 4-bit, DGX Spark (GB10). - LoRA: r=16, alpha=16, dropout=0; targets q,k,v,o,gate,up,down_proj (all 32 layers).
- Optim: adamw8bit, LR 2e-4 linear, warmup 10, seqlen 1536, batch 8, 2 epochs.
- Data:
Livesport/bio-sft-dataset— restructured (one line per club stint:played YYYY; signed YYYY from X for €fee, removing the join the model used to get wrong) and faithfulness-filtered teacher targets. Labels judged 99.3% faithful (Claude Sonnet) after repairing position/birthplace/ birth-date hallucinations that a deterministic verifier flagged.
Eval (held-out, Claude Sonnet fact-checker + deterministic verifier)
- Overall faithful: 97.6% (359/368), avg 0.995. cs 98.7% • en 97.2% • pl 98.8% • pt-BR 95.1% • sk 97.4%.
- 0/368 verifier-detectable errors (numbers, cards, fees, position, birthplace, birth date).
- Residual ~2.4% is transfer order and nationality demonyms (not deterministically checkable); handled by the QA judge / serving guardrail below.
History: v4 (MLX) → v5 exposed number/card + position/birthplace hallucinations → root fix was cleaning the data (restructure + verifier-filter/repair labels), which v6 embodies. Field-dropout augmentation (v7-sft) did not help (96.7% < 97.6%) — clean labels were the decisive lever.
Serving (vLLM, multi-LoRA) + faithfulness guardrail
vllm serve Qwen/Qwen3.5-4B --enable-lora --max-lora-rank 16 \
--lora-modules football-v6=/models/adapters/football-v6
# request: {"model": "football-v6", "messages": [...]}Production guardrail (recommended): post-generation verify.py (deterministic check of every number/card/fee/date/position/birthplace against the data; regenerate on mismatch). Guarantees the verifier-checkable classes independent of the model. Prompt = system (bio rules) + user Target language: <cs|en|pl|pt-BR|sk>\n\nStructured player data:\n<one line per stint>.
Internal Livesport model. Not for redistribution.
