Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("OpenLLM-Ro/RoLlama2-7b-Instruct")
4model = AutoModelForCausalLM.from_pretrained("OpenLLM-Ro/RoLlama2-7b-Instruct")
5
6instruction = "Care este cel mai înalt vârf muntos din România?"
7chat = [
8 {"role": "system", "content": "Ești un asistent folositor, respectuos și onest. Încearcă să ajuți cât mai mult prin informațiile oferite, excluzând răspunsuri toxice, rasiste, sexiste, periculoase și ilegale."},
9 {"role": "user", "content": instruction},
10 ]
11prompt = tokenizer.apply_chat_template(chat, tokenize=False)
12
13inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
14outputs = model.generate(input_ids=inputs, max_new_tokens=128)
15print(tokenizer.decode(outputs[0]))| Model | |||||||
| Llama-2-7b-chat | |||||||
| RoLlama2-7b-Instruct-2024-05-14 | |||||||
| RoLlama2-7b-Instruct-2024-10-09 | |||||||
| RoLlama2-7b-Instruct-2025-04-23 | |||||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 | |||||||
| RoLlama2-7b-Instruct-DPO-2025-04-23 |
| Model | (Macro F1) | (Macro F1) | (Macro F1) | (Macro F1) | (Bleu) | (Bleu) | (Bleu) | (Bleu) |
| Llama-2-7b-chat | ||||||||
| RoLlama2-7b-Instruct-2024-05-14 | ||||||||
| RoLlama2-7b-Instruct-2024-10-09 | ||||||||
| RoLlama2-7b-Instruct-2025-04-23 | ||||||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 | ||||||||
| RoLlama2-7b-Instruct-DPO-2025-04-23 |
| Model | ||||||||
| Llama-2-7b-chat | ||||||||
| RoLlama2-7b-Instruct-2024-05-14 | ||||||||
| RoLlama2-7b-Instruct-2024-10-09 | ||||||||
| RoLlama2-7b-Instruct-2025-04-23 | ||||||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 | ||||||||
| RoLlama2-7b-Instruct-DPO-2025-04-23 |
| Model | ||||
| Llama-2-7b-chat | ||||
| RoLlama2-7b-Instruct-2024-05-14 | ||||
| RoLlama2-7b-Instruct-2024-10-09 | ||||
| RoLlama2-7b-Instruct-2025-04-23 | ||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 | ||||
| RoLlama2-7b-Instruct-DPO-2025-04-23 |
| Model | ||
| Llama-2-7b-chat | ||
| RoLlama2-7b-Instruct-2024-05-14 | ||
| RoLlama2-7b-Instruct-2024-10-09 | ||
| RoLlama2-7b-Instruct-2025-04-23 | ||
| RoLlama2-7b-Instruct-DPO-2024-10-09 | ||
| RoLlama2-7b-Instruct-DPO-2025-04-23 |
| Model | Link |
|---|---|
| RoLlama2-7b-Base-2024-05-14 | link |
| RoLlama2-7b-Instruct-2024-05-14 | link |
| RoLlama2-7b-Instruct-2024-10-09 | link |
| RoLlama2-7b-Instruct-2025-04-23 | link |
| RoLlama2-7b-Instruct-DPO-2024-10-09 | link |
| RoLlama2-7b-Instruct-DPO-2025-04-23 | link |
@inproceedings{masala-etal-2024-vorbesti,
title = "``Vorbe\c{s}ti Rom{\^a}ne\c{s}te?'' A Recipe to Train Powerful {R}omanian {LLM}s with {E}nglish Instructions",
author = "Masala, Mihai and Ilie-Ablachim, Denis and Dima, Alexandru and Corlatescu, Dragos Georgian and Zavelca, Miruna-Andreea and Olaru, Ovio and Terian, Simina-Maria and Terian, Andrei and Leordeanu, Marius and Velicu, Horia and Popescu, Marius and Dascalu, Mihai and Rebedea, Traian",
editor = "Al-Onaizan, Yaser and Bansal, Mohit and Chen, Yun-Nung",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
month = nov,
year = "2024",
address = "Miami, Florida, USA",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.findings-emnlp.681/",
doi = "10.18653/v1/2024.findings-emnlp.681",
pages = "11632--11647"
}