Token Classification
Transformers
ONNX
Safetensors
Transformers.js
English
modernbert
prompt-compression
context-compression
llmlingua
rag
agent-observability
tamarillo
Eval Results (legacy)
Instructions to use Tamarillo/prompt-compressor-tiny-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/prompt-compressor-tiny-en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tamarillo/prompt-compressor-tiny-en")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/prompt-compressor-tiny-en") model = AutoModelForTokenClassification.from_pretrained("Tamarillo/prompt-compressor-tiny-en", device_map="auto") - Transformers.js
How to use Tamarillo/prompt-compressor-tiny-en with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/prompt-compressor-tiny-en'); - Notebooks
- Google Colab
- Kaggle
Release Tamarillo/prompt-compressor-tiny-en (Apache-2.0, ModernBERT extractive prompt compressor, parity-verified ONNX)
bad1d0a verified Download onnx_benchmark.json from Tamarillo/prompt-compressor-tiny-en: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/Tamarillo/prompt-compressor-tiny-en/resolve/main/onnx_benchmark.json
- Command line
-
hf download hf://Tamarillo/prompt-compressor-tiny-en/onnx_benchmark.json
-
curl -L -o onnx_benchmark.json https://huggingface.co/Tamarillo/prompt-compressor-tiny-en/resolve/main/onnx_benchmark.json
2.03 kB
| { | |
| "threads": 4, | |
| "artifacts": { | |
| "fp32": { | |
| "filename": "onnx/model.onnx", | |
| "size_mb": 122.4, | |
| "parity_short": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 1.0, | |
| "max_abs_prob_diff": 0.0 | |
| }, | |
| "parity_2048": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 1.0, | |
| "max_abs_prob_diff": 1e-05 | |
| }, | |
| "passed_gate": true, | |
| "cpu_256": { | |
| "seq_len": 256, | |
| "p50_ms": 31.03, | |
| "p95_ms": 31.64 | |
| }, | |
| "cpu_512": { | |
| "seq_len": 512, | |
| "p50_ms": 73.72, | |
| "p95_ms": 73.94 | |
| }, | |
| "cpu_1024": { | |
| "seq_len": 1024, | |
| "p50_ms": 219.63, | |
| "p95_ms": 221.34 | |
| }, | |
| "cpu_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 735.53, | |
| "p95_ms": 738.47 | |
| } | |
| }, | |
| "fp16": { | |
| "filename": "onnx/model_fp16.onnx", | |
| "size_mb": 61.29, | |
| "parity_short": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 1.0, | |
| "max_abs_prob_diff": 0.00057 | |
| }, | |
| "parity_2048": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 1.0, | |
| "max_abs_prob_diff": 0.01884 | |
| }, | |
| "passed_gate": true, | |
| "cpu_256": { | |
| "seq_len": 256, | |
| "p50_ms": 38.3, | |
| "p95_ms": 38.61 | |
| }, | |
| "cpu_512": { | |
| "seq_len": 512, | |
| "p50_ms": 86.32, | |
| "p95_ms": 88.52 | |
| }, | |
| "cpu_1024": { | |
| "seq_len": 1024, | |
| "p50_ms": 265.91, | |
| "p95_ms": 267.72 | |
| }, | |
| "cpu_2048": { | |
| "seq_len": 2048, | |
| "p50_ms": 941.82, | |
| "p95_ms": 947.14 | |
| } | |
| }, | |
| "int8": { | |
| "filename": "onnx/model_quantized.onnx", | |
| "size_mb": 67.15, | |
| "parity_short": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 1.0, | |
| "max_abs_prob_diff": 0.06062 | |
| }, | |
| "parity_2048": { | |
| "token_agreement": 1.0, | |
| "top50_jaccard": 0.99494, | |
| "max_abs_prob_diff": 0.09139 | |
| }, | |
| "passed_gate": false, | |
| "deleted_due_to_parity_gate": true | |
| } | |
| } | |
| } |