Llama-3.2-1B — SAGA Δ-DPO (Norwegian Bokmål)

LoRA adapter trained with SAGA (Syntax-Aligned Grammar Adaptation) using Δ-DPO on Norwegian Bokmål (NB).

Part of the SAGA HuggingFace Collection.
Model trained by Emil Carlsson Wiman as part of the SAGA project.

Results (Stanza NB, N=200)

Model Parse Success Parse Score PPL
Llama-3.2-1B base 83.0% 0.392 30.1
+ SAGA Δ-DPO (this model) 98.5% 0.622 33.0

Cross-lingual transfer (zero-shot from NB adapter):

Target Parse Success
Danish 98.5%
Swedish 99.0%
Icelandic 91.5%

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base = AutoModelForCausalLM.from_pretrained(
    "meta-llama/Llama-3.2-1B",
    dtype=torch.bfloat16,
    device_map="auto",
)
model = PeftModel.from_pretrained(base, "Hodfa71/llama-3.2-1b-nb-saga-delta-dpo")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")

inputs = tokenizer("Regjeringen kunngjorde i dag", return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=80, do_sample=True, temperature=0.8)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Training

  • Method: Δ-DPO (online preference pairs filtered by quality gap δ≥0.25)
  • Grammar oracle: SpaCy nb_core_news_lg
  • SFT: skipped (base PS = 83% > τ=0.80)
  • Antihack: repetition_penalty=1.3, mattr_window=20
  • LoRA: r=16, α=32, all-linear target modules, bfloat16
  • Training data: Norwegian Bokmål Wikipedia prompts

Citation

@article{fakhar2025saga,
  title   = {SAGA: Syntax-Aligned Grammar Adaptation via Reinforcement Learning from Verifiable Feedback},
  author  = {Fakhar, Hoda and Carlsson Wiman, Emil},
  year    = {2025}
}
Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Hodfa71/llama-3.2-1b-nb-saga-delta-dpo

Adapter
(746)
this model

Collection including Hodfa71/llama-3.2-1b-nb-saga-delta-dpo