Qwen3-14B-GNR-it-full

Qwen3-14B-GNR-it-full is a fine-tuned version of Qwen3-14B for the task of gender-neutral rewriting (GNR) in Italian.

Table of Contents

  1. Overview
  2. Usage
  3. License
  4. Citation
  5. Contributions

Overview

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 pre-print.

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:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "FBK-MT/Qwen3-14B-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 = "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 tutelare tutte le persone, a partire dalle più deboli."

Batch inference

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-14B-GNR-it-full',
    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.",
# "La scadenza per la consegna del compito assegnato è prevista per 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}, 
}

Contributions

Thanks to @apiergentili for adding this model.

Downloads last month
2
Safetensors
Model size
15B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for FBK-MT/Qwen3-14B-GNR-it-full

Finetuned
Qwen/Qwen3-14B
Finetuned
(131)
this model

Dataset used to train FBK-MT/Qwen3-14B-GNR-it-full

Collection including FBK-MT/Qwen3-14B-GNR-it-full