Commit
Β·
b09f138
1
Parent(s):
ce61544
Improve README with UV context and clarify BERT-style models
Browse files
README.md
CHANGED
|
@@ -5,13 +5,17 @@ tags: [uv-script, vllm, gpu, inference]
|
|
| 5 |
|
| 6 |
# vLLM Inference Scripts
|
| 7 |
|
| 8 |
-
Ready-to-run scripts for GPU-accelerated inference using [vLLM](https://github.com/vllm-project/vllm).
|
|
|
|
|
|
|
| 9 |
|
| 10 |
## π Available Scripts
|
| 11 |
|
| 12 |
### classify-dataset.py
|
| 13 |
|
| 14 |
-
Batch text classification using BERT-style models with vLLM's optimized inference engine.
|
|
|
|
|
|
|
| 15 |
|
| 16 |
**Features:**
|
| 17 |
- π High-throughput batch processing
|
|
@@ -53,7 +57,7 @@ hfjobs run \
|
|
| 53 |
All scripts in this collection require:
|
| 54 |
- **NVIDIA GPU** with CUDA support
|
| 55 |
- **Python 3.10+**
|
| 56 |
-
- **UV package manager** (
|
| 57 |
|
| 58 |
## π Performance Tips
|
| 59 |
|
|
@@ -76,14 +80,25 @@ vLLM is a high-throughput inference engine optimized for:
|
|
| 76 |
|
| 77 |
## π§ Technical Details
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
### Dependencies
|
| 80 |
-
Scripts use
|
| 81 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
# [[tool.uv.index]]
|
| 83 |
# url = "https://flashinfer.ai/whl/cu126/torch2.6"
|
| 84 |
#
|
| 85 |
# [[tool.uv.index]]
|
| 86 |
# url = "https://wheels.vllm.ai/nightly"
|
|
|
|
| 87 |
```
|
| 88 |
|
| 89 |
### Docker Image
|
|
@@ -106,5 +121,5 @@ Have a vLLM script to share? We welcome contributions that:
|
|
| 106 |
## π Resources
|
| 107 |
|
| 108 |
- [vLLM Documentation](https://docs.vllm.ai/)
|
| 109 |
-
- [
|
| 110 |
- [UV Scripts Organization](https://huggingface.co/uv-scripts)
|
|
|
|
| 5 |
|
| 6 |
# vLLM Inference Scripts
|
| 7 |
|
| 8 |
+
Ready-to-run UV scripts for GPU-accelerated inference using [vLLM](https://github.com/vllm-project/vllm).
|
| 9 |
+
|
| 10 |
+
These scripts use [UV's inline script metadata](https://docs.astral.sh/uv/guides/scripts/) to automatically manage dependencies - just run with `uv run` and everything installs automatically!
|
| 11 |
|
| 12 |
## π Available Scripts
|
| 13 |
|
| 14 |
### classify-dataset.py
|
| 15 |
|
| 16 |
+
Batch text classification using BERT-style encoder models (e.g., BERT, RoBERTa, DeBERTa, ModernBERT) with vLLM's optimized inference engine.
|
| 17 |
+
|
| 18 |
+
**Note**: This script is specifically for encoder-only classification models, not generative LLMs.
|
| 19 |
|
| 20 |
**Features:**
|
| 21 |
- π High-throughput batch processing
|
|
|
|
| 57 |
All scripts in this collection require:
|
| 58 |
- **NVIDIA GPU** with CUDA support
|
| 59 |
- **Python 3.10+**
|
| 60 |
+
- **UV package manager** ([install UV](https://docs.astral.sh/uv/getting-started/installation/))
|
| 61 |
|
| 62 |
## π Performance Tips
|
| 63 |
|
|
|
|
| 80 |
|
| 81 |
## π§ Technical Details
|
| 82 |
|
| 83 |
+
### UV Script Benefits
|
| 84 |
+
- **Zero setup**: Dependencies install automatically on first run
|
| 85 |
+
- **Reproducible**: Locked dependencies ensure consistent behavior
|
| 86 |
+
- **Self-contained**: Everything needed is in the script file
|
| 87 |
+
- **Direct execution**: Run from local files or URLs
|
| 88 |
+
|
| 89 |
### Dependencies
|
| 90 |
+
Scripts use UV's inline metadata with custom package indexes for vLLM's optimized builds:
|
| 91 |
```python
|
| 92 |
+
# /// script
|
| 93 |
+
# requires-python = ">=3.10"
|
| 94 |
+
# dependencies = ["vllm", "datasets", "torch", ...]
|
| 95 |
+
#
|
| 96 |
# [[tool.uv.index]]
|
| 97 |
# url = "https://flashinfer.ai/whl/cu126/torch2.6"
|
| 98 |
#
|
| 99 |
# [[tool.uv.index]]
|
| 100 |
# url = "https://wheels.vllm.ai/nightly"
|
| 101 |
+
# ///
|
| 102 |
```
|
| 103 |
|
| 104 |
### Docker Image
|
|
|
|
| 121 |
## π Resources
|
| 122 |
|
| 123 |
- [vLLM Documentation](https://docs.vllm.ai/)
|
| 124 |
+
- [UV Documentation](https://docs.astral.sh/uv/)
|
| 125 |
- [UV Scripts Organization](https://huggingface.co/uv-scripts)
|