CoolFace
Modelpublic

LiquidAI/LFM2.5-Encoder-350M-Spellchecker

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
15likes910downloads
Model Card

<div align="center"> <img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png" alt="Liquid AI" style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;" /> <div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;"> <a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> • <a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> • <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> • <a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a> </div> </div>

LFM2.5-Encoder-350-Spellchecker

A full fine-tune of LFM2.5-Encoder-350M with a subword-level GECToR-style grammatical-error-correction tagger. It covers grammar, spelling, punctuation, and casing in English.

Find more details about our encoders in our blog post.

[!NOTE] 💻 Demos: Try this fine-tuned model running in a CPU-only Hugging Face space: [Spell checking](https://huggingface.co/spaces/LiquidAI/spellchecker) — correct misspellings token by token.

Usage

⚠️ Loads custom code via trust_remote_code=True (the model wraps a trust_remote_code encoder).

Install the required packages:

bash
pip install torch transformers

Run spell checking:

python
from transformers import AutoModel

model_id = "LiquidAI/LFM2.5-Encoder-350-Spellchecker"

model = AutoModel.from_pretrained(
    model_id,
    trust_remote_code=True,
).float().eval()

print(model.correct(["She go to school every day ."]))
# ['She goes to school every day .']

correct() accepts a string or a list; tune precision with min_error_prob (higher → fewer edits) and max_iter (refinement passes). Input should be whitespace-tokenized (punctuation separated by spaces), matching the training data.

Evaluation

Fixed inference setting: max_iter=4, precision knobs off. Headline ERRANT F0.5:

MASTER composite (selection metric): 64.24

BenchmarkPrecisionRecallF0.5
LOCNESS native (ERRANT)53.7734.5348.38
BEA-dev (ERRANT)56.4828.9647.46
CoNLL-14 (ERRANT)67.5418.9144.59
FCE-test (ERRANT)57.3132.6349.78
Robustness (ERRANT)91.9687.9891.14
Multilingual dev (F0.5)

Examples

InputCorrection
She go to school every day .She goes to school every day .
I has went to the stor yesterday .I went to the store yesterday .
Their are many reason to study hard .There are many reasons to study hard .
He don&#x27;t like coffee but he like tea .He does n&#x27;t like coffee , but he likes tea .

📬 Contact

Citation

bibtex
@article{liquidAI2026Encoders,
  author = {Liquid AI},
  title = {LFM2.5-Encoders: Fast at Long Context, Even on CPU},
  journal = {Liquid AI Blog},
  year = {2026},
  note = {www.liquid.ai/blog/lfm2-5-encoders},
}