Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("OpenLLM-Ro/RoLlama2-7b-Instruct-2024-05-14 ")
4model = AutoModelForCausalLM.from_pretrained("OpenLLM-Ro/RoLlama2-7b-Instruct-2024-05-14 ")
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-DPO-2024-10-09 |
| 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-DPO-2024-10-09 |
| Model | ||||||||
| Llama-2-7b-chat | ||||||||
| RoLlama2-7b-Instruct-2024-05-14 | ||||||||
| RoLlama2-7b-Instruct-2024-10-09 | ||||||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 |
| Model | ||||
| Llama-2-7b-chat | ||||
| RoLlama2-7b-Instruct-2024-05-14 | ||||
| RoLlama2-7b-Instruct-2024-10-09 | ||||
| RoLlama2-7b-Instruct-DPO-2024-10-09 |
| Model | ||
| Llama-2-7b-chat | ||
| RoLlama2-7b-Instruct-2024-05-14 | ||
| RoLlama2-7b-Instruct-2024-10-09 | ||
| RoLlama2-7b-Instruct-DPO-2024-10-09 |
| 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-DPO-2024-10-09 | link |
@misc{masala2024vorbecstiromanecsterecipetrain,
title={"Vorbe\c{s}ti Rom\^ane\c{s}te?" A Recipe to Train Powerful Romanian LLMs with English Instructions},
author={Mihai Masala and Denis C. Ilie-Ablachim and Alexandru Dima and Dragos Corlatescu and Miruna Zavelca and Ovio Olaru and Simina Terian-Dan and Andrei Terian-Dan and Marius Leordeanu and Horia Velicu and Marius Popescu and Mihai Dascalu and Traian Rebedea},
year={2024},
eprint={2406.18266},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2406.18266},
}