CoolFace
Modelpublic

nagohachi/Llama-3.2-tiny-lm-japanese-500m-base-v2

sourceHugging Facellama3.2updated 2mo agoView on Hugging Face
1likes83downloads
Model Card

Llama-3.2-tiny-lm-japanese-500m-base-v2

Built with Llama. This model is a derivative of Meta's Llama-3.2-3B, produced by structured (width) pruning followed by continued pre-training in Japanese.

A ~476M-parameter Japanese base model created by width-pruning Llama-3.2-3B down to a 500M-class model, swapping in the Japanese llm-jp/llm-jp-3-440m tokenizer, and recovery-pretraining on ~10B tokens of educational Japanese web text. This is the base model — no instruction tuning, no chat template. See Llama-3.2-tiny-lm-japanese-500m-sft-v2 and Llama-3.2-tiny-lm-japanese-500m-dpo-v2 for the instruction-tuned / preference-aligned variants.

It is the pruning-based counterpart to the from-scratch tiny-lm-japanese-500m-base-v1; at an equal ~10B-token budget it reaches the from-scratch model's final quality in roughly half the tokens and scores higher on downstream tasks (see Evaluation).

The model uses a custom Llama-style implementation shipped with the repo (trust_remote_code=True required).

Model details

Parameters476M
Source modelmeta-llama/Llama-3.2-3B
Pruningwidth: hidden 3072→1024, heads 24→8, KV 8→4 (head_dim 128 kept), 28 layers
Context length2048
Vocab size99,574
Tokenizerllm-jp/llm-jp-3-440m (embeddings remapped mean-of-pieces from Llama)

Training

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "nagohachi/Llama-3.2-tiny-lm-japanese-500m-base-v2"
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))

Evaluation

llm-jp-eval (v2.1.5)

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. The -v1 rows are the from-scratch counterparts for reference.

Model nameaverageCRELFAHE-ENHE-JAMRMTNLIQARC
Llama-3.2-tiny-lm-japanese-500m-base-v20.2320.2700.3220.0610.1700.1000.0130.6570.3980.1370.190
Llama-3.2-tiny-lm-japanese-500m-sft-v20.2240.3200.2290.0580.1530.0900.0170.6650.4050.1120.190
Llama-3.2-tiny-lm-japanese-500m-dpo-v20.2220.3200.2250.0640.1530.0600.0170.6640.3950.1080.210
------------------------------------
tiny-lm-japanese-500m-base-v10.1980.2230.1300.0350.2070.1300.0070.5040.4830.0720.190
tiny-lm-japanese-500m-sft-v10.1910.3100.1020.0360.1870.0700.0130.5230.3800.0820.210
tiny-lm-japanese-500m-dpo-v10.1940.3100.1300.0360.1870.0700.0130.5310.3450.0820.240
------------------------------------
llm-jp/llm-jp-3-440m0.2490.2800.2660.0590.1700.0800.0270.7600.5250.1440.180
llm-jp/llm-jp-3-440m-instruct30.2540.3170.2890.0660.2230.1100.0170.7440.5200.1550.100

License

This model is a derivative of Meta Llama 3.2 and is distributed under the Llama 3.2 Community License (see also the Acceptable Use Policy). Attribution is provided in the NOTICE file. Built with Llama.