Downloads · 30 days
0
brine7302/gemma-4-E2B-abliterated-litert-lm
gemma-4-E2B-abliterated-litert-lm is a text generation model from brine7302. Use it when you need the model to write or continue text. It is set up for litert. The card lists the license as gemma.
An abliterated (uncensored) version of Google's Gemma 4 E2B Instruct, converted to LiteRT format (.litertlm) for on-device inference.
Downloads · 30 days
0
Access
Public
Updated May 22, 2026
Repo size
23.3 GB
Likes
4
Public
Click a slice to open those files.
.litertlm6.4 GB · 100%
From the Hugging Face model README
An abliterated (uncensored) version of Google's Gemma 4 E2B Instruct, converted to LiteRT format (.litertlm) for on-device inference.
Inherits all capabilities of the base Gemma 4 E2B model:
Refusal behaviours have been removed via abliteration (see below). The model will respond to requests that the base model would decline.
| File | Size | Description |
|---|---|---|
model.litertlm | 4.9 GB | Full LiteRT package (text + vision + embedder + tokenizer) |
The package contains INT8 weight-quantized TFLite subgraphs (4x compression from original BF16 weights):
| Component | Quantized size |
|---|---|
| Text model (prefill/decode) | 2.14 GB |
| Per-layer embedder | 2.19 GB |
| Embedder | 387 MB |
| Vision encoder | 163 MB |
| Vision adapter | 1.2 MB |
Built with --cache-length 1024 and --prefill-lengths 256.
pip install litert-cli-nightly[lm]
litert lm run model.litertlm
Drop model.litertlm into your app and load it with the LiteRT-LM LlmInference API:
// Android (Kotlin)
val options = LlmInference.LlmInferenceOptions.builder()
.setModelPath("/path/to/model.litertlm")
.setMaxTokens(1024)
.build()
val inference = LlmInference.createFromOptions(context, options)
val result = inference.generateResponse("Hello!")
See the LiteRT-LM documentation for full SDK usage.
The refusal direction was identified and removed from the model weights using the FailSpy abliterator methodology:
o_proj and down_proj weight matrices in layers 11–22 (the middle third of the model's 35 layers) using:W_new = W - outer(r, r @ W)
where r is the unit refusal direction. This removes the model's ability to activate refusal behaviour without degrading general capability.
The abliterated HuggingFace checkpoint was converted using litert-cli-nightly:
litert convert ./gemma-4-e2b-abliterated \
--output ./gemma-4-e2b-abliterated-litert \
--quantize weight_only_wi8_afp32 \
--cache-length 1024
This uses litert-torch-nightly under the hood, which applies the Gemma4-specific export pipeline (image_text_to_text task, vision encoder export, externalized embedder).
--cache-length 1024. Context beyond ~1024 tokens may degrade or not be supported depending on the runtime.google/gemma-4-e2b-it — subject to the Gemma Terms of Use. Usage of this model is also subject to those terms.