Text Generation
Transformers
Safetensors
Manipuri
t5
text2text-generation
spelling-correction
grammatical-error-correction
meetei-mayek
manipuri
byt5
text-generation-inference
Instructions to use helloboyn/spellmtei with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use helloboyn/spellmtei with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="helloboyn/spellmtei")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("helloboyn/spellmtei") model = AutoModelForSeq2SeqLM.from_pretrained("helloboyn/spellmtei", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use helloboyn/spellmtei with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "helloboyn/spellmtei" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "helloboyn/spellmtei", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/helloboyn/spellmtei
- SGLang
How to use helloboyn/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 "helloboyn/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": "helloboyn/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 "helloboyn/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": "helloboyn/spellmtei", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use helloboyn/spellmtei with Docker Model Runner:
docker model run hf.co/helloboyn/spellmtei
|
Download README.md from helloboyn/spellmtei: direct link, hf CLI and curl.
- Browser
- Download file 3.58 kB
-
https://huggingface.co/helloboyn/spellmtei/resolve/main/README.md
- Command line
-
hf download hf://helloboyn/spellmtei/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/helloboyn/spellmtei/resolve/main/README.md
3.58 kB
| language: | |
| - mni | |
| license: other | |
| base_model: google/byt5-small | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - spelling-correction | |
| - grammatical-error-correction | |
| - meetei-mayek | |
| - manipuri | |
| - byt5 | |
| # SpellMtei: ByT5 spelling corrector for Manipuri (Meetei Mayek) | |
| A spelling corrector for **Manipuri (Meetei) written in Meetei Mayek script**. It is | |
| [`google/byt5-small`](https://huggingface.co/google/byt5-small) (~300M parameters) | |
| fine-tuned to rewrite a misspelled sentence into its corrected form. ByT5 works on raw | |
| UTF-8 bytes, so it needs no vocabulary for the script. | |
| ## Usage | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForSeq2SeqLM | |
| repo = "helloboyn/spellmtei" | |
| tok = AutoTokenizer.from_pretrained(repo) | |
| model = AutoModelForSeq2SeqLM.from_pretrained(repo).eval() | |
| text = "ꯑꯩꯈꯣꯏꯒꯤ ꯅꯥꯛꯇꯥ ꯍꯧꯖꯤꯛ ꯂꯔꯦ" # one sentence per input | |
| enc = tok(text, return_tensors="pt", truncation=True, max_length=1024) | |
| out = model.generate(**enc, max_length=1024, num_beams=4) | |
| print(tok.decode(out[0], skip_special_tokens=True)) | |
| ``` | |
| Pass `max_length` (or `max_new_tokens`) explicitly: the saved generation config keeps | |
| the library default of 20, which would cut output short. Byte length is about 3× the | |
| character count for Meetei Mayek, so 1024 covers sentences of roughly 340 characters. | |
| ## Training | |
| - **Supervision is synthetic:** correct sentences are corrupted by an error model built | |
| from the script and Meetei phonology, and the model learns to restore the original. | |
| Error types: final-letter (*lonsum*) ⇄ consonant + *apun*, vowel-sign (*cheitap*) | |
| confusion, dropping, insertion and reordering, stop-series and *s ∼ h* confusions, | |
| tone mark, character delete / transpose / duplicate, and split or merged words. | |
| - **Recipe:** a mixture of corruption rates (0.01, 0.02, 0.05, 0.10, 0.18 per character), | |
| with 20% of sentences left uncorrupted so the model learns to keep clean text. | |
| 6 epochs (best checkpoint at step 23,000, ~5.0 epochs), batch 8 × grad-accum 4, | |
| learning rate 3e-4, max length 1024 bytes. | |
| ## Evaluation | |
| Held-out test set with synthetic errors (CER = character error rate). | |
| P / R / F0.5 are span-aligned, edit-based and corpus-level. FP-clean is the share of | |
| already-correct sentences the system changes. | |
| | System | P | R | F0.5 | chrF | CER % ↓ | FP-clean % ↓ | | |
| |---|---|---|---|---|---|---| | |
| | Uncorrected input | – | – | – | 85.0 | 6.26 | 0.0 | | |
| | **This model (ByT5-small)** | **35.4** | **41.3** | **36.5** | **91.4** | **2.86** | **60.0** | | |
| | Character edit tagger (from scratch) | 24.7 | 33.8 | 26.1 | 87.8 | 3.78 | 86.1 | | |
| | Noisy-channel char n-gram (tuned) | 6.4 | 9.7 | 6.9 | 76.9 | 8.83 | 97.4 | | |
| ## Limitations | |
| - **Synthetic errors only.** The test errors come from the same error model as the | |
| training errors. Accuracy on real typing errors has not been measured yet. | |
| - **Over-correction.** The model changes 60% of sentences that were already correct. | |
| Review its output rather than applying it blindly. | |
| - **Meetei Mayek only.** It does not handle Manipuri in Bengali or Latin script. | |
| ## Citation | |
| If you use this model, please cite: | |
| ```bibtex | |
| @inproceedings{singh-etal-2026-spellmtei, | |
| title = "{S}pell{M}tei: Towards Automated Spelling Correction in {M}anipuri {M}eetei {M}ayek Using Neural Models", | |
| author = "Singh, Kshetrimayum Boynao and Mutum, Lenin and Ekbal, Asif and Pakray, Partha", | |
| booktitle = "Proceedings of the International Conference on Natural Language Processing (ICON)", | |
| year = "2026", | |
| } | |
| ``` | |