Downloads · 30 days
11
5% of all-time downloads
EuropeanParliament/EuroLLM-22B-EU-legislative
EuroLLM-22B-EU-legislative is a translation model from EuropeanParliament. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned version of EuroLLM-22B-Instruct-2512 for testing translation task : English into 23 official EU languages, specifically for EU legislative texts.
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
218
Public
Parameters
22.6B
45.3 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors45.3 GB · 100%
From the Hugging Face model README
Fine-tuned version of EuroLLM-22B-Instruct-2512 for testing translation task : English into 23 official EU languages, specifically for EU legislative texts.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "EuropeanParliament/EuroLLM-22B-EU-legislative"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path, torch_dtype=torch.bfloat16, device_map="auto"
)
messages = [
{"role": "user", "content": "Translate the following English text to French:\n\nThe regulation applies to all member states."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
This work was supported by EuroHPC resources on the Discoverer supercomputer (Sofia, Bulgaria).