schmidt-sebastian's picture
Initial upload of MediaPipe-TextProofreader-200M from MediaPipe Solutions
7f5d112
|
Raw History Blame Contribute Delete
6.69 kB
metadata
license: gemma
library_name: litert-lm
pipeline_tag: text-generation
tags:
  - mediapipe
  - litert-lm
  - text-generation
  - on-device
  - python
  - android
  - ios
  - flutter
  - nlp
  - gemma
  - grammar-correction
  - proofreading
  - int4
  - int8

MediaPipe Text Proofreader (200M)

Compact 200M-parameter Gemma model quantized with mixed precision (int4 + int8) (proofread_quant_200m.litertlm, 117.6 MB) for identifying and correcting spelling, grammatical, and stylistic errors on-device via the MediaPipe Text Proofreader (TextProofreader) task and LiteRT-LM.

Documentation: MediaPipe Text Proofreader Docs

Samples: Android · iOS · Python Colab · Flutter

Try live: Browser Web Demo is not yet available for TextProofreader (use the samples above; see MediaPipe Web Demos).

Designed for Android, iOS, Flutter (Android & iOS), and desktop Python (mediapipe + LiteRT-LM runtime). Default context capacity is 8,192 tokens (max_num_tokens=4096 in the quickstart caps context length), with peak on-device RAM usage around 200 MB–350 MB depending on input length (100 to 2,000 words).

Files

File Precision Size SHA-256
proofread_quant_200m.litertlm — 117.59 MB (117,587,968 B) 2caa317d5a6f951af6e437edce3bb3a9fdedc85a7a8c2a8fcaec96318d7708cc

Download

pip install -U huggingface_hub
hf download litert-community/MediaPipe-TextProofreader-200M proofread_quant_200m.litertlm --local-dir .

Inputs, Outputs, and Model Specifications

proofread_quant_200m.litertlm

Self-contained .litertlm package bundling the quantized LiteRT prefill/decode subgraphs, SentencePiece tokenizer, and prompt template metadata in a single memory-mapped file.

Use with MediaPipe Tasks

Python Quickstart

pip install -U mediapipe huggingface_hub
import mediapipe as mp
from huggingface_hub import hf_hub_download

model_path = hf_hub_download(repo_id="litert-community/MediaPipe-TextProofreader-200M", filename="proofread_quant_200m.litertlm")

BaseOptions = mp.tasks.BaseOptions
TextProofreader = mp.tasks.text.TextProofreader
TextProofreaderOptions = mp.tasks.text.TextProofreaderOptions

options = TextProofreaderOptions(
    base_options=BaseOptions(model_asset_path=model_path),
    max_num_tokens=4096,
)
with TextProofreader.create_from_options(options) as proofreader:
    result = proofreader.proofread("Their are severel typos in this sentance.")
    print(result.proofread_text)

Cross-Platform Guides & Samples

Latency Benchmarks

End-to-end Pixel 10 Pro CPU benchmarks reported by the Text Proofreader documentation (peak RAM ≈200 MB–350 MB):

Device Input Words (tokens) Prefill (tokens/s) Decode (tokens/s) E2E Latency (ms)
Pixel 10 Pro CPU 100 (≈200 tokens) 1,280 170 980
Pixel 10 Pro CPU 500 (≈900 tokens) 1,095 163 4,900
Pixel 10 Pro CPU 1000 (≈1900 tokens) 1,025 150 16,000
Pixel 10 Pro CPU 2000 (≈3600 tokens) 980 140 28,000

Intended Use, Limitations, and Fairness

  • Intended applications: On-device grammar, spelling, and style proofreading while preserving the user's original meaning and tone without sending private text to the cloud.
  • Terms & limitations: Subject to the Gemma Terms of Use. Supported on Android, iOS, Flutter (Android/iOS), and desktop Python (LiteRT-LM backend; not available on Web or Flutter web). Always review model-generated edits before irreversible actions.

Provenance

Every model binary in this repository is byte-identical (unmodified LiteRT-LM package bytes) to the official artifact served by Google from storage.googleapis.com/mediapipe-models.

Repo File Upstream URL GCS Generation Upstream Last-Modified Pinned Bucket Version
proofread_quant_200m.litertlm proofread_quant_200m.litertlm 1786566706550958 Wed, 12 Aug 2026 20:31:46 GMT /1/

License and Citation

  • License: gemma — Subject to the Gemma Terms of Use, as specified on the MediaPipe task documentation page.

Citation

Gemma family model packaged for MediaPipe Text Proofreader (LiteRT-LM).