Downloads · 30 days
11
7% of all-time downloads
FBK-MT/Qwen3-8B-GNR-it-full
Qwen3-8B-GNR-it-full is a text generation model from FBK-MT. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Qwen3-8B-GNR-it-full is a fine-tuned version of Qwen3-8B for the task of gender-neutral rewriting (GNR) in Italian.
Downloads · 30 days
11
7% of all-time downloads
All-time downloads
152
Public
Parameters
8.2B
32.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors32.8 GB · 100%
From the Hugging Face model README
Qwen3-8B-GNR-it-full is a fine-tuned version of Qwen3-8B for the task of gender-neutral rewriting (GNR) in Italian.
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.
This model is supported in Hugging Face 🤗 Transformers and vLLM.
To run the model, first install the Transformers library.
pip install transformers>=4.51.0
Then run standard inference:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "FBK-MT/Qwen3-8B-GNR-it-full"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
# prepare the model input
system_message = "Rewrite the following Italian sentence using a gender-neutral language in reference to human beings, avoiding masculine or feminine forms."
input_sentence = "Sono convinto che dobbiamo tutelare tutti i cittadini, a partire dai più poveri."
messages = [
{"role": "system", "content": system_message},
{"role": "user", "content": input_sentence}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=200
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
result = tokenizer.decode(output_ids[0][model_inputs["input_ids"].shape[-1]:])
print(result)
# "Dobbiamo proteggere le fasce più deboli della popolazione, partendo da coloro che sono più vulnerabili."
To perform batched inference we recommend using vLLM.
First, install the library following the official guide.
Then, prepare a list of inputs and let vLLM handle batching:
import torch
from vllm import LLM
model = LLM(
model='FBK-MT/Qwen3-8B-GNR-it-clean',
enable_prefix_caching=True,
disable_sliding_window=True,
tensor_parallel_size=torch.cuda.device_count(),
gpu_memory_utilization=0.9,
trust_remote_code=True)
system_message = "Rewrite the following Italian sentence using a gender-neutral language in reference to human beings, avoiding masculine or feminine forms."
input_sentences = [
"Il candidato che è stato scelto per la posizione ha dimostrato di avere un'ottima preparazione e di essere adeguadatmente preparato.",
"Verrà istituito un sistema di informazione per i consumatori che acquistano prodotti elettronici.",
"Lo studente deve consegnare il compito entro venerdì."
]
tokenizer = model.get_tokenizer()
input_data = [
tokenizer.apply_chat_template(
[
{"role": "system", "content": system_message},
{"role": "user", "content": text},
],
add_generation_prompt=True,
tokenize=False,
enable_thinking=False
)
for text in input_sentences
]
responses = model.generate(input_data, use_tqdm=True)
results = [response.outputs[0].text for response in responses]
print(results)
# ["La persona che è stata scelta per la posizione ha dimostrato di avere un'ottima preparazione e di essere adeguatamente preparata.",
# "Verrà istituito un sistema di informazione per i soggetti che acquistano prodotti elettronici.",
# "In quanto partecipante alla lezione, è necessario che tu consegni il compito entro venerdì."]
We release this model under the Apache 2.0 license.
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},
}
Thanks to @apiergentili for adding this model.