Instructions to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nqd145/Gemma-4-E2B-it-abliterated-litertlm")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nqd145/Gemma-4-E2B-it-abliterated-litertlm", dtype="auto") - LiteRT-LM
How to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=nqd145/Gemma-4-E2B-it-abliterated-litertlm \ model.litertlm \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nqd145/Gemma-4-E2B-it-abliterated-litertlm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nqd145/Gemma-4-E2B-it-abliterated-litertlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nqd145/Gemma-4-E2B-it-abliterated-litertlm
- SGLang
How to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nqd145/Gemma-4-E2B-it-abliterated-litertlm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nqd145/Gemma-4-E2B-it-abliterated-litertlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nqd145/Gemma-4-E2B-it-abliterated-litertlm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nqd145/Gemma-4-E2B-it-abliterated-litertlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nqd145/Gemma-4-E2B-it-abliterated-litertlm with Docker Model Runner:
docker model run hf.co/nqd145/Gemma-4-E2B-it-abliterated-litertlm
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- huihui-ai/Huihui-gemma-4-E2B-it-abliterated
|
| 5 |
+
- google/gemma-4-E2B-it
|
| 6 |
+
tags:
|
| 7 |
+
- gemma
|
| 8 |
+
- litert-lm
|
| 9 |
+
- tflite
|
| 10 |
+
- abliterated
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
language:
|
| 13 |
+
- en
|
| 14 |
+
library_name: transformers
|
| 15 |
+
model_type: gemma
|
| 16 |
+
inference: false
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Gemma-4-E2B-it-abliterated (LiteRT-LM)
|
| 20 |
+
|
| 21 |
+
LiteRT-LM export of `huihui-ai/Huihui-gemma-4-E2B-it-abliterated` for on-device / edge inference workflows.
|
| 22 |
+
|
| 23 |
+
## Model File
|
| 24 |
+
|
| 25 |
+
- `Gemma-4-E2B-it-abliterated.litertlm`
|
| 26 |
+
|
| 27 |
+
## Source
|
| 28 |
+
|
| 29 |
+
- Base checkpoint: `huihui-ai/Huihui-gemma-4-E2B-it-abliterated`
|
| 30 |
+
- Export pipeline: `safetensors-to-litertlm`
|
| 31 |
+
|
| 32 |
+
## Export Notes
|
| 33 |
+
|
| 34 |
+
- Export format: `.litertlm` (LiteRT-LM bundle)
|
| 35 |
+
- Quantization: INT8 profile (`dynamic_wi8_afp32`)
|
| 36 |
+
- Intended runtime: `litert-lm` CLI / LiteRT-LM compatible apps
|
| 37 |
+
|
| 38 |
+
## Quick Start (CPU)
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
litert-lm run ./Gemma-4-E2B-it-abliterated.litertlm --prompt "Hi" --backend cpu
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Limitations
|
| 45 |
+
|
| 46 |
+
- Behavior may differ from the original HF checkpoint due to conversion/quantization/runtime differences.
|
| 47 |
+
- Some export profiles that reduce memory pressure can alter section topology and runtime behavior.
|
| 48 |
+
|
| 49 |
+
## Safety
|
| 50 |
+
|
| 51 |
+
This model may generate unsafe or incorrect content. Evaluate carefully for your use case and apply application-level safeguards where needed.
|
| 52 |
+
|
| 53 |
+
## License
|
| 54 |
+
|
| 55 |
+
Please follow the upstream license and usage terms of:
|
| 56 |
+
|
| 57 |
+
- `huihui-ai/Huihui-gemma-4-E2B-it-abliterated`
|
| 58 |
+
- underlying Gemma model family terms
|
| 59 |
+
|