Views
No views yet
A newer release is available. Haru v2.0 is the current model: 17.0M parameters, and the first Haru to score above chance on KoBEST (mean 0.469 against a chance mean of 0.450, where v1.1 scores 0.442).v2.0 is not a drop-in replacement. It is a different architecture and a different tokenizer:
- v1.1 reuses three decoder cells twice; v2.0 has six independent cells.
- v2.0 uses a separate 12k BPE tokenizer trained on a different corpus, so loss and perplexity are not comparable between the two.
- v1.1 supports recurrent depths 2, 4 and 6. v2.0 runs at depth 6 only. If you rely on shallow-depth inference, stay on v1.1.
This repository remains available for reproducibility and existing users.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3MODEL_ID = "gaon12/haru_1.1"
4tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(MODEL_ID, trust_remote_code=True)
6
7inputs = tokenizer("작은 마을에 아침이 찾아왔어요.", return_tensors="pt")
8output = model.generate(
9 **inputs,
10 max_new_tokens=120,
11 do_sample=True,
12 temperature=0.7,
13 top_p=0.9,
14 top_k=40,
15 repetition_penalty=1.08,
16 use_cache=False,
17)
18print(tokenizer.decode(output[0], skip_special_tokens=True))| Recurrent depth | Validation loss | Perplexity |
|---|---|---|
| 2 | 2.95689 | 19.238 |
| 4 | 2.12258 | 8.353 |
| 6 | 1.92052 | 6.825 |