Instructions to use nyobemedoc/spellmtei with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nyobemedoc/spellmtei with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nyobemedoc/spellmtei")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("nyobemedoc/spellmtei") model = AutoModelForSeq2SeqLM.from_pretrained("nyobemedoc/spellmtei", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nyobemedoc/spellmtei with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nyobemedoc/spellmtei" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyobemedoc/spellmtei", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nyobemedoc/spellmtei
- SGLang
How to use nyobemedoc/spellmtei with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nyobemedoc/spellmtei" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyobemedoc/spellmtei", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nyobemedoc/spellmtei" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyobemedoc/spellmtei", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nyobemedoc/spellmtei with Docker Model Runner:
docker model run hf.co/nyobemedoc/spellmtei
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
SpellMtei — M1 (ByT5)
The best corrector from SpellMtei, a spelling corrector for Manipuri (Meetei)
in the Meetei Mayek script. google/byt5-small fine-tuned as a denoiser on
synthetic supervision: clean Meetei Mayek text is corrupted by an error model
grounded in the script's structure and in Meetei phonology, and the model learns
to reconstruct it.
Tokenizer-free (byte-level), so no vocabulary work for the script.
Anonymised for peer review. De-anonymised on acceptance.
Results — frozen synthetic test set (1,012 sentences, input CER 6.26%)
| P | R | F0.5 | chrF | chrF++ | CER% | TER | FP-clean% | |
|---|---|---|---|---|---|---|---|---|
| Uncorrected input | – | – | – | 85.0 | 80.7 | 6.26 | 28.5 | 0.0 |
| M1 ByT5 (this model) | 35.4 | 41.3 | 36.5 | 91.4 | 88.4 | 2.86 | 16.4 | 60.0 |
Removes 54% of the character error and lifts chrF by 6.4 points. Like the other SpellMtei models it over-corrects already-correct input (it rewrites 60% of clean sentences) — raising the clean-sentence rate in training is the clearest next step.
Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tok = AutoTokenizer.from_pretrained("nyobemedoc/spellmtei")
model = AutoModelForSeq2SeqLM.from_pretrained("nyobemedoc/spellmtei")
text = "ꯑꯩꯈꯣꯏꯒꯤ ꯅꯥꯛꯇꯥ ꯍꯧꯖꯤꯛ ꯂꯔꯦ" # dropped vowel sign
ids = tok(text, return_tensors="pt").input_ids
out = model.generate(ids, num_beams=4, max_length=1024)
print(tok.decode(out[0], skip_special_tokens=True)) # ... ꯍꯧꯖꯤꯛ ꯂꯩꯔꯦ
Feed one sentence at a time; NFC-normalise and collapse whitespace first.
Training
google/byt5-small (~300M params), 6 epochs, one RTX 6000 Ada, bf16, Adafactor,
cosine schedule, max_len 1024, beam 4 at inference. Noise is resampled every
epoch; 20% of training pairs are left uncorrupted.
Related artifacts
Error profile, frozen evaluation sets, pipeline code, and the other two
correctors (a from-scratch character edit tagger and a statistical noisy
channel): nyobemedoc/spellmtei (dataset).
License
To be finalised with the camera-ready release.
- Downloads last month
- 90
Model tree for nyobemedoc/spellmtei
Base model
google/byt5-small