Scale LLM Engine Python client
Project description
LLM Engine
The LLM Engine Python library provides a convenient way of interfacing with a
llmengine
endpoint running on
LLM Engine or on your own infrastructure.
Get Started
Install
pip install scale-llm-engine
Usage
If you are using LLM Engine, you can get your API key from
https://spellbook.scale.com/settings.
Set the SCALE_API_KEY
environment variable to your API key.
If you are using your own infrastructure, you can set the
LLM_ENGINE_BASE_PATH
environment variable to the base URL of your
self-hosted llmengine
endpoint.
from llmengine import Completion
response = Completion.create(
model="llama-2-7b",
prompt="Hello, my name is",
max_new_tokens=10,
temperature=0.2,
)
print(response.outputs[0].text)
Documentation
Documentation is available at https://scaleapi.github.io/llm-engine/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scale_llm_engine-0.0.0b42.tar.gz
.
File metadata
- Download URL: scale_llm_engine-0.0.0b42.tar.gz
- Upload date:
- Size: 60.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34accbc58075d50f6295291ecb6312005b2b9c3cd79cd251e8347940b209d42c |
|
MD5 | 6c40df9ddf5c4dc05fbd6663b8f6894d |
|
BLAKE2b-256 | 69eec9f479d1c447c6683f48953adc58066a4feb911ae1bc1246602c7815a640 |
File details
Details for the file scale_llm_engine-0.0.0b42-py3-none-any.whl
.
File metadata
- Download URL: scale_llm_engine-0.0.0b42-py3-none-any.whl
- Upload date:
- Size: 68.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8fa2dac2390eb8349bf6825cf4c4630e5819451ae31d9a0ebad45bf93bf7474 |
|
MD5 | e36e4624efbb2a8415b31166fc684531 |
|
BLAKE2b-256 | e08b823b84acded55f0b701e684f4b1e54e1f8db3e46d5cc396e689e7ec6451e |