This repository contains a ready-to-run .litertlm bundle converted from the
original Hugging Face BF16 Safetensors checkpoint for use with
Google LiteRT-LM.
This repository is not a new fine-tune and does not claim authorship of the
original model weights. It is a runtime-format conversion of the Huihui model.
❌ Audio encoder is not present in the resulting bundle
Tool calling metadata
✅
Thinking channel metadata
✅
Target
CPU / GPU edge inference
About the source model
The source model was published by
huihui-ai as an abliterated variant of
google/gemma-4-E4B-it.
According to the original model card, abliteration significantly reduces the
model's refusal behavior and safety filtering. This conversion does not
restore or add safety alignment.
1litert-lm run \2 ./Huihui-gemma-4-E4B-it-qat-q4_0-unquantized-abliterated.litertlm \3 --prompt="Hello! Tell me briefly who you are."
For an interactive run:
litert-lm run ./Huihui-gemma-4-E4B-it-qat-q4_0-unquantized-abliterated.litertlm
Available backends and CLI options can change as LiteRT-LM evolves, so check the
installed version before using backend-specific flags:
litert-lm run --help
Benchmarks
The benchmark figures from the earlier non-QAT LiteRT-LM conversion are not
reused here because this artifact is produced from a different upstream
checkpoint and uses the dynamic_wi4_afp32 LiteRT export recipe.
This bundle should be benchmarked independently. For example:
The intended reference workload is 256 prefill tokens, 256 decode tokens and a
4096-token maximum context.
QAT and LiteRT quantization
The direct source checkpoint is the Huihui QAT/Q4_0 unquantized model. QAT is
part of the upstream model lineage; the LiteRT conversion then applies its own
runtime-oriented dynamic_wi4_afp32 recipe.
These are separate stages and should not be interpreted as the same
quantization format.
Several components are nightly builds, so conversion behavior and compatibility
may change between releases.
Platforms
LiteRT-LM is designed for on-device inference across supported desktop and edge
platforms. Consult the upstream project for the current platform/backend support
matrix:
Inspection of the generated bundle confirms the presence of the text inference
components plus the Gemma 4 vision encoder and vision adapter.
Audio status
The export was requested with --export_audio_encoder=true, but inspection of
the resulting .litertlm bundle does not show a separate audio encoder.
Therefore this release should currently be treated as a text + vision
bundle; audio support is not claimed.
1OS: Linux Mint 22.1
2CPU: Intel Core i5-11400
3RAM: 32 GB
4GPU: AMD Radeon RX 5700 XT
5VRAM: 8 GB
6Driver: radeonsi / Navi 10
7Kernel: Linux 6.8
GPU
text
1Prefill speed: 926.31 tokens/s
2Decode speed: 47.82 tokens/s
3Init time: 4.4219 s
4Time to first token: 0.2973 s
CPU
text
1Prefill speed: 177.40 tokens/s
2Decode speed: 7.18 tokens/s
3Init time: 1.5860 s
4Time to first token: 1.5824 s
Apple Silicon
Mac mini M4 16 GB
Backend
Prefill
Decode
TTFT
GPU
531.24 tok/s
25.16 tok/s
0.522 s
CPU
405.78 tok/s
13.71 tok/s
0.704 s
MacBook Air M1 16 GB
Backend
Prefill
Decode
TTFT
GPU
273.03 tok/s
13.80 tok/s
1.010 s
CPU
129.90 tok/s
7.93 tok/s
2.097 s
MacBook Neo A18 Pro 8 GB
Backend
Prefill
Decode
TTFT
GPU
239.40 tok/s
14.51 tok/s
1.138 s
CPU
285.49 tok/s
9.41 tok/s
1.003 s
Mobile devices
Mobile benchmarks were performed using Google AI Edge Gallery.
iPhone 16 Pro Max — A18 Pro
Backend
Prefill
Decode
TTFT
GPU
212.51 tok/s
18.35 tok/s
1.34 s
CPU
221.49 tok/s
6.21 tok/s
1.43 s
Tecno Camon 40 Pro 5G — Dimensity 7300 Ultimate
Backend
Prefill
Decode
TTFT
GPU
100.78 tok/s
2.96 tok/s
2.90 s
CPU
34.54 tok/s
2.27 tok/s
7.87 s
Notes
The Radeon RX 5700 XT provides the highest measured performance among the tested devices:
text
1Prefill: 926.31 tokens/s
2Decode: 47.82 tokens/s
The model also runs successfully on mobile devices through Google AI Edge Gallery.
Performance depends heavily on the LiteRT backend, GPU drivers, available memory, operating system, and LiteRT-LM version. The benchmark numbers above should therefore be treated as practical reference measurements rather than universally reproducible performance figures.
Important notes and limitations
This is a conversion, not a separately trained model.
Behavioral characteristics of the source Huihui model remain relevant.
The source model has substantially reduced refusal/safety behavior.
Output can include sensitive, controversial, unsafe, inaccurate or otherwise
undesirable content.
Users should review outputs before using them in production or public-facing
applications.
Runtime behavior may differ from Transformers or GGUF builds because of
differences in quantization, execution backend, sampling, prompt formatting
and runtime implementation.
Exact token-for-token parity with the original Safetensors checkpoint is not
expected.
This repository does not provide independent benchmark or quality claims.
The conversion is intended for LiteRT-LM multimodal chat / text-and-vision use.
License and upstream terms
The source Huihui repository is published on Hugging Face with the
Apache-2.0 license metadata.
Users should also review the terms, notices and usage requirements associated
with the upstream Gemma model family and the original Huihui model before
redistribution or deployment.
This repository is a runtime-format conversion and packaging project built on
top of several upstream models, tools and community resources.
Google / Google DeepMind
Google / Google DeepMind created the Gemma model family and the Gemma 4
architecture underlying this model. The instruction-tuned upstream family is
represented by google/gemma-4-E4B-it.
Google also develops the LiteRT ecosystem used for on-device execution.
huihui-ai
huihui-ai created and published the direct source checkpoint:
The QAT/Q4_0 and abliterated characteristics originate from the upstream Huihui
model. This repository does not claim authorship of those weights, training
changes or behavioral modifications.
LiteRT-LM
Google AI Edge LiteRT-LM provides the runtime and .litertlm bundle format
used by this repository. It provides the infrastructure for packaging model
components, tokenizer data, metadata, KV-cache configuration and executable
LiteRT/TFLite components for local inference.
LiteRT Torch
LiteRT Torch provides the Hugging Face export pipeline used to create this
artifact. The conversion uses litert-torch export_hf with the
dynamic_wi4_afp32 recipe, externalized embeddings, Gemma 4 MoE export
settings, multiple prefill lengths and multimodal export options.
LiteRT Community
LiteRT Community published the Gemma 4 E4B LiteRT-LM reference repository
used for the compatible Jinja chat template:
litert-community/gemma-4-E4B-it-litert-lm
vokash3
vokash3 performed and published the LiteRT-LM conversion in this repository,
including source-checkpoint preparation, export configuration experiments,
selection of the LiteRT quantization recipe, multimodal packaging, bundle
inspection, LiteRT-LM compatibility testing, Google AI Edge Gallery testing, documentation of the current audio limitation, and publication
of the resulting artifact.
No authorship of the original Gemma or Huihui weights is claimed.