EuroLLM-22B Legislative Text (Fine-tuned) AI4TRA

Fine-tuned version of EuroLLM-22B-Instruct-2512 for testing translation task : English into 23 official EU languages, specifically for EU legislative texts.

Model Details

  • Base model: utter-project/EuroLLM-22B-Instruct-2512
  • Fine-tuning method: LoRA (Low-Rank Adaptation)
  • Task: EN → 23 EU languages translation (legislative domain)
  • Precision: bf16
  • Developed by: AI4TRAD
  • Organization: European Parliament
  • Compute: EuroHPC (6x GPU, Discoverer supercomputer)

Usage

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))

Authors

  • AI4TRAD

Acknowledgements

This work was supported by EuroHPC resources on the Discoverer supercomputer (Sofia, Bulgaria).

Downloads last month
56
Safetensors
Model size
23B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for EuropeanParliament/EuroLLM-22B-EU-legislative

Adapter
(1)
this model
Adapters
1 model