玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
tiggychan /

gemma-4-E2B-it-uncensored-mnn-int4

HF 源站

tiggychan/gemma-4-E2B-it-uncensored-mnn-int4 is an uncensored open-source model hosted on Hugging Face.

Text GenerationEnglishLicense: apache-2.0mnngemma-4uncensoredint4hqqquantizedmobile
README.md说明 / 使用方法

license: apache-2.0 language:

  • en pipeline_tag: text-generation tags:
  • mnn
  • gemma-4
  • uncensored
  • int4
  • hqq
  • quantized
  • mobile

gemma-4-E2B-it-uncensored-mnn-int4

MNN format 4-bit HQQ quantized conversion of TrevorJS/gemma-4-E2B-it-uncensored, compatible with the MNN inference engine.

Model Information

PropertyValue
Base Modelgoogle/gemma-4-E2B-it
Uncensored ForkTrevorJS/gemma-4-E2B-it-uncensored
Quantization4-bit HQQ (Half-Quadratic Quantization)
Embedding Quantization4-bit (PLE embeddings also quantized)
Total Size~3.5 GB
LLM Weight1.4 GB
PLE Embeddings1.4 GB

File Structure

FileSizeDescription
llm.mnn2.2 MBLLM model structure (converted from ONNX)
llm.mnn.weight1.4 GBLLM weights (4-bit HQQ quantized)
ple_embeddings_int4.bin1.4 GBPer-Layer Embeddings (4-bit quantized)
visual.mnn / .weight217 MBVision tower (optional)
audio.mnn / .weight564 MBAudio tower (optional)
tokenizer.mtok9.7 MBMNN tokenizer
config.json-MNN runtime configuration
llm_config.json-LLM architecture configuration

Usage

Local Inference (CPU)

# Clone MNN source
git clone https://github.com/alibaba/MNN.git

# Build (CPU backend)
cd MNN
mkdir build && cd build
cmake .. -DMNN_LOW_MEMORY=true \
         -DMNN_CPU_WEIGHT_DEQUANT_GEMM=true \
         -DMNN_BUILD_LLM=true \
         -DMNN_SUPPORT_TRANSFORMER_FUSE=true
make -j$(nproc)

# Run inference
echo "Hello, who are you?" > prompt.txt
./llm_demo /path/to/config.json prompt.txt

MNN Chat (Android)

A custom Android APK with Gemma 4 support is available in the companion GitHub repository:

https://github.com/Tiggy-Chan/gemma4-mnn-android

Download the pre-built APK directly: 📱 app-standard-release-tiggy-gemma4.apk (35 MB)

Or follow the build instructions to compile your own APK.

Download the model folder to your device and import it via "Add Local Model".

Configuration Example

{
    "llm_model": "llm.mnn",
    "llm_weight": "llm.mnn.weight",
    "tokenizer_file": "tokenizer.mtok",
    "backend_type": "cpu",
    "thread_num": 4,
    "precision": "low",
    "memory": "low",
    "sampler_type": "mixed",
    "temperature": 1.0,
    "top_k": 64,
    "top_p": 0.95
}

Other Quantization Versions

VersionSizeRepo
INT4 HQQ (this)3.5 GB—
INT85.7 GBgemma-4-E2B-it-uncensored-mnn-int8
BF16 (full precision)9.5 GBgemma-4-E2B-it-uncensored-mnn-bf16

Conversion

Converted using MNN's llmexport.py:

cd MNN/transformers/llm/export
python3 llmexport.py \
    --path TrevorJS/gemma-4-E2B-it-uncensored \
    --export mnn \
    --quant_bit 4 \
    --embed_bit 4 \
    --hqq \
    --dst_path ./output

License

This model is distributed under the Apache License 2.0, inherited from the original Gemma 4 model by Google DeepMind. See the LICENSE file for the full license text.

Usage of Gemma models is also subject to the Gemma Terms of Use.

Acknowledgments

  • Base model: google/gemma-4-E2B-it by Google DeepMind
  • Uncensored variant: TrevorJS/gemma-4-E2B-it-uncensored by TrevorJS
  • MNN inference engine: Alibaba MNN
HUGGING FACE

上游数据

HF 下载量19
HF 点赞量1

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
tiggychan
最近更新
2026/04/13
最新创建
2026/04/10
HF 趋势
未知
数据快照
2026/09/16
版本
未知
许可证
apache-2.0