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
scale_llm_engine-0.0.0b32.tar.gz
(22.9 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b32.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ba22220ec6c548b599b36fe042bc12579ee199f267317f2f1a0ba20764c845 |
|
MD5 | fc11d8b3d5519dfd2049502b1209a37b |
|
BLAKE2b-256 | 4e8ad4292a958962289e972cd66d02f09e5aa2fd22b480b7d4cd86cef21f2a5a |
Close
Hashes for scale_llm_engine-0.0.0b32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae0e6119c4e8e22565d16e4040ad8df898388e26f6dc8459de9b84023706a479 |
|
MD5 | 5c2fb64e57a9dcdfbd56ca839a0b8599 |
|
BLAKE2b-256 | 61998352f456d70d22697f826ec93cc09b6ad1a2bb4afd57d519d0cce56b6d97 |