kairos-clip-confirm
A fine-tune of FunctionGemma-270M-it that reads what a football commentary says around a stretch of a match and answers whether it reports a goal. It runs in the browser in the kaairos video editor (transformers.js, WebGPU), where a picture model proposes goal clips and this one sets aside a proposal the commentary does not report. It never proposes a clip, and a clip it passes is not thereby confirmed: the editor decides, and a set-aside clip can be proposed anyway.
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. This model is a Model Derivative of Gemma; its use is subject to the same terms, including the Gemma Prohibited Use Policy. The weights were modified: LoRA adapters were trained and merged, the model was exported to ONNX fp32, and the language-model head was tied to the embedding.
How it was made
- Data. About 18,000 windows of match commentary (Whisper transcripts from SoccerNet-Echoes, CC BY 4.0), cut around goals, the talk minutes after a goal, look-alike events (shots, penalties, corners, cards…) and random stretches. The event labels decide only where a window is cut; every answer was written by an open-weight teacher model (Gemma 4 31B-it) reading the window.
- Training. LoRA (rank 16, alpha 32, all linear layers), 2 epochs, merged into the base. Validation agreement with the teacher: 91 %.
- Export. onnxruntime-genai's builder, the logits sliced to the last position, the lm_head tied to the embedding. Shipped in fp32: on 122 reference windows the fp16 file moved one answer across the threshold, the fp32 file none (max |ΔP| 0.0002 against PyTorch).
Use
One forward pass, no generation. Prompt (tokenised without adding special tokens):
<bos><start_of_turn>developer
You check whether a moment in a video is the one asked about, from what is said around it. Answer Yes or No first, then one short reason.<end_of_turn>
<start_of_turn>user
Question: Does this stretch show the moment of a goal? Do not count stretches that only suggest the moment.
What is said from 10 s before to 20 s after (speech recognition, may contain errors):
"{words, at most the first 400, or: (nothing is said)}"
Does what is said confirm it? Answer Yes or No first.<end_of_turn>
<start_of_turn>model
P(Yes) is the softmax over the Yes (10784) and No (3771) logits at the first answer position. The app sets a
proposal aside when P(Yes) is under 0.0315, a threshold chosen on validation data only and never moved, and reads no
window of fewer than 26 words (no commentary is no evidence against a goal).
Limits
Goals only, English only. Measured on one unseen match, with the picture model proposing: all 3 goals kept, wrong proposals 19 → 5. It only rules out: of the clips it passed there, 5 of 8 were not goals. Trained and measured on long-form transcripts of a whole match; read in 10-second pieces it did worse, so the app checks only clips with a whole-file transcript.