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, 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
CI_MA_Reframe - Microaggression Reframing Model
This model reframes potentially problematic text into more inclusive language using a fine-tuned T5 architecture.
Model Description
- Model type: T5 for text-to-text generation
- Task: Text reframing/paraphrasing
- Base model: t5-base
Usage
Important: Always prefix your input with "rephrase: " for proper generation.
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("jokugeorgin/CI_MA_Reframe")
model = T5ForConditionalGeneration.from_pretrained("jokugeorgin/CI_MA_Reframe")
text = "rephrase: You speak good English for someone from there."
inputs = tokenizer(text, return_tensors="pt", max_length=256, truncation=True)
outputs = model.generate(
**inputs,
max_length=256,
num_beams=5,
num_return_sequences=3,
temperature=0.8,
do_sample=True,
no_repeat_ngram_size=2
)
for output in outputs:
print(tokenizer.decode(output, skip_special_tokens=True))
API Usage
curl /static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Fjokugeorgin%2FCI_MA_Reframe \
-H "Authorization: Bearer YOUR_HF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inputs": "rephrase: You speak good English for someone from there.",
"parameters": {
"max_new_tokens": 96,
"num_return_sequences": 3,
"temperature": 0.8
}
}'
Training Data
Custom dataset of microaggression examples and their reframed alternatives.
Limitations
- Requires "rephrase: " prefix for optimal results
- Works best with English text
- May occasionally produce generic reframings
- Downloads last month
- 35
Model tree for jokugeorgin/CI_MA_Reframe
Base model
google-t5/t5-base