| # OptGuide Target 62: Proofreader API | |
| ## What It Is | |
| Target 62 (`OPTIMIZATION_TARGET_MODEL_EXECUTION_FEATURE_PROOFREADER_API`) is the configuration and fine-tuning weights for Chrome's on-device **Proofreader API**, powered by Gemini Nano. | |
| Unlike most config-only targets, this one ships **16.6 MB of LoRA adaptation weights** that specialize the base model for grammar correction. | |
| ## Files | |
| | File | Size | Role | | |
| |------|------|------| | |
| | `model-info.pb` | 198 B | Metadata: base model = `v3Nano`, version `2025.06.30.1229` | | |
| | `on_device_model_execution_config.pb` | 1.6 KB | System prompts for proofreading and error classification | | |
| | `adaptation_weights.bin` | 16.6 MB | LoRA weights to fine-tune Gemini Nano for proofreading | | |
| | `model.tflite` | 0 B | Empty placeholder (uses shared base model) | | |
| ## What It Does | |
| Two tasks: | |
| ### 1. Proofreading (correct text) | |
| System prompt: *"You are a skilled proofreader that can identify and correct grammatical errors in a given text in the GIVEN_TEXT section. Your task is to proofread the GIVEN_TEXT and output the PROOFREAD_TEXT. Output ONLY the PROOFREAD_TEXT and nothing else."* | |
| ### 2. Error Classification (label corrections) | |
| System prompt: *"You are a skilled proofreading teacher that correctly labels the correction made to the ORIGINAL_TEXT for proofreading."* | |
| Labels a correction as one of: **Spelling, Punctuation, Capitalization, Preposition, Missing words, Grammar** | |
| Output format: `{"label": "<label>"}` | |
| ## How It Works | |
| 1. A web page or Chrome feature calls the Proofreader API | |
| 2. Chrome loads this config and the LoRA adaptation weights | |
| 3. The LoRA weights are applied on top of the shared Gemini Nano v3 base model (~4 GB from `OptGuideOnDeviceModel`), specializing it for proofreading | |
| 4. For proofreading: user text goes into `GIVEN_TEXT`, model outputs corrected text | |
| 5. For classification: `ORIGINAL_TEXT`, `PROOFREAD_TEXT`, and `CORRECTION` are provided, model outputs a JSON label | |
| 6. Everything runs on-device, no data sent to servers | |
| ## Key Details | |
| - **LoRA fine-tuning**: The 16.6 MB `adaptation_weights.bin` file contains Low-Rank Adaptation matrices that modify the base model's behavior without replacing it entirely | |
| - **Structured output**: The classification task outputs strict JSON (`{"label": "Grammar"}`) | |
| - **6 error categories**: Spelling, Punctuation, Capitalization, Preposition, Missing words, Grammar | |