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.3.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.3-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_vllm-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 6d11e24c5013987a5f23ec52d85e2263483171cb1cb432d9f4760676ab4b192e
MD5 cdd7e9dff9f8ffbdf8ff5347e0abf0ac
BLAKE2b-256 be65e4dcbfdf045099ee6ed60d75dbbab81bac790c2b584ffb7b4f6b71bb5a62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simple_vllm-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 28.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 375b17251b296893ed9ab8de95e7cde0e797162ca14b2fd54ccfe5b064c3917d
MD5 996a5e2597dc5a70448497af19df4c4d
BLAKE2b-256 6a5091eafad0007da40d9d0303773b65ea5d9f8697d6d61e56bae00f072f8b25

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