Skip to content

Commit aa588be

Browse files
add docs skeleton
1 parent b16f9fe commit aa588be

File tree

3 files changed

+175
-0
lines changed

3 files changed

+175
-0
lines changed

docs/index.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# vLLM Judge
2+
3+
A lightweight library for LLM-as-a-Judge evaluations using vLLM hosted models.
4+
5+
## Features
6+
7+
- 🚀 **Simple Interface**: Single `evaluate()` method that adapts to any use case
8+
- 🎯 **Pre-built Metrics**: 20+ ready-to-use evaluation metrics
9+
- 🔧 **Template Support**: Dynamic evaluations with template variables
10+
-**High Performance**: Optimized for vLLM with automatic batching
11+
- 🌐 **API Mode**: Run as a REST API service
12+
- 🔄 **Async Native**: Built for high-throughput evaluations
13+
14+
## Installation
15+
16+
```bash
17+
# Basic installation
18+
pip install vllm-judge
19+
20+
# With API support
21+
pip install vllm-judge[api]
22+
23+
# With Jinja2 template support
24+
pip install vllm-judge[jinja2]
25+
26+
# Everything
27+
pip install vllm-judge[dev]
28+
```
29+
30+
## Quick Start
31+
32+
```python
33+
from vllm_judge import Judge
34+
35+
# Initialize with vLLM url
36+
judge = await Judge.from_url("http://localhost:8000")
37+
38+
# Simple evaluation
39+
result = await judge.evaluate(
40+
response="The Earth orbits around the Sun.",
41+
criteria="scientific accuracy"
42+
)
43+
print(f"Decision: {result.decision}")
44+
print(f"Reasoning: {result.reasoning}")
45+
46+
# Using pre-built metrics
47+
from vllm_judge import CODE_QUALITY
48+
49+
result = await judge.evaluate(
50+
response="def add(a, b): return a + b",
51+
metric=CODE_QUALITY
52+
)
53+
54+
# With template variables
55+
result = await judge.evaluate(
56+
response="Essay content here...",
57+
criteria="Evaluate this {doc_type} for {audience}",
58+
template_vars={
59+
"doc_type": "essay",
60+
"audience": "high school students"
61+
}
62+
)
63+
```
64+
65+
## API Server
66+
67+
Run Judge as a REST API:
68+
69+
```bash
70+
vllm-judge serve --base-url http://localhost:8000 --port 9090 --host localhost
71+
```
72+
73+
Then use the HTTP API:
74+
75+
```python
76+
from vllm_judge.api import JudgeClient
77+
78+
client = JudgeClient("http://localhost:9090")
79+
result = await client.evaluate(
80+
response="Python is great!",
81+
criteria="technical accuracy"
82+
)
83+
```
84+

mkdocs.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
site_name: vLLM Judge
2+
site_description: LLM-as-a-Judge evaluations for vLLM hosted models
3+
site_author: Sai Chandra Pandraju
4+
site_url: https://saichandrapandraju.github.io/vllm-judge
5+
repo_url: https://github.com/saichandrapandraju/vllm-judge
6+
7+
8+
theme:
9+
name: material
10+
palette:
11+
- scheme: default
12+
primary: teal
13+
accent: teal
14+
toggle:
15+
icon: material/brightness-7
16+
name: Switch to dark mode
17+
- scheme: slate
18+
primary: teal
19+
accent: teal
20+
toggle:
21+
icon: material/brightness-4
22+
name: Switch to light mode
23+
features:
24+
- navigation.tabs
25+
- navigation.sections
26+
- navigation.expand
27+
- navigation.top
28+
- search.suggest
29+
- search.highlight
30+
- content.tabs.link
31+
- content.code.annotation
32+
- content.code.copy
33+
language: en
34+
icon:
35+
repo: fontawesome/brands/github
36+
37+
plugins:
38+
- search
39+
- mkdocstrings:
40+
handlers:
41+
python:
42+
options:
43+
show_source: false
44+
45+
markdown_extensions:
46+
- pymdownx.highlight:
47+
anchor_linenums: true
48+
- pymdownx.inlinehilite
49+
- pymdownx.snippets
50+
- admonition
51+
- pymdownx.arithmatex:
52+
generic: true
53+
- footnotes
54+
- pymdownx.details
55+
- pymdownx.superfences
56+
- pymdownx.mark
57+
- attr_list
58+
- pymdownx.emoji:
59+
emoji_index: !!python/name:material.extensions.emoji.twemoji
60+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
61+
- pymdownx.tabbed:
62+
alternate_style: true
63+
64+
nav:
65+
- Home: index.md
66+
# - Getting Started:
67+
# - Installation: getting-started/installation.md
68+
# - Quick Start: getting-started/quickstart.md
69+
# - Core Concepts: getting-started/concepts.md
70+
# - User Guide:
71+
# - Basic Evaluation: guide/basic-evaluation.md
72+
# - Using Metrics: guide/metrics.md
73+
# - Template Variables: guide/templates.md
74+
# - Batch Processing: guide/batch.md
75+
# - Advanced Usage: guide/advanced.md
76+
# - API Server:
77+
# - Running the Server: api/server.md
78+
# - API Reference: api/reference.md
79+
# - Client Usage: api/client.md
80+
# - WebSocket API: api/websocket.md
81+
# - Examples:
82+
# - Code Review: examples/code-review.md
83+
# - Content Moderation: examples/content-moderation.md
84+
# - Educational Assessment: examples/education.md
85+
# - A/B Testing: examples/ab-testing.md
86+
# - Reference:
87+
# - Built-in Metrics: reference/metrics.md
88+
# - API Reference: reference/api.md
89+
# - Configuration: reference/config.md
90+
# - Exceptions: reference/exceptions.md

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ docs = [
5959
"mkdocs>=1.5.0",
6060
"mkdocs-material>=9.0.0",
6161
"mkdocstrings[python]>=0.24.0",
62+
"mkdocs-material-extensions>=1.3.1"
6263
]
6364

6465
[project.scripts]

0 commit comments

Comments
 (0)