Downloads · 30 days
45
25% of all-time downloads
nagohachi/tiny-lm-japanese-500m-base-v1
tiny-lm-japanese-500m-base-v1 is a text generation model from nagohachi. Use it when you need the model to write or continue text. It is set up for transformers.
A ~500M-parameter Japanese language model pretrained from scratch on ~10B tokens of educational Japanese web text. This is the base model — no instruction tuning and no chat template. See tiny-lm-japanese-500m-sft-v1…
Downloads · 30 days
45
25% of all-time downloads
All-time downloads
180
Public
Parameters
480M
959 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors959 MB · 99%
From the Hugging Face model README
A ~500M-parameter Japanese language model pretrained from scratch on ~10B tokens of educational Japanese web text. This is the base model — no instruction tuning and no chat template. See tiny-lm-japanese-500m-sft-v1 and tiny-lm-japanese-500m-dpo-v1 for the instruction-tuned / preference-aligned variants.
The model uses a custom Llama-style implementation shipped with the repo
(trust_remote_code=True required).
| Parameters | 480M |
| Context length | 2048 |
| Vocab size | 99,574 |
| Tokenizer | llm-jp/llm-jp-3-440m |
sample_10BT)from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "nagohachi/tiny-lm-japanese-500m-base-v1"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype="bfloat16")
inputs = tok("日本の首都は", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=64, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
We evaluated the models using 100 examples from the test split with greedy decoding. The llm-jp baselines were re-evaluated with the same harness. Base models use the 4-shot setting; SFT/DPO models and the instruct baseline are prompted through their chat template.
| Model name | average | CR | EL | FA | HE-EN | HE-JA | MR | MT | NLI | QA | RC |
|---|---|---|---|---|---|---|---|---|---|---|---|
| tiny-lm-japanese-500m-base-v1 | 0.198 | 0.223 | 0.130 | 0.035 | 0.207 | 0.130 | 0.007 | 0.504 | 0.483 | 0.072 | 0.190 |
| tiny-lm-japanese-500m-sft-v1 | 0.191 | 0.310 | 0.102 | 0.036 | 0.187 | 0.070 | 0.013 | 0.523 | 0.380 | 0.082 | 0.210 |
| tiny-lm-japanese-500m-dpo-v1 | 0.194 | 0.310 | 0.130 | 0.036 | 0.187 | 0.070 | 0.013 | 0.531 | 0.345 | 0.082 | 0.240 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| llm-jp/llm-jp-3-440m | 0.249 | 0.280 | 0.266 | 0.059 | 0.170 | 0.080 | 0.027 | 0.760 | 0.525 | 0.144 | 0.180 |
| llm-jp/llm-jp-3-440m-instruct3 | 0.254 | 0.317 | 0.289 | 0.066 | 0.223 | 0.110 | 0.017 | 0.744 | 0.520 | 0.155 | 0.100 |