Bielik-11B-IPIS-Proofreader
A model for gender-inclusive Polish text editing
2 min read
This model rewrites standard Polish texts into an inclusive version: replacing masculine gender forms with feminine forms, paired forms, or neutral expressions, and correcting agreement of related words. The solution is built on speakleash/Bielik-11B-v2.3-Instruct via instruction fine-tuning using the IPIS dataset. The model is suitable for researchers, linguists, and editors working with Polish official, legal, and journalistic texts.
Key features
- Base model: Built on the 11.17-billion parameter language model Bielik-11B-v2.3-Instruct.
- Dataset: Trained on the
proofreadingconfiguration from the Inclusive Polish Instruction Set (IPIS), including texts from laws, transcripts, and the national corpus. - Training: Utilized LoRA (low-rank adaptation) methodology with optimization via DeepSpeed ZeRO and Flash Attention 2.
- Results: Leads among models fine-tuned on IPIS, showing the best performance on the F1 metric (59.85).
What you can do
- Document editing: Automatically translate texts of official documents and laws into inclusive language.
- Content processing: Adapt news articles and speech transcripts to meet gender equality standards.
- Pipeline integration: Embed the model into text editors or bots for automated Polish text checking.
- Linguistic research: Study the application of language models for automated grammatical gender transformation.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "ipipan/Bielik-11B-IPIS-Proofreader"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
prompt = "Przeredaguj tekst na język równościowy: "
text = "Tegoroczni laureaci Oscarów pozowali na czerwonym dywanie."
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))
Read more
DetailsModel metrics (F1): 59.85 on the IPIS test split.
Main LoRA parameters: r=128, alpha=256, dropout=0.05.
Limitations: Supports only binary-inclusive styles (feminine forms, paired forms, neutral expressions) and works exclusively with the Polish language.
License: Apache 2.0.










Comments