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.4.0.tar.gz
(13.9 kB
view details)
Built Distribution
File details
Details for the file superduper_vllm-0.4.0.tar.gz
.
File metadata
- Download URL: superduper_vllm-0.4.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf51e137911f320297d12618073de749621e3f223e8a12dd105f197f53d5585e |
|
MD5 | f9fe5d5d458437dc0a56142221e84045 |
|
BLAKE2b-256 | c93881cba0c0e57ed45ecce9d10b45384c068aac9bc4d4c9d1eafbd1bca17e6b |
File details
Details for the file superduper_vllm-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: superduper_vllm-0.4.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 772c9fb3150cb51edb000ee4b9baa654ef3bf7fc1b3fc3b6bfa843424aeae2da |
|
MD5 | 9dc8a71b6587a6cdbc5726d90cf2fcf4 |
|
BLAKE2b-256 | acef958960047124e8f586ae51ad8925615e177bd1968c8bc21c526b1e0bbab2 |