Instructions to use ipipan/Bielik-11B-IPIS-Translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ipipan/Bielik-11B-IPIS-Translator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ipipan/Bielik-11B-IPIS-Translator") 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("ipipan/Bielik-11B-IPIS-Translator") model = AutoModelForCausalLM.from_pretrained("ipipan/Bielik-11B-IPIS-Translator", 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 ipipan/Bielik-11B-IPIS-Translator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ipipan/Bielik-11B-IPIS-Translator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ipipan/Bielik-11B-IPIS-Translator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ipipan/Bielik-11B-IPIS-Translator
- SGLang
How to use ipipan/Bielik-11B-IPIS-Translator 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 "ipipan/Bielik-11B-IPIS-Translator" \ --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": "ipipan/Bielik-11B-IPIS-Translator", "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 "ipipan/Bielik-11B-IPIS-Translator" \ --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": "ipipan/Bielik-11B-IPIS-Translator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ipipan/Bielik-11B-IPIS-Translator with Docker Model Runner:
docker model run hf.co/ipipan/Bielik-11B-IPIS-Translator
Bielik-11B-IPIS-Translator
Bielik-11B-IPIS-Translator is a Polish–English large language model for gender-sensitive translation. It translates in both directions:
- English → Polish: it translates English text, which rarely marks gender, into gender-inclusive Polish. Depending on context, it uses masculine–feminine dyads, feminine forms or neutral expressions instead of generic masculine forms, and fixes the grammatical agreement of the words that depend on them.
- Polish → English: it translates gender-inclusive Polish, with gendered dyads of nouns, adjectives and verbs, into fluent, natural English without redundant repetitions.
The model is speakleash/Bielik-11B-v2.3-Instruct instruction-tuned on the translation-augmented config of the Inclusive Polish Instruction Set (IPIS). It is the best-performing translation model in the paper Integrating gender inclusivity into large language models via instruction tuning.
Usage
The model was trained without a system prompt, and this setting gives the best results (see Evaluation). Write the instruction and the text to translate in a single user message. The instruction can be in Polish or in English.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "ipipan/Bielik-11B-IPIS-Translator"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
prompt = "Dokonaj przekładu na inkluzywny język polski. Tekst, który masz przetłumaczyć: "
text = "This year's Oscar winners posed on the red carpet."
messages = [{"role": "user", "content": prompt + text}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=1024, do_sample=False)
print(tokenizer.decode(outputs[0, inputs.shape[1]:], skip_special_tokens=True))
Possible outputs:
Tegoroczne laureatki i tegoroczni laureaci Oscarów pozowały/pozowali na czerwonym dywanie.
For the opposite direction, give gender-inclusive Polish text with a Polish → English instruction:
prompt = "Wygeneruj angielskie tłumaczenie tekstu napisanego w inkluzywnym języku polskim. Tekst w języku polskim: "
text = "W piątek policja aresztowała pracownika i pracownicę banku."
Possible outputs:
On Friday, the police arrested two bank employees.
Example user prompts
During training, each example was paired with a randomly assigned user prompt, written in Polish or in English, for its translation direction. Any similar instruction works, for example:
| Direction | Prompt language | Example |
|---|---|---|
| EN → PL | PL | Przetłumacz tekst z języka angielskiego na język polski, dbając o wrażliwość na inkluzywność językową. Tekst angielski do tłumaczenia: |
| EN → PL | EN | Translate the text from English to Polish, maintaining the principles of inclusive language. Text to be translated: |
| PL → EN | PL | Przetłumacz na angielski. Tekst w języku źródłowym: |
| PL → EN | EN | Translate the text from Polish into the English language. Source text: |
Training
Data
The model was trained on the translation-augmented config of IPIS: 23,532 train instructions, with the 2,732-instruction dev split used for monitoring. The instructions are split evenly between the EN → PL and PL → EN directions.
This config pairs every human-written gender-inclusive Polish text from the IPIS proofreading config with an English translation. Most English texts were generated with Gemma-3-27B, the best-performing model on standard Polish → English translation in our preliminary evaluation (BLEU: 53.81). To avoid carrying over inconsistencies in how the MT model handles gender, the standard Polish source passages were translated, not the gender-inclusive ones. Where a human-written English version exists (European legal acts), it is used instead (432 of the train instructions).
The gender-inclusive Polish texts come from open-access sources in diverse genres, manually rewritten by trained linguists:
- European and Polish legal acts (e.g. the Charter of Fundamental Rights of the EU, the Constitution of Poland);
- institutional documents of ICS PAS;
- the National Corpus of Polish (NKJP1M);
- Polish parliamentary transcripts from ParlaMint (2022).
Two annotators rewrote each text independently and a third reviewed both versions. When both versions were accepted, both were included.
Training on this larger, mixed-generated set gives much better results than training on the small human-written translation config (1,728 train instructions), especially for English → Polish (see Results).
Procedure
The model was instruction-tuned with low-rank adaptation (LoRA), using DeepSpeed ZeRO, Flash Attention 2 and the Hugging Face transformers, trl (SFTTrainer), peft and datasets libraries. Cross-entropy loss was computed on both prompt and completion tokens (the trl default).
| Hyperparameter | Value |
|---|---|
| LoRA rank (r) | 128 |
| LoRA alpha (α) | 256 |
| LoRA dropout | 0.05 |
| Epochs | 3 |
| Per-device train batch size | 2 |
| Gradient accumulation steps | 4 |
| Learning rate | 2e-5 |
| LR scheduler | cosine |
| Warmup ratio | 0.05 |
| Weight decay | 1e-3 |
| Max sequence length | 4096 |
| Attention implementation | Flash Attention 2 |
Evaluation
Metrics
The model is evaluated with BLEU and chrF on two test sets:
- the human-written IPIS
translationtest split (456 instances), where both the Polish and the English texts are written by humans; - the mixed-generated IPIS
translation-augmentedtest split (5,278 instances).
BLEU and chrF measure overall translation quality but do not reliably capture gender-inclusive choices, especially in English → Polish. We therefore also compared LLM-as-a-judge scores with human ratings (see Human and LLM-as-a-judge evaluation).
Results
Bielik-11B in its default, few-shot and IPIS-tuned versions, with Polish user prompts and with no system prompt or with the gender-inclusive system prompt in Polish (-pl) or English (-en). hum-tuned models are trained on the human-written translation config, mix-tuned models on the mixed-generated translation-augmented config. NLLB-200-distilled-1.3B is included for comparison. This model is mix-tuned. The best score in each column is in bold.
Human-written test set (translation, test)
| Setting | PL → EN BLEU | PL → EN chrF | EN → PL BLEU | EN → PL chrF |
|---|---|---|---|---|
| default | 47.60 | 73.39 | 41.49 | 71.78 |
| default-pl | 46.78 | 73.08 | 35.80 | 69.77 |
| default-en | 47.99 | 73.76 | 32.70 | 68.65 |
| fewshot | 50.01 | 73.93 | 38.63 | 68.78 |
| fewshot-pl | 49.38 | 73.84 | 37.81 | 69.92 |
| fewshot-en | 48.33 | 73.43 | 43.02 | 72.46 |
| hum-tuned | 55.19 | 75.80 | 34.26 | 55.08 |
| hum-tuned-pl | 56.70 | 76.93 | 31.70 | 58.36 |
| hum-tuned-en | 57.55 | 78.03 | 28.71 | 60.97 |
| mix-tuned | 57.27 | 77.90 | 34.29 | 63.93 |
| mix-tuned-pl | 54.67 | 75.82 | 29.84 | 61.16 |
| mix-tuned-en | 53.76 | 75.08 | 33.26 | 63.86 |
| nllb-default | 45.26 | 65.97 | 32.43 | 63.31 |
Mixed-generated test set (translation-augmented, test)
| Setting | PL → EN BLEU | PL → EN chrF | EN → PL BLEU | EN → PL chrF |
|---|---|---|---|---|
| hum-tuned | 35.58 | 63.78 | 21.23 | 53.93 |
| hum-tuned-pl | 33.02 | 61.54 | 26.08 | 56.64 |
| hum-tuned-en | 34.24 | 63.79 | 25.91 | 57.14 |
| mix-tuned | 60.31 | 77.66 | 46.57 | 70.60 |
| mix-tuned-pl | 55.89 | 75.04 | 42.81 | 68.54 |
| mix-tuned-en | 54.94 | 75.16 | 43.12 | 68.69 |
| nllb-default | 25.90 | 48.77 | 21.68 | 50.71 |
The model outperforms NLLB-200 in both directions on both test sets, and it outperforms the model tuned on the human-written data by a wide margin on the mixed-generated test set. On the human-written test set, BLEU and chrF for English → Polish are still higher for the untuned baselines. These metrics compare against a single reference and penalise valid gender-inclusive reformulations, which is why we also ran a human evaluation (see Paper for details).
Limitations
- Binary gender inclusion. The model produces feminine forms, masculine–feminine dyads and neutral expressions. It does not produce non-binary forms, which are not yet standardised in Polish. The gender-star notation it uses (following Wróblewska et al., 2025) can be extended to non-binary forms in future versions.
- Missed inclusive forms. In English → Polish translation, the model sometimes leaves generic masculine forms unchanged. It may also produce several alternative versions of a passage, only some of which use inclusive forms.
- Translation errors. The model can add content that is not in the source, omit passages, add or drop list items, and produce grammatical errors such as non-agreeing verb forms or malformed gender-star forms. Human review of the output is recommended.
- Synthetic English data. Most English texts in the training data were generated by Gemma-3-27B, not written by humans, so the model may reproduce that model's translation style and errors.
- Metrics. BLEU and chrF do not measure gender inclusivity and penalise valid inclusive or neutral reformulations. The reported scores should be read as indicators of overall translation quality, not of bias mitigation.
- Domain coverage. The training data covers legal, institutional, general-domain and parliamentary texts. Performance on other genres (e.g. social media, highly technical text) has not been evaluated.
Credits
If you use this model, please cite:
@misc{wróblewska2025integratinggenderinclusivitylarge,
title={Integrating gender inclusivity into large language models via instruction tuning},
author={Alina Wróblewska and Bartosz Żuk},
year={2025},
eprint={2508.18466},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2508.18466},
}
Acknowledgments
This model was developed as part of the Universal Discourse: a multilingual model of discourse relations project, funded by the Polish National Science Centre (grant number: 2023/50/A/HS2/00559).
The base model, Bielik-11B-v2.3-Instruct, was developed by SpeakLeash and ACK Cyfronet AGH.
Licence
The model is released under the Apache 2.0 licence, the same as its base model. The IPIS training data is released under CC-BY-SA-4.0.
© Institute of Computer Science PAS
- Downloads last month
- 3
Model tree for ipipan/Bielik-11B-IPIS-Translator
Base model
speakleash/Bielik-11B-v2.3-Instruct