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.0b23.tar.gz
(21.5 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b23.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad5c71411c49b3244ee52319c345acbea229ee3fb25e11d35e9dae1d5b3920b |
|
MD5 | e8a674198cee7cd0f8af18b8eae6d3b4 |
|
BLAKE2b-256 | 38c696d21b8cd20e98b9159d6fde3db929a3cfa897fd0340916a88fcb152863a |
Close
Hashes for scale_llm_engine-0.0.0b23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2100d51b32724d745e4e4f488d2571e71779d396dbe554963332568a23fe9b |
|
MD5 | 455ce5da41d05563f3e06a198882f778 |
|
BLAKE2b-256 | f7e7907c322f8c2b17163af9a1382411191ce5e91be0c85501b420d7a99dd218 |