Views
No views yet
| Metric | Base | Adapted |
|---|---|---|
| Win rate on held-out Yorùbá tasks | 30 | 71 |
train_on_inputs=false.a7116920… (byte-identical to the released dataset — this guarantees the released dataset is what the model trained on).1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base = "meta-llama/Llama-3.2-3B-Instruct" # or an equivalent mirror
5tok = AutoTokenizer.from_pretrained("<this-repo>")
6model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained(base), "<this-repo>")
7
8msg = [{"role": "user", "content": "Restore the correct Yoruba diacritics (tone marks and dots) in this text:\n\nBawo ni, se alaafia ni?"}]
9ids = tok.apply_chat_template(msg, add_generation_prompt=True, return_tensors="pt", return_dict=True)
10print(tok.decode(model.generate(**ids, max_new_tokens=120, repetition_penalty=1.3, no_repeat_ngram_size=3)[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))