
Llama 3.1 EstLLM 70B Reward Tehisaru Baromeeter
Llama-3.1-EstLLM-70B-Reward-TehisaruBaromeeter is a reward model trained from the instruction-tuned 70B EstLLM checkpoint
on combination of data crowd-source on the Tehisaru Baromeeter platform and the HelpSteer3 dataset. The singular purpose of the model
is to model the human preferences that have been collected. The model returns a scalar value for the last assistant's response for each
messages in its input, with the higher value meaning more preferred response. Thus, different assistant's responses to the same preceding
conversation can be ranked with the model.
Use with transformers
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name = "tartuNLP/Llama-3.1-EstLLM-70B-Reward-TehisaruBaromeeter"
tokenizer = AutoTokenizer.from_pretrained(model_name)
rm = AutoModelForSequenceClassification.from_pretrained(
model_name,
dtype="auto",
device_map="auto",
attn_implementation="flash_attention_2",
num_labels=1,
)
rejected_response = [
{"content": "Kas sa räägid eesti keelt?", "role": "user"},
{
"content": "Tänan, et teadaksite, et Eesti keel on ehtne keel, mis on ehtnede rühma ja Eesti rahvuse keel. Eesti keel on olemas Eestis ja Eesti rahvusvabariigis. Eesti keelt räägivad Eesti rahvus, Eesti keelte ja Eesti keelte rahvus.",
"role": "assistant",
},
]
chosen_response = [
{"content": "Kas sa räägid eesti keelt?", "role": "user"},
{
"content": "Jah, räägin eesti keelt väga hästi! 🇪🇪\n\nOlen Muse Spark, mille on loonud Meta, ja saan sind aidata eesti keeles kirjutada, tõlkida, selgitada või lihtsalt juttu ajada.\n\nKuidas saan sind aidata?",
"role": "assistant",
},
]
rejected_tokenized = tokenizer.apply_chat_template(
rejected_response,
tokenize=True,
add_generation_prompt=False,
return_tensors="pt",
return_dict=True,
)
chosen_tokenized = tokenizer.apply_chat_template(
chosen_response,
tokenize=True,
add_generation_prompt=False,
return_tensors="pt",
return_dict=True,
)
rejected_tokenized = {k: v.to(rm.device) for k, v in rejected_tokenized.items()}
chosen_tokenized = {k: v.to(rm.device) for k, v in chosen_tokenized.items()}
with torch.no_grad():
rejected_score = rm(**rejected_tokenized).logits.squeeze(-1).item()
chosen_score = rm(**chosen_tokenized).logits.squeeze(-1).item()
# higher score means better response according to the reward model
print(rejected_score, chosen_score)
# output: -3.5 -1.875
# -1.875 > -3.5
Citation
@misc{dorkin2026estllmenhancingestoniancapabilities,
title={{EstLLM: Enhancing Estonian Capabilities in Multilingual LLMs via Continued Pretraining and Post-Training}},
author={Aleksei Dorkin and Taido Purason and Emil Kalbaliyev and Hele-Andra Kuulmets and Marii Ojastu and Mark Fišel and Tanel Alumäe and Eleri Aedmaa and Krister Kruusmaa and Kairit Sirts},
year={2026},
eprint={2603.02041},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.02041},
}