The buzz-timing model of a two-model Japanese competitive buzz-quiz (早押しクイズ) system.
It reads the question character by character and outputs a confidence in [0, 1]; the orchestrator
buzzes the moment confidence ≥ θ. It is an LFM2.5-1.2B backbone + a linear regression head
(not a text generator) — fast enough to score every incoming character (~9 ms/char).
YUGOROU/quiz-main-gemma-merged| File | Role |
|---|---|
model.safetensors, config.json | LFM2.5-1.2B backbone (Lfm2Model, no LM head) |
buzz_head.pt | Regression head: Linear(hidden_size → 1) on the last token's hidden state → sigmoid → confidence |
tokenizer.json, chat_template.jinja | tokenizer + the exact prompt template used at train time |
import torch, torch.nn as nn
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoTokenizer
repo = "YUGOROU/quiz-buzz-reg-1.2bjp-merged"
tok = AutoTokenizer.from_pretrained(repo)
backbone = AutoModel.from_pretrained(repo, torch_dtype=torch.bfloat16).eval()
head = nn.Linear(backbone.config.hidden_size, 1)
head.load_state_dict(torch.load(hf_hub_download(repo, "buzz_head.pt"), map_location="cpu"))
head.eval()
def confidence(prefix: str) -> float:
msgs = [{"role": "user", "content": f"問題文({len(prefix)}文字目まで):\n{prefix}"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
h = backbone(ids).last_hidden_state[:, -1] # last-token hidden state
return torch.sigmoid(head(h)).item()
# buzz when confidence(prefix) >= theta (theta is the accuracy/speed knob; higher = later = safer)
A ready-to-run FastAPI server (serve/serve_buzz.py) is in the GitHub repo.
LiquidAI/LFM2.5-1.2B, full fine-tune (standard LoRA under-covers LFM2's MLPs), soft-BCE
regression head trained on S-buzz confidence labels (corpus built from AI王 / JAQKET).Fine-tune of LiquidAI LFM2.5-1.2B; your use is subject to the upstream LFM Open License.
Training data derived from AI王 (Project AIO) / JAQKET. Quiz questions © abc/EQIDEN実行委員会 / 株式会社キュービック / クイズ法人カプリティオ. Non-commercial research use only. No dataset redistribution — only model weights and inference code are released.
3 commits
The buzz-timing model of a two-model Japanese competitive buzz-quiz (早押しクイズ) system.
It reads the question character by character and outputs a confidence in [0, 1]; the orchestrator
buzzes the moment confidence ≥ θ. It is an LFM2.5-1.2B backbone + a linear regression head
(not a text generator) — fast enough to score every incoming character (~9 ms/char).
YUGOROU/quiz-main-gemma-merged| File | Role |
|---|---|
model.safetensors, config.json | LFM2.5-1.2B backbone (Lfm2Model, no LM head) |
buzz_head.pt | Regression head: Linear(hidden_size → 1) on the last token's hidden state → sigmoid → confidence |
tokenizer.json, chat_template.jinja | tokenizer + the exact prompt template used at train time |
import torch, torch.nn as nn
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoTokenizer
repo = "YUGOROU/quiz-buzz-reg-1.2bjp-merged"
tok = AutoTokenizer.from_pretrained(repo)
backbone = AutoModel.from_pretrained(repo, torch_dtype=torch.bfloat16).eval()
head = nn.Linear(backbone.config.hidden_size, 1)
head.load_state_dict(torch.load(hf_hub_download(repo, "buzz_head.pt"), map_location="cpu"))
head.eval()
def confidence(prefix: str) -> float:
msgs = [{"role": "user", "content": f"問題文({len(prefix)}文字目まで):\n{prefix}"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
h = backbone(ids).last_hidden_state[:, -1] # last-token hidden state
return torch.sigmoid(head(h)).item()
# buzz when confidence(prefix) >= theta (theta is the accuracy/speed knob; higher = later = safer)
A ready-to-run FastAPI server (serve/serve_buzz.py) is in the GitHub repo.
LiquidAI/LFM2.5-1.2B, full fine-tune (standard LoRA under-covers LFM2's MLPs), soft-BCE
regression head trained on S-buzz confidence labels (corpus built from AI王 / JAQKET).Fine-tune of LiquidAI LFM2.5-1.2B; your use is subject to the upstream LFM Open License.
Training data derived from AI王 (Project AIO) / JAQKET. Quiz questions © abc/EQIDEN実行委員会 / 株式会社キュービック / クイズ法人カプリティオ. Non-commercial research use only. No dataset redistribution — only model weights and inference code are released.
3 commits