2024 (1st edition)

๐Ÿฉน Help BOBAI (fix the model)

A model is broken or must grow new abilities โ€” repair and extend instead of rebuilding.

NLPFine-tuningModel repairโ˜…โ˜…โ˜…โ˜† historical

๐Ÿ“œThe task, in plain English

IOAI 2024's NLP thread: work with a language model on ciphered text of an unknown language โ€” fine-tune it for classification, then extend the classifier to more classes than it was trained for. You can't rely on pretrained knowledge of the language (it's ciphered!) โ€” the model must learn structure from the data itself.

๐Ÿ”งThe baseline you're given

A standard fine-tuning setup for the original label set. Limitation by design: the head has the wrong number of outputs the moment new classes appear, and naive re-training risks losing what was learned.

๐Ÿš€Baseline vs. solution

โš ๏ธ The baseline (what you are given)
  • Fixed-size head for the original classes
  • Naive full re-training when classes change
โœ… The winning approach
  • Head surgery: expand the classification layer, preserve learned weights for old classes, initialize new rows fresh
  • Keep old-class data in the training mix to avoid forgetting
  • Sound familiar? This is 2026 Night Watch's exact skeleton, two years earlier, in text instead of audio

๐Ÿง’Explain it like I'm brand new

The lesson that repeats every year: competition models are rarely built from scratch โ€” they're adapted. Load pretrained thing โ†’ change the last layer โ†’ train carefully without destroying what works. 2024 did it with text, 2025 with chicken counting, 2026 with audio. Learn the move once.

๐Ÿ’ฌThe Gemma 4 playthrough (2000-token limit)

The prompt pattern for any head surgery
YOU
Here is the printed module tree of my model: <paste print(model)>. I need the final classification layer expanded from N to M outputs keeping existing weights. Give ONLY the surgery code for THIS structure. Max 15 lines.
Always paste the real printed structure โ€” attribute paths differ between models, and guessing them is the #1 way LLM code fails.

๐ŸŽฏTakeaways & what Day 1 might do with this

  • Pattern family: model repair / head surgery โ€” a yearly ritual since the first edition.