Views
No views yet



1from transformers import AutoModelForCausalLM, AutoTokenizer
2device = "cuda" # the device to load the model onto
3
4model_id = "AtlaAI/Selene-1-Mini-Llama-3.1-8B"
5
6model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
7tokenizer = AutoTokenizer.from_pretrained(model_id)
8
9prompt = "I heard you can evaluate my responses?" # replace with your prompt / we provide prompt templates used during training at github.com/atla-ai/selene-mini/tree/main/prompt-templates
10messages = [{"role": "user", "content": prompt}]
11text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
12model_inputs = tokenizer([text], return_tensors="pt").to(device)
13
14generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512, do_sample=True)
15generated_ids = [output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)]
16
17response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]@misc{alexandru2025atlaseleneminigeneral,
title={Atla Selene Mini: A General Purpose Evaluation Model},
author={Andrei Alexandru and Antonia Calvi and Henry Broomfield and Jackson Golden and Kyle Dai and Mathias Leys and Maurice Burger and Max Bartolo and Roman Engeler and Sashank Pisupati and Toby Drane and Young Sun Park},
year={2025},
eprint={2501.17195},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.17195},
}