---
title: "Working with vLLM"
description: "This tutorial demonstrates how to use Pixeltable's built-in vLLM integration to run local LLMs with high-throughput inference."
url: "https://www.pixeltable.com/notebooks/working-with-vllm"
updated: "2026-06-12"
---

# Working with vLLM

This tutorial demonstrates how to use Pixeltable's built-in vLLM integration to run local LLMs with high-throughput inference.

- **Type:** Notebook
- **Group:** Providers

## What it covers

- Create a table for chat completions
- Test chat completion
- Comparing models
- Using sampling parameters
- Text generation

## What it uses

- **Install:** `pip install pixeltable vllm`
- **Pixeltable calls:** `vllm.chat_completions()`, `vllm.generate()`, `pxt.create_table()`, `add_computed_column()`, `insert()`

## A look at the code

```python
# Add a computed column that uses vLLM for chat completion
# against the input.

messages = [
    {'role': 'system', 'content': 'You are a helpful assistant.'},
    {'role': 'user', 'content': t.input},
]

t.add_computed_column(
    result=vllm.chat_completions(
        messages, model='Qwen/Qwen2.5-0.5B-Instruct'
    )
)

# Extract the output content from the native vLLM response.

t.add_computed_column(output=t.result.outputs[0].text)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-vllm.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/providers/working-with-vllm
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-vllm.ipynb
