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

Uploaded Source

Built Distribution

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

superduper_vllm-0.7.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for superduper_vllm-0.7.0.tar.gz
Algorithm Hash digest
SHA256 36b1c08e3e0e989db49bf275b0819b1b5285bb2e0174f61f3b41c759eb5334a0
MD5 60aad3bdb558f600b6d442ea879dc930
BLAKE2b-256 ba02204a3e9e39ca7b9f539c152d38f98ad506e5cb4657e633ce7fa994d97f96

See more details on using hashes here.

Provenance

The following attestation bundles were made for superduper_vllm-0.7.0.tar.gz:

Publisher: release_plugins.yaml on superduper-io/superduper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for superduper_vllm-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b404bd89025cf41752d109ce0ed4bb56ae8432a15284c84fd748d12e69fc8b58
MD5 29a9593e314f15ba377fb6b288867e71
BLAKE2b-256 d19bbe12a13a7b65277ec10826735a556bf6acb1070ed916d799d1eab3084097

See more details on using hashes here.

Provenance

The following attestation bundles were made for superduper_vllm-0.7.0-py3-none-any.whl:

Publisher: release_plugins.yaml on superduper-io/superduper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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