Downloads · 30 days
6
12% of all-time downloads
Hodfa71/llama-3.1-8b-is-saga-kl-sft-delta-dpo
llama-3.1-8b-is-saga-kl-sft-delta-dpo is a text generation model from Hodfa71. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.1.
Fine-tuned with SAGA (Syntax-Aware Grammar Alignment) using KL-regularised SFT followed by Δ-DPO. The KL penalty keeps the policy anchored to the base distribution during SFT, preserving generation diversity for downs…
Downloads · 30 days
6
12% of all-time downloads
All-time downloads
51
Public
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
Fine-tuned with SAGA (Syntax-Aware Grammar Alignment) using KL-regularised SFT followed by Δ-DPO. The KL penalty keeps the policy anchored to the base distribution during SFT, preserving generation diversity for downstream preference mining.
This is a LoRA adapter. Load it on top of meta-llama/Llama-3.1-8B.
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 |
+24pp Greynir parse success over base. Best IS result for a non-Nordic model.
Greynir is a rule-based Icelandic constituency parser (purpose-built for Icelandic morphology). Stanza IS is used as an independent held-out eval but is weaker for Icelandic.
Llama 3.1 8B has no Icelandic/Nordic training data (base PS 72% < τ=80%, non-Nordic). The three-way rule applies:
Standard 3-epoch SFT collapses entropy (2.70 → 2.10), starving Δ-DPO of diverse pairs. KL-SFT (λ=0.10) retains entropy and raises PS to 96%.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B", torch_dtype="auto")
model = PeftModel.from_pretrained(base, "Hodfa71/llama-3.1-8b-is-saga-kl-sft-delta-dpo")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B")
prompt = "Íslenska er"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=60, temperature=0.8, do_sample=True)
print(tokenizer.decode(output[0], skip_special_tokens=True))
@article{fakhar2025saga,
title={SAGA: Syntax-Aware Grammar Alignment for Low-Resource Nordic Languages},
author={Fakhar, Hoda and others},
year={2025},
note={Under review}
}
Meta Llama 3.1 Community License. The LoRA adapter weights are released under the same license as the base model.