--- library_name: litertlm license: apache-2.0 tags: - heretic - uncensored - decensored - abliterated - ara - litertlm - android - on-device - litert pipeline_tag: any-to-any base_model: - google/gemma-4-E2B-it-qat-q4_0-unquantized license_link: https://ai.google.dev/gemma/docs/gemma_4_license --- # gemma-4-E2B-it-qat-heretic-LiteRT > [!NOTE] > This is a **quantized / format-converted derivative** of an upstream > checkpoint, repackaged into the LiteRT-LM (`.litertlm`) format for > on-device inference. It is **not** a retrained or fine-tuned model — the > weights are the upstream checkpoint's, reformatted for LiteRT-LM. ## Model details - **Format:** LiteRT-LM `.litertlm` (weights + tokenizer + graph in one file) - **Runtime:** [LiteRT-LM](https://github.com/google-ai-edge/litert-lm) (XNNPACK CPU / OpenCL GPU) - **Source checkpoint:** `coder3101/gemma-4-E2B-it-qat-q4_0-unquantized-heretic` - **Base model(s):** - `google/gemma-4-E2B-it-qat-q4_0-unquantized` - **Quantization:** `mixed48` (Google gemma4 mixed 4/8-bit mobile scheme (INT4 weights + INT8 projections)) - **License:** `apache-2.0` + [Gemma Terms of Use](https://ai.google.dev/gemma/docs/gemma_4_license) ## How it was produced Converted with `convert_gemma4.py`, which runs the same three stages described in the [Google ai-edge-quantizer docs](https://github.com/google-ai-edge/ai-edge-quantizer/tree/main): 1. **Export** — HF checkpoint (PyTorch/safetensors) → float TFLite flatbuffer (via `litert-torch` `export_hf`) 2. **Quantize** — float TFLite → quantized TFLite (via `ai-edge-quantizer` recipe `mixed48`) 3. **Package** — quantized TFLite → `.litertlm` bundle (via `litert-torch` `litert_lm_builder`) No weights were modified, retrained, or merged — only reformatted and quantized. ## Usage Load `model.litertlm` with any LiteRT-LM runtime or client. Place it under your app's models folder and the runtime loads it automatically.