VLLM & Unsloth Wrapper for simple local inference.
Project description
EasyVLLM - A very simple unsloth + vllm wrapper to allow for easy generation locally.
"Does what is says on the tin." - By a good friend.
Getting Started:
- Installation:
pip3 install easy_vllm
- Running:
from simple_vllm import get_vllm_generator
# Create the client.
client = get_vllm_generator(
model_name="Qwen/Qwen2.5-3B-Instruct",
max_seq_length = 4096,
gpu_memory_utilization=0.5,
load_in_4bit = True,
)
# Create a messages object in OpenAI format.
messages = [
{
"role" : "user",
"content" : "Hello, could you tell me how to become a better human?",
},
]
# Get the response as list of str
responses = client.generate(
messages,
num_generations=1,
max_completion_tokens=100,
temperature=0.0,
)
# print response.
print(responses[0]) #this will print the model output.
(C) - Nikolai Rozanov, 2025 - Present
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simple_vllm-0.0.1.tar.gz
(40.9 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 simple_vllm-0.0.1.tar.gz.
File metadata
- Download URL: simple_vllm-0.0.1.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd75f08acac10ec32acf4acd154c04c291af66244b94292b6f570e0d66fcc8e7
|
|
| MD5 |
5fddf26d0afe26aa90ff770b50909042
|
|
| BLAKE2b-256 |
acf755298c4dc6a54062e9673b26f5192133376f12928d286a9273ec0bf94108
|
File details
Details for the file simple_vllm-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simple_vllm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8141e7edeb235680d6d1b7bbb64dd2a3371b965b34066889fa15d2ae0a5d511
|
|
| MD5 |
56af01692bd4b6cc40fed7908cb3d0ed
|
|
| BLAKE2b-256 |
31a422421acbb5d141f33cffb7ee155446ea44ef528fe826a8668c0e81e0be32
|