Instructions to use ericlewis/herb-150m-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ericlewis/herb-150m-int8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ericlewis/herb-150m-int8", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("ericlewis/herb-150m-int8", trust_remote_code=True) model = AutoModel.from_pretrained("ericlewis/herb-150m-int8", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Herb-150M-INT8 (ericlewis/herb-150m-int8)
Zero-dependency INT8 (int8) release of ericlewis/herb-150m (v1.1). All 168 transformer encoder linear layers are stored as per-output-channel symmetric int8 weights with FP32 scales, embeddings and RMSNorms are stored in bfloat16 (or cast cleanly to float32 via dtype=torch.float32 for fast CPU inference), and HybridSetAttentionHead remains strictly in float32 for calibration stability.
Requires no bitsandbytes, no torchao, and no external frameworkβonly transformers + torch + safetensors.
Benchmark Summary vs. BF16 (NVIDIA GB10 GPU & ARM CPU)
| Metric | ericlewis/herb-150m (v1.1) |
ericlewis/herb-150m-int8 (w8a16 default) |
ericlewis/herb-150m-int8 (w8a8 CUDA _int_mm) |
|---|---|---|---|
Encoder Weights (model.safetensors) |
576.17 MiB | 180.65 MiB (3.19x smaller) |
180.65 MiB |
Decision Head (joint_head.safetensors) |
7.08 MiB (FP32) | 7.08 MiB (FP32) | 7.08 MiB (FP32) |
| Idle GPU VRAM | 304.0 MiB | 188.1 MiB | 188.1 MiB |
| 15,040t Latency / Peak Alloc VRAM (GPU) | 408.2 ms / 881.6 MiB | 415.5 ms / 767.5 MiB | β |
| 32,000t Latency / Peak Alloc VRAM (GPU) | 1,055.4 ms / 1,528.8 MiB | 1,067.8 ms / 1,412.8 MiB | β |
v11_val_balanced (4,934 Qs) |
85.23% (ECE10 0.0175) |
85.25% (99.47% agree) |
85.33% (98.52% agree) |
Public 4-Set Mean (BoolQ/SST-2/AG News/SST-5) |
73.27% | 73.09% (73.9/87.3/85.9/45.3) |
73.15% (73.7/87.5/85.8/45.6) |
| Agreement vs. BF16 (Public 4 Sets) | β | 98.1%β99.7% |
96.3%β99.2% |
JevBench public-231 |
148/231 (64.07%) |
147/231 (63.64%, 97.4% agree, ECE 0.090) |
147/231 (63.64%, 96.1% agree, ECE 0.080) |
CPU 404 Tokens (dtype=torch.float32) |
233.65 ms med / 333.63 ms p95 | 257.89 ms med / 264.04 ms p95 (100% agree on BoolQ-100 & AGNews-100) |
β |
Complete Official Decision Index 0.3 & RTX PRO 6000 Max-Q
Evaluated on the full Decision Index 0.3 suite (140,620 total requests: 140,603 ok / 17 unsupported, 140,178 scoreable across 43 datasets) on 8Γ NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation:
| Variant | Eval Mode | Decision Index | Raw Index | Breadth | Knowledge | Language | Retrieval | Tools | Arts | Median / p95 Latency (8Γ batched) |
|---|---|---|---|---|---|---|---|---|---|---|
ericlewis/herb-150m (v1.1 BF16) |
--orders 1 |
43.01 | 57.25 | 38.60 | 14.17 | 45.58 | 65.60 | 61.92 | 31.15 | 2.6 ms / 22.4 ms |
ericlewis/herb-150m (v1.1 BF16, TTA) |
--orders 4 |
43.13 | 57.34 | 38.79 | 14.58 | 45.50 | 65.79 | 62.15 | 30.68 | 4.8 ms / 74.9 ms |
ericlewis/herb-150m-int8 (w8a16) |
--orders 1 |
42.82 | 57.07 | 38.44 | 14.11 | 45.38 | 65.66 | 61.20 | 31.08 | 2.6 ms / 22.4 ms |
ericlewis/herb-150m-int8 (w8a16, TTA) |
--orders 4 |
42.96 | 57.18 | 38.64 | 14.54 | 45.26 | 65.76 | 61.72 | 30.56 | 4.8 ms / 75.3 ms |
Single-Card 1Γ RTX PRO 6000 Blackwell Max-Q (B=1 Latency & Peak VRAM)
| Variant | Idle VRAM | 380t Median / Peak VRAM |
15,040t Median / Peak VRAM |
32,000t Median / Peak VRAM |
|---|---|---|---|---|
ericlewis/herb-150m (v1.1 BF16) |
327.2 MiB | 14.26 ms / 342.5 MiB | 68.31 ms / 902.3 MiB | 203.65 ms / 1,549.7 MiB |
ericlewis/herb-150m-int8 (w8a16) |
219.7 MiB | 17.83 ms / 235.1 MiB | 69.64 ms / 794.8 MiB | 205.71 ms / 1,442.3 MiB |
Usage
GPU Inference
import torch
from transformers import AutoModelForMultipleChoice
model = AutoModelForMultipleChoice.from_pretrained(
"ericlewis/herb-150m-int8",
revision="ad5ee848516979e918990047001b7ee536daef70",
trust_remote_code=True,
dtype=torch.bfloat16,
).to("cuda" if torch.cuda.is_available() else "cpu").eval()
CPU-Only Inference (Pass dtype=torch.float32)
import torch
from transformers import AutoModelForMultipleChoice
model = AutoModelForMultipleChoice.from_pretrained(
"ericlewis/herb-150m-int8",
revision="ad5ee848516979e918990047001b7ee536daef70",
trust_remote_code=True,
dtype=torch.float32,
).eval()
res = model.verify(
state="Invoice #418 is marked paid on 2026-11-26.",
question="The invoice is unpaid.",
)
print(res["value"], res["probabilities"])
License
Apache-2.0 (LICENSE). Derived from ericlewis/herb-150m and dmis-lab/UltraBERT-150M.
- Downloads last month
- -
Model tree for ericlewis/herb-150m-int8
Base model
dmis-lab/UltraBERT-150M