Deploy with the vLLM plugin
Install the Valen plugin in the official vLLM 0.33.0 image and serve SystemOne and Decisions requests from one GPU.
Use this route when you already run vLLM: the plugin installs into its official environment. To run one prebuilt container instead, see image deployment.
- Linux x86-64 with an NVIDIA GPU and a compatible CUDA driver.
- Docker with NVIDIA Container Toolkit. You can also install the plugin directly in an existing vLLM Python environment.
- The Valen source to build the kit, and a complete checkpoint such as Valen-Decision-1.5-2B.
Build the kit
Build the wheel and kit from the root of the Valen repository, then copy serving-kit/vllm/ and a complete checkpoint to the GPU host.
python -m pip install build
python -m build --wheel serving/vllm
python serving/vllm/build_kit.py \
serving/vllm/dist/valen_vllm-0.1.0.dev2-py3-none-any.whl \
./serving-kit/vllm
Prepare the runtime
Start the official vLLM 0.33.0 image with the kit and the checkpoint mounted. Replace both host paths:
docker run --rm -it --gpus device=0 --ipc=host \
-p 127.0.0.1:8000:8000 \
-v /absolute/path/to/serving-kit/vllm:/opt/valen-kit:ro \
-v /absolute/path/to/Valen-Decision-1.5-2B:/models/Valen-Decision-1.5-2B:ro \
--entrypoint bash \
docker.io/vllm/vllm-openai:v0.33.0
Inside the container, /opt/valen-kit and /models/Valen-Decision-1.5-2B refer to those mounts. In an existing Python environment, substitute the actual paths in the next step.
Install and start
Install the plugin and start the service inside the container:
bash /opt/valen-kit/install.sh
MODEL=/models/Valen-Decision-1.5-2B MODEL_NAME=valen HOST=0.0.0.0 \
CUDA_VISIBLE_DEVICES=0 bash /opt/valen-kit/serve.sh
| Setting | Example | Purpose |
|---|---|---|
MODEL | /models/Valen-Decision-1.5-2B | Complete checkpoint directory |
MODEL_NAME | valen | Model name sent in requests |
HOST / PORT | 0.0.0.0 / 8000 | Listen address and port inside the container |
After startup, access the service from the host at http://127.0.0.1:8000.
Send a request
Send a text request using SystemOne or Decisions:
| Protocol | Request structure | Predicate probability in the example |
|---|---|---|
| SystemOne | state + questions keyed by ID | answers.on_sofa.noul |
| Decisions | input + question list | answers[0].probability |
The request model must match the configured served model name. temperature defaults to 1.0 and must be a finite number greater than zero.
- Decisions
- SystemOne
curl http://127.0.0.1:8000/v1/decisions \
-H 'Content-Type: application/json' \
-d '{
"model": "valen",
"input": "A cat is on the sofa.",
"questions": [
{
"name": "on_sofa",
"type": "predicate",
"instructions": "The cat is on the sofa."
}
],
"temperature": 1
}'
curl http://127.0.0.1:8000/v1/systemone \
-H 'Content-Type: application/json' \
-d '{
"model": "valen",
"state": "A cat is on the sofa.",
"questions": {
"on_sofa": {
"type": "noul",
"instructions": "The cat is on the sofa."
}
},
"temperature": 1
}'
Send an image request
Run python -m pip install requests in the client environment and replace cat.jpg with a local PNG, JPEG, or WebP image. The Python example reads the file, infers its MIME type from the filename, and encodes it as a data URL.
SystemOne uses image_url content blocks in state.messages; Decisions uses input_image content blocks in input. Both examples send the model name valen.
- Decisions
- SystemOne
import base64
import mimetypes
from pathlib import Path
import requests
image_path = Path("cat.jpg")
mime_type = mimetypes.guess_type(image_path.name)[0]
image_b64 = base64.b64encode(image_path.read_bytes()).decode("ascii")
image_url = f"data:{mime_type};base64,{image_b64}"
response = requests.post(
"http://127.0.0.1:8000/v1/decisions",
json={
"model": "valen",
"input": [
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": image_url
},
{
"type": "input_text",
"text": "Inspect this image."
}
]
}
],
"questions": [
{
"name": "animal",
"type": "choice",
"instructions": "Which animal is visible?",
"choices": [
{
"value": "cat",
"description": "A cat"
},
{
"value": "dog",
"description": "A dog"
}
]
}
],
"temperature": 1
},
timeout=120,
)
response.raise_for_status()
print(response.json()["answers"])
import base64
import mimetypes
from pathlib import Path
import requests
image_path = Path("cat.jpg")
mime_type = mimetypes.guess_type(image_path.name)[0]
image_b64 = base64.b64encode(image_path.read_bytes()).decode("ascii")
image_url = f"data:{mime_type};base64,{image_b64}"
response = requests.post(
"http://127.0.0.1:8000/v1/systemone",
json={
"model": "valen",
"state": {
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": image_url
}
},
{
"type": "text",
"text": "Inspect this image."
}
]
}
]
},
"questions": {
"animal": {
"type": "choice",
"instructions": "Which animal is visible?",
"criteria": {
"cat": "A cat",
"dog": "A dog"
}
}
},
"temperature": 1
},
timeout=120,
)
response.raise_for_status()
print(response.json()["answers"])
Supported scope
- Checkpoints: full Valen Qwen3.5 Mixer checkpoints with
shared_stateexecution, on one GPU with TP=PP=1. - Input length: 8192 by default; adjust it with
--max-model-len. - Questions: predicate, choice and score over text and images. Choice takes 1–255 candidates; score takes 2–255 ordered levels. Valen-Decision-1.5 checkpoints also answer bbox questions, which locate a described object in one input image.
- Images: up to 16 per request, each up to 24 MiB encoded and 32 megapixels.
- Video: extract frames and submit them as image inputs.
- Agreement with the native model: on Valen-Decision-1.5 0.8B and 2B, served answers match the native model within 0.02.
- Prefill kernel: the launcher sets
--gdn-prefill-backend triton, the GDN prefill kernel that matches the native model and gives the same answers regardless of batch composition.
See SystemOne and Decisions for question and answer structures.