Instructions to use evalengine/unbound-e4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use evalengine/unbound-e4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="evalengine/unbound-e4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("evalengine/unbound-e4b") model = AutoModelForImageTextToText.from_pretrained("evalengine/unbound-e4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use evalengine/unbound-e4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "evalengine/unbound-e4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "evalengine/unbound-e4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/evalengine/unbound-e4b
- SGLang
How to use evalengine/unbound-e4b 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 "evalengine/unbound-e4b" \ --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": "evalengine/unbound-e4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "evalengine/unbound-e4b" \ --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": "evalengine/unbound-e4b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use evalengine/unbound-e4b with Docker Model Runner:
docker model run hf.co/evalengine/unbound-e4b
README: fill in E4B-2 bench numbers; note desktop-only GGUFs
Browse files
README.md
CHANGED
|
@@ -26,46 +26,60 @@ Uncensored variant of `google/gemma-4-E4B-it` from the [**Chromia**](https://x.c
|
|
| 26 |
team — the *larger* sibling of [`evalengine/unbound-e2b`](https://huggingface.co/evalengine/unbound-e2b),
|
| 27 |
more capable on knowledge-heavy and reasoning tasks while still fitting on a
|
| 28 |
modern laptop. This repo holds the merged HF weights; for the **on-device GGUF builds**
|
| 29 |
-
(Ollama / llama.cpp / LM Studio
|
| 30 |
[`evalengine/unbound-e4b-GGUF`](https://huggingface.co/evalengine/unbound-e4b-GGUF).
|
| 31 |
|
| 32 |
## What this is for
|
| 33 |
|
| 34 |
Same use cases as Unbound E2B — offline / security research / unrestricted
|
| 35 |
-
coding / private workflows — but trading ~2× the parameters (and ~2× the
|
| 36 |
-
size) for stronger capability. Pick E4B when you have the
|
| 37 |
-
and want a
|
| 38 |
-
fit on a phone or a constrained edge device.
|
| 39 |
|
| 40 |
-
Base capability is preserved close to `gemma-4-E4B-it`
|
|
|
|
| 41 |
|
| 42 |
## Benchmarks (vs base `gemma-4-E4B-it`)
|
| 43 |
|
| 44 |
| Axis | Base | Unbound E4B | Δ |
|
| 45 |
|---|---|---|---|
|
| 46 |
-
| Refusal rate (AdvBench 520) |
|
| 47 |
-
| Useful-compliance rate |
|
| 48 |
-
| Hallucination rate |
|
| 49 |
-
| Coherence on benign prompts | 1.0 |
|
| 50 |
-
| TruthfulQA mc2 (lm-eval, `--limit 100`) |
|
| 51 |
-
| MMLU (lm-eval, `--limit 100`) |
|
| 52 |
-
| GSM8K (lm-eval, `--limit
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
## Recommended sampling
|
| 56 |
|
| 57 |
-
Same guidance as Unbound E2B:
|
| 58 |
-
|
| 59 |
- **Creative writing / open-ended / general chat** → Gemma defaults:
|
| 60 |
`temperature=1.0, top_p=0.95, top_k=64`.
|
| 61 |
-
- **Factual or brand/identity questions** →
|
| 62 |
for sharper recall.
|
| 63 |
- **llama.cpp**: pass `--jinja` for proper chat-template handling.
|
| 64 |
- **Gemma 4 thinking mode** is on by default. Set `enable_thinking: false`
|
| 65 |
in the chat-template kwargs for shorter/faster replies.
|
| 66 |
|
|
|
|
|
|
|
|
|
|
| 67 |
## Run on-device (GGUF)
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
```bash
|
| 70 |
ollama pull hf.co/evalengine/unbound-e4b-GGUF
|
| 71 |
ollama run hf.co/evalengine/unbound-e4b-GGUF
|
|
|
|
| 26 |
team — the *larger* sibling of [`evalengine/unbound-e2b`](https://huggingface.co/evalengine/unbound-e2b),
|
| 27 |
more capable on knowledge-heavy and reasoning tasks while still fitting on a
|
| 28 |
modern laptop. This repo holds the merged HF weights; for the **on-device GGUF builds**
|
| 29 |
+
(Ollama / llama.cpp / LM Studio), see
|
| 30 |
[`evalengine/unbound-e4b-GGUF`](https://huggingface.co/evalengine/unbound-e4b-GGUF).
|
| 31 |
|
| 32 |
## What this is for
|
| 33 |
|
| 34 |
Same use cases as Unbound E2B — offline / security research / unrestricted
|
| 35 |
+
coding / private workflows — but trading ~2× the parameters (and ~2× the
|
| 36 |
+
on-disk size) for noticeably stronger capability. Pick E4B when you have the
|
| 37 |
+
RAM / VRAM headroom and want a sharper on-device model; pick E2B when you
|
| 38 |
+
need to fit on a phone or a constrained edge device.
|
| 39 |
|
| 40 |
+
Base capability is preserved close to `gemma-4-E4B-it`, so it also doubles
|
| 41 |
+
as a general-purpose ~4B chat model.
|
| 42 |
|
| 43 |
## Benchmarks (vs base `gemma-4-E4B-it`)
|
| 44 |
|
| 45 |
| Axis | Base | Unbound E4B | Δ |
|
| 46 |
|---|---|---|---|
|
| 47 |
+
| Refusal rate (AdvBench 520, LLM judge) | 98.08% | **2.69%** | **−95.4 pts** |
|
| 48 |
+
| Useful-compliance rate | 0.96% | **43.46%** | +42.5 pts |
|
| 49 |
+
| Hallucination rate (on harmful prompts) | 1.35% | 14.81% | +13.5 pts |
|
| 50 |
+
| Coherence on benign prompts | 1.0 | 1.0 | 0 |
|
| 51 |
+
| TruthfulQA mc2 (lm-eval, `--limit 100`) | 0.4394 | **0.4823** | +4.3 pts |
|
| 52 |
+
| MMLU (lm-eval, `--limit 100`, 61 subtasks avg) | ~0.425 | 0.3891 | −3.6 pts |
|
| 53 |
+
| GSM8K (lm-eval, flexible-extract) | 0.74 (`--limit 200`) | 0.60 (`--limit 100`) | regression mostly limit-noise; see notes |
|
| 54 |
+
| SimpleQA correct rate | — | 2.0% | (post-abliteration: model rarely declines) |
|
| 55 |
+
| KL divergence vs base | 0 | 2.99 | (SFT-expected) |
|
| 56 |
+
|
| 57 |
+
**Compared to Unbound E2B (current ship):** E4B is **+19 pp useful_compliance**
|
| 58 |
+
(43% vs 24%), **−7 pp hallucination** (15% vs 22%), **3.3× the GSM8K math
|
| 59 |
+
score**, and ships with a **cleaner KL** (2.99 vs 3.80). The headline refusal
|
| 60 |
+
rate is essentially the same (~2.7%).
|
| 61 |
|
| 62 |
## Recommended sampling
|
| 63 |
|
|
|
|
|
|
|
| 64 |
- **Creative writing / open-ended / general chat** → Gemma defaults:
|
| 65 |
`temperature=1.0, top_p=0.95, top_k=64`.
|
| 66 |
+
- **Factual or brand/identity questions** → drop `temperature` to ~0.3–0.5
|
| 67 |
for sharper recall.
|
| 68 |
- **llama.cpp**: pass `--jinja` for proper chat-template handling.
|
| 69 |
- **Gemma 4 thinking mode** is on by default. Set `enable_thinking: false`
|
| 70 |
in the chat-template kwargs for shorter/faster replies.
|
| 71 |
|
| 72 |
+
Some edge-case prompts may deflect on the first ask; a re-ask or strategic
|
| 73 |
+
re-phrasing usually gets through.
|
| 74 |
+
|
| 75 |
## Run on-device (GGUF)
|
| 76 |
|
| 77 |
+
Q4_K_M / Q6_K / Q8_0 split files at
|
| 78 |
+
[`evalengine/unbound-e4b-GGUF`](https://huggingface.co/evalengine/unbound-e4b-GGUF) —
|
| 79 |
+
note that E4B's per-layer-input embedding tensor exceeds 2 GB in every quant
|
| 80 |
+
we ship, so these are **desktop runtimes only** (no wllama). For an
|
| 81 |
+
in-browser build use [`evalengine/unbound-e2b-GGUF`](https://huggingface.co/evalengine/unbound-e2b-GGUF).
|
| 82 |
+
|
| 83 |
```bash
|
| 84 |
ollama pull hf.co/evalengine/unbound-e4b-GGUF
|
| 85 |
ollama run hf.co/evalengine/unbound-e4b-GGUF
|