Views
No views yet
Note: Llama 3.1 8B is a gated model — you need to request access at HuggingFace before downloading.
| Model | Greynir PS ↑ | Score ↑ | PPL-Wiki ↓ | ScaLA AUROC ↑ |
|---|---|---|---|---|
| Llama-3.1-8B Base | 72.0% | 0.443 | 22.0 | 0.583 |
| + KL-SFT | 63.5% | 0.502 | 14.1 | — |
| + KL-SFT + Δ-DPO | 96.0% | 0.703 | 17.1 | 0.615 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B", torch_dtype="auto")
5model = PeftModel.from_pretrained(base, "Hodfa71/llama-3.1-8b-is-saga-kl-sft-delta-dpo")
6tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B")
7
8prompt = "Íslenska er"
9inputs = tokenizer(prompt, return_tensors="pt")
10output = model.generate(**inputs, max_new_tokens=60, temperature=0.8, do_sample=True)
11print(tokenizer.decode(output[0], skip_special_tokens=True))1@article{fakhar2025saga,
2 title={SAGA: Syntax-Aware Grammar Alignment for Low-Resource Nordic Languages},
3 author={Fakhar, Hoda and others},
4 year={2025},
5 note={Under review}
6}