Downloads · 30 days
0
singoojiang/humarin-paraphraser-handler
humarin-paraphraser-handler is a text generation model from singoojiang. Use it when you need the model to write or continue text. The card lists the license as mit.
Custom HF Inference Endpoint handler that wraps humarin/chatgptparaphraseronT5base with explicit T5ForConditionalGeneration + diverse beam search, so HF auto-routing cannot mis-load it as a causal LM.
Downloads · 30 days
0
Access
Public
Updated May 18, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py3.6 KB · 56%
From the Hugging Face model README
Custom HF Inference Endpoint handler that wraps
humarin/chatgpt_paraphraser_on_T5_base
with explicit T5ForConditionalGeneration + diverse beam search,
so HF auto-routing cannot mis-load it as a causal LM.
When deployed directly, HF Inference Endpoints routed the base model to vLLM / TGI, which treats T5 as causal generation and produces broken output (echoes the input prompt instead of returning a paraphrase).
This repo only ships handler.py + requirements.txt; the model weights
are loaded at runtime from the base repo.
POST with JSON body:
{
"inputs": "The product is excellent and works well.",
"parameters": {
"num_beams": 5,
"num_beam_groups": 5,
"num_return_sequences": 5,
"diversity_penalty": 3.0,
"repetition_penalty": 10.0,
"no_repeat_ngram_size": 2,
"max_length": 128
}
}
Returns 5 paraphrase candidates as [{"generated_text": ...}, ...].