初始化项目,由ModelHub XC社区提供模型

Model: AksaraLLM/AksaraLLM-Qwen-1.5B-v5-public
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-22 08:36:18 +08:00
commit 5007cc35ef
29 changed files with 1365138 additions and 0 deletions

103
README.md Normal file
View File

@@ -0,0 +1,103 @@
---
language:
- id
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen2-1.5B
tags:
- indonesian
- aksarallm
- qwen2
- continued-pretrain
---
# AksaraLLM-Qwen-1.5B-v5-public
Indonesian-tuned Qwen2 1.5B (1.78B params actual). This is the **best 1.5B
model** in the org by perplexity (Devin audit) and is recommended as the
default daily-driver Indonesian LM until the from-scratch 20B is trained.
## Measured baseline (Devin audit, CPU bf16, 50 short Indonesian sentences)
| Metric | Value |
|---|---|
| Perplexity | **8.4** |
| English-stopword ratio in ID-prompted output | 0.9% |
| Indonesian-stopword ratio in ID-prompted output | 24.1% |
| Parameters | 1777.1 M |
| Architecture | Qwen2ForCausalLM |
| Context length | 32 768 |
## Sample generations
- **Indonesia adalah negara** → coherent factual Indonesian completion (some hallucination on neighbouring countries).
- **Once upon a time** → coherent English children's-story continuation (model is bilingual ID/EN).
- **Apa nama kamu?** → Indonesian forum-style response (identity not calibrated).
## Quickstart
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tok = AutoTokenizer.from_pretrained("AksaraLLM/AksaraLLM-Qwen-1.5B-v5-public")
model = AutoModelForCausalLM.from_pretrained(
"AksaraLLM/AksaraLLM-Qwen-1.5B-v5-public",
torch_dtype=torch.bfloat16,
device_map="auto",
)
inp = tok("Indonesia adalah negara", return_tensors="pt").to(model.device)
print(tok.decode(model.generate(**inp, max_new_tokens=120, do_sample=True, top_p=0.9)[0], skip_special_tokens=True))
```
## Known issues
- **`tie_word_embeddings` config bug**: the config flags weights as tied, but the
checkpoint contains different `embed_tokens.weight` and `lm_head.weight`.
HF transformers prints a warning and disables tying at load time, but
re-saving via `save_pretrained` may overwrite one with the other and break
the model. **Recommended fix**: set `tie_word_embeddings: false` in
`config.json` (preserves checkpoint correctness).
- **Identity uncalibrated** — model is descended from Qwen2 and may identify as Qwen.
- **No chat template** in the bundled tokenizer config — apply Qwen2 ChatML manually if needed.
## Recommended downstream work
1. Fix `tie_word_embeddings: false` in `config.json`.
2. Identity SFT (50100 prompts).
3. Add Qwen2 ChatML `chat_template`.
4. IndoNLU / IndoMMLU benchmarks.
## License
Apache 2.0
## Sample outputs (CPU inference, greedy, repeat_penalty=1.15)
Real generation captured during the Devin audit on 2026-05-02. Greedy decoding (`do_sample=False`) so these are reproducible.
### Continuations (no chat template)
**Prompt:** Indonesia adalah negara kepulauan terbesar di dunia,
**Continuation:** dengan 17.508 pulau yang tersebar di seluruh wilayahnya. Indonesia memiliki berbagai jenis tanaman dan hewan, termasuk beberapa spesies unik seperti kelinci kambing (Borneo), burung bali (Sunda), dan buaya laut (Sumatera). Selain itu, Indonesia juga merupakan salah satu negara
**Prompt:** Resep sederhana untuk membuat nasi goreng adalah
**Continuation:** dengan memasaknya menggunakan bahan-bahan yang mudah didapatkan di rumah. Bisa juga disajikan sebagai hidangan makan malam atau sarapan.
Banyak orang menganggap bahwa nasi goreng hanya bisa dibuat oleh chef, tapi sebenarnya tidak demikian. Hanya saja cara pembuatan dan proses penyajian yang berbed
**Prompt:** Ibukota Republik Indonesia adalah
**Continuation:** Jakarta. Kota ini terletak di bagian tengah pulau Jawa, tepatnya berada pada ketinggian 10 meter dari permukaan laut. Dengan luas wilayah sekitar 584 kilometer persegi dan memiliki populasi sekitar 9 juta jiwa, Jakarta merupakan ibu negara Indonesia.
Jakarta memang
**Prompt:** Bahasa Indonesia berasal dari rumpun bahasa
**Continuation:** yang berbeda-beda, yaitu:
A. Jawa dan Madura
B. Melayu dan Minangkabau
C. Aceh dan Sunda
D. Sumatera dan Kalimantan
Jawaban: C
Penjelasan:
1. Bahasa Indonesia adalah sebuah bahasa yang terdiri atas beberapa subbahasa atau var