Skip to main content

Superduper allows users to work with self-hosted LLM models via [vLLM](https://github.com/vllm-project/vllm).

Project description

superduper_vllm

Superduper allows users to work with self-hosted LLM models via vLLM.

Installation

pip install superduper_vllm

API

Class Description
superduper_vllm.model.VllmChat VLLM model for chatting.
superduper_vllm.model.VllmCompletion VLLM model for generating completions.

Examples

VllmChat

from superduper_vllm import VllmChat
vllm_params = dict(
    model="hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4",
    quantization="awq",
    dtype="auto",
    max_model_len=1024,
    tensor_parallel_size=1,
)
model = VllmChat(identifier="model", vllm_params=vllm_params)
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "hello"},
]

Chat with chat format messages

model.predict(messages)

Chat with text format messages

model.predict("hello")

VllmCompletion

from superduper_vllm import VllmCompletion
vllm_params = dict(
    model="hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4",
    quantization="awq",
    dtype="auto",
    max_model_len=1024,
    tensor_parallel_size=1,
)
model = VllmCompletion(identifier="model", vllm_params=vllm_params)
model.predict("hello")

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

superduper_vllm-0.0.5.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

superduper_vllm-0.0.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file superduper_vllm-0.0.5.tar.gz.

File metadata

  • Download URL: superduper_vllm-0.0.5.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for superduper_vllm-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c16517c5dc18337aca71f1e35b609b6e5f0e90b19fa76f9f98d24ad73ff46754
MD5 a78e5860637469d3f8e893217d425b2a
BLAKE2b-256 8c41d4522e7993d41a04cbee948b3c420d0fdde64bdf1fd7c9664ae7eea736b3

See more details on using hashes here.

File details

Details for the file superduper_vllm-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for superduper_vllm-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f264a4d57023861040825e3be1fdbae119a51c81f8c0bd34fd4db49fc0594ac0
MD5 25bf4147108ba36c1ab2874eb56ddadc
BLAKE2b-256 e96815490af39964a06b67bea725e800a0d349455bd10cf7c3282eb427fa4413

See more details on using hashes here.

Supported by

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