Token Classification
Transformers
ONNX
Safetensors
Transformers.js
modernbert
prompt-compression
context-compression
llmlingua
rag
agent-observability
tamarillo
Eval Results (legacy)
Instructions to use Tamarillo/prompt-compressor-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tamarillo/prompt-compressor-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Tamarillo/prompt-compressor-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Tamarillo/prompt-compressor-small") model = AutoModelForTokenClassification.from_pretrained("Tamarillo/prompt-compressor-small", device_map="auto") - Transformers.js
How to use Tamarillo/prompt-compressor-small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Tamarillo/prompt-compressor-small'); - Notebooks
- Google Colab
- Kaggle
Release Tamarillo/prompt-compressor-small (Apache-2.0, ModernBERT extractive prompt compressor, parity-verified ONNX)
4875150 verified Download eval_5suite_reader_qa.json from Tamarillo/prompt-compressor-small: direct link, hf CLI and curl.
- Browser
- Download file 9.5 kB
-
https://huggingface.co/Tamarillo/prompt-compressor-small/resolve/main/eval_5suite_reader_qa.json
- Command line
-
hf download hf://Tamarillo/prompt-compressor-small/eval_5suite_reader_qa.json
-
curl -L -o eval_5suite_reader_qa.json https://huggingface.co/Tamarillo/prompt-compressor-small/resolve/main/eval_5suite_reader_qa.json
9.5 kB
| { | |
| "reader": "microsoft/Phi-4-mini-instruct", | |
| "rates": { | |
| "rate_50": { | |
| "uncompressed": { | |
| "mean_5suite_score": 0.766, | |
| "mean_4en_score": 0.7913, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.475, | |
| "score": 0.6176, | |
| "retention": 1.0 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.7467, | |
| "score": 0.8775, | |
| "retention": 1.0 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.67, | |
| "score": 0.67, | |
| "retention": 1.0 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.5667, | |
| "score": 0.6647, | |
| "retention": 1.0 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 1.0, | |
| "score": 1.0, | |
| "retention": 1.0 | |
| } | |
| } | |
| }, | |
| "llmlingua2_mbert_178m": { | |
| "mean_5suite_score": 0.5597, | |
| "mean_4en_score": 0.5979, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4583, | |
| "score": 0.5954, | |
| "retention": 0.5 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.5933, | |
| "score": 0.7994, | |
| "retention": 0.4996 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.27, | |
| "score": 0.27, | |
| "retention": 0.4997 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.3083, | |
| "score": 0.4072, | |
| "retention": 0.5001 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 0.44, | |
| "score": 0.7267, | |
| "retention": 0.5 | |
| } | |
| } | |
| }, | |
| "llmlingua2_xlmr_560m": { | |
| "mean_5suite_score": 0.6037, | |
| "mean_4en_score": 0.6491, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4333, | |
| "score": 0.583, | |
| "retention": 0.5 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.6133, | |
| "score": 0.7935, | |
| "retention": 0.4996 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.35, | |
| "score": 0.35, | |
| "retention": 0.4997 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.3, | |
| "score": 0.4219, | |
| "retention": 0.5001 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 0.61, | |
| "score": 0.87, | |
| "retention": 0.5 | |
| } | |
| } | |
| }, | |
| "tamarillo_small_141m": { | |
| "mean_5suite_score": 0.6221, | |
| "mean_4en_score": 0.6503, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4667, | |
| "score": 0.5731, | |
| "retention": 0.5 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.5733, | |
| "score": 0.7982, | |
| "retention": 0.4996 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.24, | |
| "score": 0.24, | |
| "retention": 0.4997 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.4083, | |
| "score": 0.5092, | |
| "retention": 0.5001 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 0.97, | |
| "score": 0.99, | |
| "retention": 0.5 | |
| } | |
| } | |
| }, | |
| "tamarillo_tiny_en_32m": { | |
| "mean_5suite_score": 0.6066, | |
| "mean_4en_score": 0.6746, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4333, | |
| "score": 0.5719, | |
| "retention": 0.5 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.6, | |
| "score": 0.8065, | |
| "retention": 0.4996 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.33, | |
| "score": 0.33, | |
| "retention": 0.4997 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.2667, | |
| "score": 0.3344, | |
| "retention": 0.5001 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 0.97, | |
| "score": 0.99, | |
| "retention": 0.5 | |
| } | |
| } | |
| } | |
| }, | |
| "rate_65": { | |
| "uncompressed": { | |
| "mean_5suite_score": 0.766, | |
| "mean_4en_score": 0.7913, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.475, | |
| "score": 0.6176, | |
| "retention": 1.0 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.7467, | |
| "score": 0.8775, | |
| "retention": 1.0 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.67, | |
| "score": 0.67, | |
| "retention": 1.0 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.5667, | |
| "score": 0.6647, | |
| "retention": 1.0 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 1.0, | |
| "score": 1.0, | |
| "retention": 1.0 | |
| } | |
| } | |
| }, | |
| "llmlingua2_mbert_178m": { | |
| "mean_5suite_score": 0.6743, | |
| "mean_4en_score": 0.7106, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.5083, | |
| "score": 0.6488, | |
| "retention": 0.65 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.64, | |
| "score": 0.837, | |
| "retention": 0.6494 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.36, | |
| "score": 0.36, | |
| "retention": 0.6502 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.4, | |
| "score": 0.5291, | |
| "retention": 0.6509 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 0.99, | |
| "score": 0.9967, | |
| "retention": 0.6538 | |
| } | |
| } | |
| }, | |
| "llmlingua2_xlmr_560m": { | |
| "mean_5suite_score": 0.7093, | |
| "mean_4en_score": 0.7514, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4833, | |
| "score": 0.6196, | |
| "retention": 0.65 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.6533, | |
| "score": 0.846, | |
| "retention": 0.6494 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.54, | |
| "score": 0.54, | |
| "retention": 0.6502 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.4333, | |
| "score": 0.5409, | |
| "retention": 0.6509 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 1.0, | |
| "score": 1.0, | |
| "retention": 0.6538 | |
| } | |
| } | |
| }, | |
| "tamarillo_small_141m": { | |
| "mean_5suite_score": 0.6951, | |
| "mean_4en_score": 0.7293, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4917, | |
| "score": 0.6276, | |
| "retention": 0.65 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.6333, | |
| "score": 0.8296, | |
| "retention": 0.6494 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.46, | |
| "score": 0.46, | |
| "retention": 0.6502 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.4583, | |
| "score": 0.5584, | |
| "retention": 0.6509 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 1.0, | |
| "score": 1.0, | |
| "retention": 0.6538 | |
| } | |
| } | |
| }, | |
| "tamarillo_tiny_en_32m": { | |
| "mean_5suite_score": 0.6805, | |
| "mean_4en_score": 0.7341, | |
| "by_suite": { | |
| "ood_hotpotqa_rag": { | |
| "n": 120, | |
| "em": 0.4583, | |
| "score": 0.6027, | |
| "retention": 0.65 | |
| }, | |
| "ood_squad_v2": { | |
| "n": 150, | |
| "em": 0.6067, | |
| "score": 0.8237, | |
| "retention": 0.6494 | |
| }, | |
| "ood_gsm8k_math": { | |
| "n": 100, | |
| "em": 0.51, | |
| "score": 0.51, | |
| "retention": 0.6502 | |
| }, | |
| "ood_multilingual_xquad": { | |
| "n": 120, | |
| "em": 0.35, | |
| "score": 0.4663, | |
| "retention": 0.6509 | |
| }, | |
| "ood_agent_json_qa": { | |
| "n": 100, | |
| "em": 1.0, | |
| "score": 1.0, | |
| "retention": 0.6538 | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "mbert_cpu_onnx_benchmark": { | |
| "size_mb": 676.75, | |
| "cpu_256": { | |
| "seq_len": 256, | |
| "chunks_512": 1, | |
| "p50_ms": 123.2 | |
| }, | |
| "cpu_512": { | |
| "seq_len": 512, | |
| "chunks_512": 1, | |
| "p50_ms": 276.71 | |
| }, | |
| "cpu_1024": { | |
| "seq_len": 1024, | |
| "chunks_512": 2, | |
| "p50_ms": 547.47 | |
| }, | |
| "cpu_2048": { | |
| "seq_len": 2048, | |
| "chunks_512": 4, | |
| "p50_ms": 1092.48 | |
| } | |
| } | |
| } |