Views
No views yet
Built with Llama. This model is a derivative of Meta's Llama-3.2-3B, produced by structured (width) pruning, continued pre-training, and supervised fine-tuning.
trust_remote_code=True required) and the llm-jp-3 instruct chat template.| Parameters | 476M |
| Source model | meta-llama/Llama-3.2-3B |
| Context length | 2048 |
| Vocab size | 99,574 |
| Tokenizer | llm-jp/llm-jp-3-440m |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3repo = "nagohachi/Llama-3.2-tiny-lm-japanese-500m-sft-v2"
4tok = AutoTokenizer.from_pretrained(repo)
5model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype="bfloat16")
6
7messages = [{"role": "user", "content": "日本の首都はどこですか?"}]
8inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
9out = model.generate(inputs, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.9)
10print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))-v1 rows are the from-scratch
counterparts for reference.| Model name | average | CR | EL | FA | HE-EN | HE-JA | MR | MT | NLI | QA | RC |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-3.2-tiny-lm-japanese-500m-base-v2 | 0.232 | 0.270 | 0.322 | 0.061 | 0.170 | 0.100 | 0.013 | 0.657 | 0.398 | 0.137 | 0.190 |
| Llama-3.2-tiny-lm-japanese-500m-sft-v2 | 0.224 | 0.320 | 0.229 | 0.058 | 0.153 | 0.090 | 0.017 | 0.665 | 0.405 | 0.112 | 0.190 |
| Llama-3.2-tiny-lm-japanese-500m-dpo-v2 | 0.222 | 0.320 | 0.225 | 0.064 | 0.153 | 0.060 | 0.017 | 0.664 | 0.395 | 0.108 | 0.210 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 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 |