PremoveITN.
Load the model
from_pretrained() downloads the pinned public model on first use and uses the
Hugging Face cache on later loads. Create one instance and reuse it. Model
initialization is expensive.
Parameters
model_idaccepts the public model ID or a local inference-artifact directory.revisionaccepts the pinned commit or the verifiedv0.1.0release tag.deviceacceptsauto,cpu,mps, orcuda.
device="auto" selects CUDA when available, then Apple MPS, then CPU. CUDA is
an API option, but it is not a validated v0.1.0 platform claim.
Normalize a transcript
normalize() accepts one string and returns one string. It raises TypeError
for a non-string input. Empty and whitespace-only strings are returned
unchanged. If the text produces candidates, inputs longer than 512 DeBERTa
encoder tokens are rejected instead of being truncated. Text with no
candidates returns unchanged before tokenization.