Skip to main content

VLLM & Unsloth Wrapper for simple local inference.

Project description

SimpleVLLM - A very simple unsloth + vllm wrapper to allow for easy generation locally.

"Does what is says on the tin." - good friend.

Getting Started:

  1. Installation:
pip3 install simple_vllm

Note: this will take time, as you are install vllm and unsloth.

  1. Running:
from simple_vllm import get_vllm_generator

# Create the client.
llm = get_vllm_generator(model_name="Qwen/Qwen2.5-3B-Instruct")

# Get the response as list of str
responses = llm("Hello, could you tell me how to become a better human")

print(responses[0])

More Advanced examples and parameters:

from simple_vllm import get_vllm_generator

# Create the client.
llm = 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 = llm(
    messages, 
    num_generations=1,
    max_completion_tokens=100,
    temperature=0.0,
    # other params are also possible have a look inside: simple_vllm/llm.py
    )

# print response.
print(responses[0])

# generate again just using a string input this time, without having to reload the model.
llm("tell me something about life.", max_completion_tokens=10

(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.2.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_vllm-0.0.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file simple_vllm-0.0.2.tar.gz.

File metadata

  • Download URL: simple_vllm-0.0.2.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for simple_vllm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dc7542f6ad33718df389aac09b77fb5635e3874234662f2ae509fb6d17ee3125
MD5 dd5cd0798670427a94ce47a0d67073dc
BLAKE2b-256 25db4fe94bbc62e2f0de470ace5d3a80456655be1163666dc65c30ead7bb2fcb

See more details on using hashes here.

File details

Details for the file simple_vllm-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: simple_vllm-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for simple_vllm-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4728814529ff99a3672360961c2eea755e277fd9b1879f316c4b6c88c7a618ad
MD5 645c52de91c883ac6ff52a3f0f7060e5
BLAKE2b-256 3ca8223026dc226da3642fe3b2cdb8faab0f4f6541821c7cd7f047ef3404b509

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page