Instructions to use icxcn/EuroLLM-22B-grc-ro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use icxcn/EuroLLM-22B-grc-ro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="icxcn/EuroLLM-22B-grc-ro") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("icxcn/EuroLLM-22B-grc-ro") model = AutoModelForCausalLM.from_pretrained("icxcn/EuroLLM-22B-grc-ro", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use icxcn/EuroLLM-22B-grc-ro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "icxcn/EuroLLM-22B-grc-ro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "icxcn/EuroLLM-22B-grc-ro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/icxcn/EuroLLM-22B-grc-ro
- SGLang
How to use icxcn/EuroLLM-22B-grc-ro with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "icxcn/EuroLLM-22B-grc-ro" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "icxcn/EuroLLM-22B-grc-ro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "icxcn/EuroLLM-22B-grc-ro" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "icxcn/EuroLLM-22B-grc-ro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use icxcn/EuroLLM-22B-grc-ro with Docker Model Runner:
docker model run hf.co/icxcn/EuroLLM-22B-grc-ro
EuroLLM-22B-grc-ro (preview)
Koine / Byzantine (patristic) Greek → Romanian translation, obtained by LoRA fine-tuning
utter-project/EuroLLM-22B-Instruct-2512 on 3,577
paragraph-level Greek–Romanian pairs. The Romanian side follows the register of the Orthodox translations in the training
data (archaic / ecclesiastical, e.g. întru, cela ce), not modern Romanian.
Status: preview. Scores below are on a 134-row development split that was also used to choose this model and its input arm. A separate 106-row test split and a 160-row held-out source were not touched by training or selection and have not been evaluated yet. There has been no human evaluation.
What is in this repository
| Path | Content |
|---|---|
*.safetensors, config.json, tokenizer files |
Merged bf16 weights (LoRA merged into the base). Loads directly in transformers and vLLM. |
adapter/ |
The LoRA adapter alone (rank 32, fp32, 702 MB) and run.json with the training settings. |
grc_normalize.py |
Required input normalization (see below). |
example.py |
Minimal transformers usage. |
Input format
The model was trained with the Greek folded to monotonic form. Apply monotonic() from grc_normalize.py to every Greek
input: it drops breathings, iota subscript, macron and breve, and maps grave and circumflex to acute. Then send a single
user message:
Translate the following Koine/Ancient Greek text into Romanian. Output only the Romanian translation.
{greek}
All reported results use greedy decoding. Training and evaluation were paragraph-level (median about 620 Greek characters, maximum about 2,300); behaviour on much longer inputs is untested.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from grc_normalize import monotonic
REPO = "icxcn/EuroLLM-22B-grc-ro"
PROMPT = "Translate the following Koine/Ancient Greek text into Romanian. Output only the Romanian translation.\n\n{grc}"
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.bfloat16, device_map="auto")
messages = [{"role": "user", "content": PROMPT.format(grc=monotonic(greek))}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
vLLM: serve the merged weights (vllm serve icxcn/EuroLLM-22B-grc-ro) and normalize on the client side.
To use the adapter instead: PeftModel.from_pretrained(base_model, "icxcn/EuroLLM-22B-grc-ro", subfolder="adapter").
Results (development split, 134 rows)
| System | chrF++ | COMET-22 | chrF++ Bible rows | chrF++ patristic rows |
|---|---|---|---|---|
| Base model, zero-shot (same input format) | 47.61 | not measured | 52.17 | 44.67 |
| This model | 58.99 (95% CI 56.73–61.19) | 0.8018 (0.7918–0.8147) | 71.22 | 51.19 |
- chrF++ is sacrebleu
CHRF(word_order=2); COMET isUnbabel/wmt22-comet-da; intervals are 95% bootstrap intervals over rows (200 resamples). - "Bible" rows are the New Testament and two Psalm editions (65 dev rows); "patristic" rows are everything else (69 rows).
- Greedy decoding is not bit-for-bit reproducible across runs: the same merged model scored 54.99 and 54.37 chrF++ on two vLLM runs in a separate test of a different model, so differences below about 1 chrF++ should not be read as real.
- Among four fine-tuned base models (also Gemma 4 31B, Gemma 4 12B, Krikri-8B) this one tied the best on dev (Gemma 4 31B: 59.43 chrF++, COMET 0.8019; difference not significant) and beat the 12B and 8B models by about 4–5 chrF++.
Learning curve (same settings, nested subsets of the training data, dev split):
| Training pairs | Dev loss | chrF++ | Bible | Patristic |
|---|---|---|---|---|
| 894 (25%) | 0.912 | 55.73 | 66.99 | 48.53 |
| 1,788 (50%) | 0.865 | 55.92 | 69.61 | 47.36 |
| 2,683 (75%) | 0.829 | 57.41 | 70.78 | 48.97 |
| 3,577 (100%, this model) | 0.802 | 58.99 | 71.22 | 51.19 |
Dev loss was still falling at about 0.055 per doubling of data when training data ran out.
Training
- Method: LoRA, rank 32, alpha 64, dropout 0.05, on the attention and MLP projections of the language model. Base weights bf16, adapter weights fp32, bf16 compute. No quantization.
- Optimization: 2 epochs, learning rate 1e-4 with cosine schedule and 3% warmup, effective batch 16 sequences (2 × 8 gradient accumulation), maximum 2,560 tokens, seed 0, gradient checkpointing. Loss on the Romanian answer only.
- Cost / software: about 49 minutes of training on one H200 (2,953 s);
transformers5.22.2,peft0.21.2,torch2.15.0. - Data: 3,577 Greek–Romanian paragraph pairs (about 363k Greek words, 423k Romanian words; 1.91M tokens) from 14 bilingual sources: the New Testament, two editions of the Psalms, a liturgical book, and patristic and ascetic works. About half of the Greek is properly polytonic Unicode (New Testament, Psalms); the other half comes from OCR'd PDFs and has collapsed diacritics and OCR errors, which is why the model uses the monotonic-folded input form. The training data is not distributed with this model.
- Cleaning: NFC normalization; folio markers, editorial brackets, scripture-citation parentheticals, section numbers and footnote digits removed; rows with length-ratio outliers, merged tokens, mixed-script Greek, embedded chapter headings or duplicates dropped; training rows overlapping the test split removed.
- Held out: a development split (134 rows, used for monitoring and selection), a test split (106 rows) and one whole source (160 rows) used as an out-of-distribution test.
Limitations
- Patristic text is the weak spot. The two best fine-tuned models both plateau at about 51–52 chrF++ on patristic rows against about 71 on Bible rows, which looks more like a limit of the training data than of model size. Expect noticeably worse output on patristic and philosophical prose than on Gospel or Psalm text.
- Register. Output imitates the Orthodox Romanian of the training translations. It is not modern Romanian, and it will reproduce that translation tradition's wording choices.
- Fluent errors. Translations can be fluent and wrong (mistranslated terms, dropped clauses, garbled phrases). Do not use the output as authoritative text or for liturgical or theological purposes without review by a reader of both languages.
- Evidence is limited. Single training run per configuration, a 134-row dev split, automatic metrics only, no human evaluation, and the test and out-of-distribution evaluations are still pending.
- Input. Only Koine / Byzantine Greek paragraphs normalized with
grc_normalize.pywere used. Classical or dialectal Greek, modern Greek, other target languages and very long inputs were not evaluated.
- Downloads last month
- 488