--- license: apache-2.0 language: - en library_name: litert pipeline_tag: text-generation tags: - coedit - flan-t5 - litert - tflite - int8 - grammar-correction - text-rewriting base_model: jbochi/coedit-base --- # CoEdIT Base LiteRT INT8 Split encoder/decoder LiteRT (`.tflite`) conversion of [`jbochi/coedit-base`](https://huggingface.co/jbochi/coedit-base), intended for fully local text editing in browsers, extensions, and native LiteRT clients. This is an independently produced conversion, not an official release from the upstream model author or Grammarly. ## Model details | Property | Value | | --- | --- | | Source checkpoint | `jbochi/coedit-base` | | Architecture | FLAN-T5 Base fine-tuned on CoEdIT | | Format | Split LiteRT/TFLite encoder and decoder | | Quantization | INT8 dynamic range | | Maximum sequence length | 256 tokens | | Maximum configured output | 64 tokens | | Encoder size | 109,978,728 bytes | | Decoder size | 166,428,952 bytes | | Graph total | 276,407,680 bytes | The encoder state is computed once and reused during autoregressive decoder steps. Tensor names, task prefixes, sizes, and SHA-256 checksums are recorded in `manifest.json`. ## Files - `encoder.tflite`: quantized encoder graph - `decoder.tflite`: quantized autoregressive decoder graph - `tokenizer.json`: tokenizer vocabulary and model - `tokenizer_config.json` and `special_tokens_map.json`: tokenizer metadata - `manifest.json`: runtime contract and integrity metadata ## Instruction prefixes ```text Fix grammatical errors in this sentence: Make the sentence formal: Change the style to casual: Make the sentence simpler: Paraphrase the sentence: ``` ## Runtime integration Load the two graphs with LiteRT, tokenize to the fixed 256-token input shape, run the encoder once, and feed its hidden states plus the decoder token buffer to the decoder for each generated token. Consult `manifest.json` for the exact tensor contract and EOS/padding IDs. ## Limitations - Browser CPU/WASM autoregressive decoding can be slow, particularly for long rewrites. WebGPU or a native LiteRT runtime is recommended when available. - Dynamic-range quantization can change outputs relative to the source model. - Output should be reviewed before use; the model may omit, add, or alter meaning. - The graphs use fixed-size tensors and are not a Transformers checkpoint. ## License and attribution The source model is published under Apache License 2.0. This converted form is distributed under the same license; see `LICENSE` and `NOTICE`. - Source: https://huggingface.co/jbochi/coedit-base - Upstream base: https://huggingface.co/google/flan-t5-base - CoEdIT paper: https://arxiv.org/abs/2305.09857