YAML Metadata
Warning:
The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Gender Rewriter (FLAN-T5 Base)
This model is a fine-tuned version of google/flan-t5-base specialized in gender rewriting.
It can translate a sentence from a Male context to a Female context (and vice versa) while preserving the original meaning and structure.
- Repository: IsGarrido/flan-t5-gender-rewriter
- Experiment: gender_translator_v1
- Architecture: Encoder-Decoder (Seq2Seq)
Usage
You MUST use the specific prefixes trained into the model:
rewrite male to female: [sentence]rewrite female to male: [sentence]
Python Example
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("IsGarrido/flan-t5-gender-rewriter")
model = AutoModelForSeq2SeqLM.from_pretrained("IsGarrido/flan-t5-gender-rewriter")
input_text = "rewrite male to female: He is a bachelor living in the city."
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: "She is a bachelorette living in the city."
Bias & Limitations
This model was trained on synthetic data filtered by a BERT classifier. While it attempts to handle reflexives (himself/herself) and some professional titles, it may still struggle with:
- Rare gendered nouns (e.g., Duke/Duchess).
- Complex ambiguous pronouns in long paragraphs.
- Downloads last month
- 4