Instructions to use h3rb3rn/smollm3-expert-security-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h3rb3rn/smollm3-expert-security-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="h3rb3rn/smollm3-expert-security-3b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("h3rb3rn/smollm3-expert-security-3b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use h3rb3rn/smollm3-expert-security-3b 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 h3rb3rn/smollm3-expert-security-3b:Q4_K_M # Run inference directly in the terminal: llama cli -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M # Run inference directly in the terminal: llama cli -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Use Docker
docker model run hf.co/h3rb3rn/smollm3-expert-security-3b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use h3rb3rn/smollm3-expert-security-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "h3rb3rn/smollm3-expert-security-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3rb3rn/smollm3-expert-security-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/h3rb3rn/smollm3-expert-security-3b:Q4_K_M
- SGLang
How to use h3rb3rn/smollm3-expert-security-3b 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 "h3rb3rn/smollm3-expert-security-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3rb3rn/smollm3-expert-security-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "h3rb3rn/smollm3-expert-security-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3rb3rn/smollm3-expert-security-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use h3rb3rn/smollm3-expert-security-3b with Ollama:
ollama run hf.co/h3rb3rn/smollm3-expert-security-3b:Q4_K_M
- Unsloth Desktop
- Pi
How to use h3rb3rn/smollm3-expert-security-3b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h3rb3rn/smollm3-expert-security-3b: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": "h3rb3rn/smollm3-expert-security-3b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use h3rb3rn/smollm3-expert-security-3b with Docker Model Runner:
docker model run hf.co/h3rb3rn/smollm3-expert-security-3b:Q4_K_M
- Lemonade
How to use h3rb3rn/smollm3-expert-security-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Run and chat with the model
lemonade run user.smollm3-expert-security-3b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use h3rb3rn/smollm3-expert-security-3b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h3rb3rn/smollm3-expert-security-3b: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 h3rb3rn/smollm3-expert-security-3b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use h3rb3rn/smollm3-expert-security-3b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf h3rb3rn/smollm3-expert-security-3b: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 "h3rb3rn/smollm3-expert-security-3b: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"
MoE Sovereign Cybersecurity & Vulnerability Analysis Expert 3B -- SmolLM3 (smollm3-expert-security-3b)
Model Summary
smollm3-expert-security-3b is a LoRA fine-tune of the text-decoder of Qwen3.5-4B, specialized as the security domain expert within the MoE Sovereign compound-AI system.
You are a cybersecurity, static vulnerability analysis, and hardening expert (moe-expert-security-4b). Identify memory-safety flaws, injection vectors, and SSRF/CWE-classified vulnerabilities with the exact CWE ID; scan for exposed secrets and credentials; build STRIDE-based threat models across trust boundaries; and produce concrete hardening manifests (seccomp, AppArmor, Kubernetes policies).
Base Architecture
SmolLM3-3B is a genuinely open-source dense Transformer (weights, training data, and training code all publicly documented by HuggingFaceTB) -- distinguishing this Spur-2 track from the open-weight-only Qwen3.5 base used in the parallel 4B expert line.
Training Configuration
| Parameter | Value |
|---|---|
| Method | LoRA (rank 16, alpha 32, dropout 0.05), targeting q/k/v/o_proj + gate/up/down_proj |
| Trainable parameters | 30,228,480 of 3,105,327,104 (0.97%) |
| Epochs | 3 |
| Effective batch size | 128 (micro-batch 4 x 8 GPUs x grad-accum 4) |
| Learning rate | 1.5e-5 |
| Training sequence length | 4,096 tokens |
| Optimizer sharding | DeepSpeed ZeRO-2, bf16 |
| Compute | EuroHPC LUMI-G, 8x AMD Instinct MI250X GCDs, ROCm |
| Training examples | 3,170 curated instruction/response pairs |
Observed Training Trajectory
Training loss over the run (representative logged steps): 1.452 -> 1.299 -> 1.136. Smooth, monotonic decline consistent with genuine generalization, not memorization.
Prompt Format
ChatML:
<|im_start|>system
{system_prompt}<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant
{response}<|im_end|>
System Prompt
You are a cybersecurity, static vulnerability analysis, and hardening expert (moe-expert-security-4b). Identify memory-safety flaws, injection vectors, and SSRF/CWE-classified vulnerabilities with the exact CWE ID; scan for exposed secrets and credentials; build STRIDE-based threat models across trust boundaries; and produce concrete hardening manifests (seccomp, AppArmor, Kubernetes policies).
Available Formats
| File | Notes |
|---|---|
smollm3-expert-security-3b-Q4_K_M.gguf |
Recommended for single/multi-GPU deployment |
smollm3-expert-security-3b-Q8_0.gguf |
Higher-fidelity reference quantization |
Hardware Guidance
SmolLM3-3B's native context window is 65,536 tokens. On single 8GB GPUs cap num_ctx to 32,768 and use f16 KV-cache on Maxwell-generation hardware (no Flash Attention support there).
Ollama Modelfile
FROM ./smollm3-expert-security-3b-Q4_K_M.gguf
SYSTEM """You are a cybersecurity, static vulnerability analysis, and hardening expert (moe-expert-security-4b). Identify memory-safety flaws, injection vectors, and SSRF/CWE-classified vulnerabilities with the exact CWE ID; scan for exposed secrets and credentials; build STRIDE-based threat models across trust boundaries; and produce concrete hardening manifests (seccomp, AppArmor, Kubernetes policies)."""
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>"""
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.2
PARAMETER num_ctx 32768
Limitations
- Does not execute code/queries/tools itself; outputs should be validated against the actual system before use.
- Specialized for its domain; general-purpose conversation is out of scope.
License
Apache 2.0, inherited from the SmolLM3-3B base model.
- Downloads last month
- -
4-bit
8-bit