Instructions to use ericlewis/herb-150m-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ericlewis/herb-150m-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="ericlewis/herb-150m-fp8", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("ericlewis/herb-150m-fp8", trust_remote_code=True) model = AutoModel.from_pretrained("ericlewis/herb-150m-fp8", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Herb-150M-FP8 (ericlewis/herb-150m-fp8)
Zero-dependency FP8 (float8_e4m3fn) release of ericlewis/herb-150m (v1.1). All 168 transformer encoder linear layers are stored as per-output-channel float8_e4m3fn weights with FP32 scales, embeddings and RMSNorms are stored in bfloat16, and HybridSetAttentionHead remains strictly in float32 for probability and calibration stability.
Requires no torchao, no bitsandbytes, and no external frameworkโonly transformers + torch + safetensors.
Benchmark Summary vs. BF16 (NVIDIA GB10)
| Metric | ericlewis/herb-150m (v1.1 BF16) |
ericlewis/herb-150m-fp8 (w8a16 default) |
ericlewis/herb-150m-fp8 (w8a8 Tensor Core) |
|---|---|---|---|
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 | 408.2 ms / 881.6 MiB | 418.5 ms / 767.5 MiB | 697.0 ms / 822.0 MiB |
| 32,000t Latency / Peak Alloc VRAM | 1,055.4 ms / 1,528.8 MiB | 1,071.4 ms / 1,412.8 MiB | 1,677.2 ms / 1,542.4 MiB |
v11_val_balanced (4,934 Qs) |
85.23% (ECE10 0.0175) |
85.37% (98.7% agree, ECE10 0.0186) |
85.41% (98.3% agree) |
Public 4-Set Mean (BoolQ/SST-2/AG News/SST-5) |
73.27% | 73.30% (74.0/87.5/86.1/45.6) |
73.39% (74.0/87.8/85.9/45.8) |
| Agreement vs. BF16 (Public 4 Sets) | โ | 97.0%โ99.0% |
96.0%โ99.1% |
JevBench public-231 |
148/231 (64.07%) |
147/231 (63.64%, 95.7% agree, ECE 0.090) |
143/231 (61.90%, 95.2% agree) |
By default (
default_compute: "w8a16"), weights stay stored infloat8_e4m3fnand dequantize per channel in registers for optimal eager speed and accuracy across all CUDA GPUs, MPS, and CPU. On Ada/Hopper/Blackwell GPUs (SM >= 8.9), passquantize_compute="w8a8"(or callmodel.set_quantized_compute("w8a8")) to execute native per-rowtorch._scaled_mmFP8 Tensor Core GEMMs.
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-fp8 (w8a16) |
--orders 1 |
42.78 | 57.07 | 38.44 | 14.30 | 45.12 | 65.75 | 61.20 | 30.71 | 2.6 ms / 22.1 ms |
ericlewis/herb-150m-fp8 (w8a16, TTA) |
--orders 4 |
42.97 | 57.22 | 38.61 | 14.40 | 45.32 | 65.83 | 61.77 | 30.59 | 4.8 ms / 75.2 ms |
ericlewis/herb-150m-fp8 (w8a8 Tensor Core) |
--orders 1 |
42.66 | 57.02 | 38.28 | 14.12 | 45.21 | 65.58 | 61.12 | 30.20 | 4.1 ms / 38.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-fp8 (w8a16) |
219.7 MiB | 17.96 ms / 235.1 MiB | 69.97 ms / 794.8 MiB | 205.36 ms / 1,442.3 MiB |
ericlewis/herb-150m-fp8 (w8a8) |
219.7 MiB | 29.22 ms / 235.1 MiB | 79.82 ms / 853.7 MiB | 265.17 ms / 1,567.5 MiB |
Usage
import torch
from transformers import AutoModelForMultipleChoice
model = AutoModelForMultipleChoice.from_pretrained(
"ericlewis/herb-150m-fp8",
revision="54f61e8c962b76e5b390beaf6c5aad349071c20f",
trust_remote_code=True,
dtype=torch.bfloat16,
# Optional native FP8 Tensor Core compute on SM >= 8.9:
# quantize_compute="w8a8",
).to("cuda" if torch.cuda.is_available() else "cpu").eval()
choice = model.choose(
state={"user_msg": "Schedule a meeting tomorrow at 2pm", "tools": ["calendar_create", "send_email"]},
question="Which tool should run?",
options={"calendar_create": "Create a calendar event", "send_email": "Send an email message"},
)
print(choice["choice"], choice["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-fp8
Base model
dmis-lab/UltraBERT-150M