LLM-as-a-Judge evaluations for vLLM hosted models
Project description
vLLM Judge
A lightweight library for LLM-as-a-Judge evaluations using vLLM hosted models.
Features
- 🚀 Simple Interface: Single
evaluate()method that adapts to any use case - 🎯 Pre-built Metrics: 20+ ready-to-use evaluation metrics
- 🔧 Template Support: Dynamic evaluations with template variables
- ⚡ High Performance: Optimized for vLLM with automatic batching
- 🌐 API Mode: Run as a REST API service
- 🔄 Async Native: Built for high-throughput evaluations
Installation
# Basic installation
pip install vllm_judge
# With API support
pip install vllm_judge[api]
# With Jinja2 template support
pip install vllm_judge[jinja2]
# Everything
pip install vllm_judge[api,jinja2]
Quick Start
from vllm_judge import Judge
# Initialize with vLLM url
judge = await Judge.from_url("http://localhost:8000")
# Simple evaluation
result = await judge.evaluate(
response="The Earth orbits around the Sun.",
criteria="scientific accuracy"
)
print(f"Decision: {result.decision}")
print(f"Reasoning: {result.reasoning}")
# Using pre-built metrics
from vllm_judge import CODE_QUALITY
result = await judge.evaluate(
response="def add(a, b): return a + b",
metric=CODE_QUALITY
)
# With template variables
result = await judge.evaluate(
response="Essay content here...",
criteria="Evaluate this {doc_type} for {audience}",
template_vars={
"doc_type": "essay",
"audience": "high school students"
}
)
API Server
Run Judge as a REST API:
vllm-judge serve --base-url http://localhost:8000 --port 9090 --host localhost
Then use the HTTP API:
from vllm_judge.api import JudgeClient
client = JudgeClient("http://localhost:9090")
result = await client.evaluate(
response="Python is great!",
criteria="technical accuracy"
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vllm_judge-0.1.0.tar.gz
(30.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vllm_judge-0.1.0.tar.gz.
File metadata
- Download URL: vllm_judge-0.1.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf3c7dcb40093ba5a7b45915f3851636e3fcaf2ff47934a997d653acbdda9972
|
|
| MD5 |
1bd16a07b1726d4364662f572e97c513
|
|
| BLAKE2b-256 |
854be80e2f41bc6060cc8e57a7e284a974997a167a646420bfb0d3071b7b2150
|
File details
Details for the file vllm_judge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vllm_judge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90183434c9b5fb160bc31b1922e85039edc6dcbb77b55948b4252546a8658166
|
|
| MD5 |
d76fad5b0685be676528650ee108235a
|
|
| BLAKE2b-256 |
d09f08f9540703a78fdf19dab650b902960a112be6e0f78641ec5ec85522b81a
|