Decontamination report: 8-gram overlap with HinoMotoBench-ja questions, mean 12-16% (formal phrases unavoidable).
1import torch, json
2from huggingface_hub import hf_hub_download
3
4# Download weights + config + tokenizer
5repo = "FiShota/hinomoto-100m-v7"
6ckpt_path = hf_hub_download(repo_id=repo, filename="pytorch_model.bin")
7config_path = hf_hub_download(repo_id=repo, filename="config.json")
8tok_path = hf_hub_download(repo_id=repo, filename="tokenizer.json")
9
10# Need the HinoMoto codebase for model class
11# git clone https://github.com/FIshota/hinomoto-model && cd hinomoto-model && pip install -e .
12from hinomoto.tokenizer import ByteBPETokenizer
13from hinomoto.model.hinomoto_model import HinoMotoConfig, HinoMotoModel
14from hinomoto.infer.generate import generate_ids
15
16# Load
17cfg = HinoMotoConfig(**json.load(open(config_path)))
18model = HinoMotoModel(cfg).to("cuda")
19model.load_state_dict(torch.load(ckpt_path, weights_only=False))
20model.eval()
21tok = ByteBPETokenizer.load(tok_path)
22
23# Generate
24prompt = "今日もいい天気"
25ids = tok.encode(prompt, add_bos=True)
26inp = torch.tensor([ids], dtype=torch.long, device="cuda")
27with torch.no_grad():
28 out_ids = generate_ids(model, inp, max_new_tokens=80,
29 temperature=0.7, top_p=0.9)
30print(tok.decode(out_ids[0].tolist()))
1import re
2SENTENCE_END = re.compile(r"[。?!\n]")
3LOOP_RE = re.compile(r"(.{4,30}?)\1{2,}")
4
5def clean(text, max_sentences=2):
6 # 1. ループ検出 (n-gram repeat) → 切り詰め
7 m = LOOP_RE.search(text)
8 if m:
9 text = text[:m.start() + len(m.group(1))]
10 # 2. 文末で切り詰め
11 parts = []
12 last = 0
13 for m in SENTENCE_END.finditer(text):
14 parts.append(text[last:m.end()])
15 last = m.end()
16 if len(parts) >= max_sentences:
17 break
18 return "".join(parts).rstrip() if parts else text
1@misc{hinomoto2026v7,
2 title = {HinoMoto-100M-v7: A Solo-Built Japanese Family-Conversation LM},
3 author = {{Project HinoMoto}},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/FiShota/hinomoto-100m-v7},
7}