This model is part of a family release of four models (8B/14B × clean/full) trained on GNR-it, a dataset of parallel Italian gendered and gender-neutral sentences.
The clean variants are trained on a BERTScore-filtered subset of the data, whereas the full ones use the complete dataset.
Here is the complete family of models:
We are releasing these models to support reproducibility of the experiments reported in the paper Gender-Neutral Rewriting in Italian: Models, Approaches,
and Trade-offs and provide the community with open baselines for GNR in Italian.
The models are not intended as prescriptive tools for language use, but rather as research artifacts to study fairness in natural language generation.
For more information about these models, please check the paper preprint.
Usage
This model is supported in Hugging Face 🤗 Transformers and vLLM.
Simple inference
To run the model, first install the Transformers library.
pip install transformers>=4.51.0
Then run standard inference:
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
23model_name ="FBK-MT/Qwen3-8B-GNR-it-full"45# load the tokenizer and the model6tokenizer = AutoTokenizer.from_pretrained(model_name)7model = AutoModelForCausalLM.from_pretrained(8 model_name,9 torch_dtype="auto",10 device_map="auto"11)1213# prepare the model input14system_message ="Rewrite the following Italian sentence using a gender-neutral language in reference to human beings, avoiding masculine or feminine forms."15input_sentence ="Sono convinto che dobbiamo tutelare tutti i cittadini, a partire dai più poveri."16messages =[17{"role":"system","content": system_message},18{"role":"user","content": input_sentence}19]20text = tokenizer.apply_chat_template(21 messages,22 tokenize=False,23 add_generation_prompt=True,24 enable_thinking=False25)26model_inputs = tokenizer([text], return_tensors="pt").to(model.device)2728generated_ids = model.generate(29**model_inputs,30 max_new_tokens=20031)32output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()3334result = tokenizer.decode(output_ids[0][model_inputs["input_ids"].shape[-1]:])35print(result)36# "Dobbiamo proteggere le fasce più deboli della popolazione, partendo da coloro che sono più vulnerabili."
Batch inference
To perform batched inference we recommend using vLLM.
Then, prepare a list of inputs and let vLLM handle batching:
python
1import torch
2from vllm import LLM
34model = LLM(5 model='FBK-MT/Qwen3-8B-GNR-it-clean',6 enable_prefix_caching=True,7 disable_sliding_window=True,8 tensor_parallel_size=torch.cuda.device_count(),9 gpu_memory_utilization=0.9,10 trust_remote_code=True)1112system_message ="Rewrite the following Italian sentence using a gender-neutral language in reference to human beings, avoiding masculine or feminine forms."13input_sentences =[14"Il candidato che è stato scelto per la posizione ha dimostrato di avere un'ottima preparazione e di essere adeguadatmente preparato.",15"Verrà istituito un sistema di informazione per i consumatori che acquistano prodotti elettronici.",16"Lo studente deve consegnare il compito entro venerdì."17]1819tokenizer = model.get_tokenizer()2021input_data =[22 tokenizer.apply_chat_template(23[24{"role":"system","content": system_message},25{"role":"user","content": text},26],27 add_generation_prompt=True,28 tokenize=False,29 enable_thinking=False30)31for text in input_sentences
32]3334responses = model.generate(input_data, use_tqdm=True)35results =[response.outputs[0].text for response in responses]36print(results)37# ["La persona che è stata scelta per la posizione ha dimostrato di avere un'ottima preparazione e di essere adeguatamente preparata.",38# "Verrà istituito un sistema di informazione per i soggetti che acquistano prodotti elettronici.",39# "In quanto partecipante alla lezione, è necessario che tu consegni il compito entro venerdì."]
License
We release this model under the Apache 2.0 license.
Citation
If you this model in your work, please cite:
@misc{piergentili2025genderneutralrewritingitalianmodels,
title={Gender-Neutral Rewriting in Italian: Models, Approaches, and Trade-offs},
author={Andrea Piergentili and Beatrice Savoldi and Matteo Negri and Luisa Bentivogli},
year={2025},
eprint={2509.13480},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2509.13480},
}