Instructions to use chienhsinlin/helioslm-guard-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use chienhsinlin/helioslm-guard-e4b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Use Docker
docker model run hf.co/chienhsinlin/helioslm-guard-e4b:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use chienhsinlin/helioslm-guard-e4b with Ollama:
ollama run hf.co/chienhsinlin/helioslm-guard-e4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use chienhsinlin/helioslm-guard-e4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "chienhsinlin/helioslm-guard-e4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use chienhsinlin/helioslm-guard-e4b with Docker Model Runner:
docker model run hf.co/chienhsinlin/helioslm-guard-e4b:Q4_K_M
- Lemonade
How to use chienhsinlin/helioslm-guard-e4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull chienhsinlin/helioslm-guard-e4b:Q4_K_M
Run and chat with the model
lemonade run user.helioslm-guard-e4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use chienhsinlin/helioslm-guard-e4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default chienhsinlin/helioslm-guard-e4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use chienhsinlin/helioslm-guard-e4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chienhsinlin/helioslm-guard-e4b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "chienhsinlin/helioslm-guard-e4b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
羲和 HeliosLM Guard E4B
羲和 Guard E4B 是以 Google Gemma 4 E4B-it 為基礎的內容安全分類模型,針對台灣常見的不安全內容訓練:詐騙與釣魚(假客服、假物流、解除分期、假投資群組)、非法金融招攬、醫療與食安不實資訊、性別歧視、對族群或社群的仇恨言論、政治操弄(對任何政黨或陣營的蔑稱、煽動、選舉假訊息),以及一般有害內容。一般政治意見、對政府或政黨的理性批評、敏感歷史或主權議題的討論,都判為安全,而且不論針對哪一方都用同一標準。
HeliosLM Guard E4B is a content-safety classifier based on Google Gemma 4 E4B-it, tuned for unsafe content common in Taiwan (scams, illegal investment solicitation, health misinformation, hate speech, political manipulation such as slurs or incitement against any party) while treating ordinary political opinion and discussion of sensitive topics as safe, symmetrically for all sides.
- 檔案 Files:
helioslm-guard-e4b-Q4_K_M.gguf(5.3 GB),helioslm-guard-e4b-Q8_0.gguf(8.0 GB),lora/(LoRA adapter for google/gemma-4-E4B-it) - 授權 License: Gemma Terms of Use. Gemma is provided under and subject to the Gemma Terms of Use.
訓練資料 Training data
About 30k examples: Aegis 2.0 train (CC-BY-4.0, English plus a Traditional Chinese translation) and about 18k self-built Taiwan-specific harmful / hard-negative pairs written by an open Gemma 4 model and checked by label voting. Political items were built in mirrored pairs so that every camp gets the same treatment. LoRA, 1.5 epochs. The decision threshold was set on a held-out split of our own data, never on a test set.
評測 Evaluation (2026-11-06, self-run)
F1 for the "unsafe" class, bf16 (merged LoRA, vLLM), threshold 0.5. Same prompt and harness for both rows. Self-reported.
| Test set | HeliosLM Guard E4B | Gemma 4 E4B-it (base, zero-shot) |
|---|---|---|
| ToxicChat 0124 test | 0.744 | 0.646 |
| Aegis 2.0 test | 0.870 | 0.775 |
Neutrality probe: 7 political camps × 8 ordinary opinion statements → 0 flagged; 7 camps × 5 slurs / incitement → 100% flagged; 10 sensitive history and sovereignty discussion topics → 0 flagged.
The Q4_K_M GGUF scored the same as or slightly above bf16 on our Traditional Chinese quality check, so it is the recommended file.
使用 Usage (llama.cpp)
Send one user message = the classifier prompt below + the text, apply the chat template, prefill <score>, and read the probability of yes (unsafe) vs no (safe) from the next token.
你是內容安全分類器。判斷下面「待判斷文字」是否為不安全內容。……只輸出 <score>yes</score>(不安全)或 <score>no</score>(安全)。
待判斷文字:
<text>
The full prompt is in prompt.txt.
模型可能誤判,請勿作為唯一的審核依據。The model can make mistakes; do not use it as the only moderation step.
- Downloads last month
- 119
4-bit
8-bit