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_SERVE_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.0b11.tar.gz
(18.0 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bbfd05bf49b2c682ad3e7c27c3b8f1f91cd2ab416cd90593b55f1b7147c53a7 |
|
MD5 | f001ed80a1677f6447c747862009cdfb |
|
BLAKE2b-256 | c271050d11355e73826b220d5e62a773ff70483801384ca6e37aa5214533b05f |
Close
Hashes for scale_llm_engine-0.0.0b11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e8bf69262f8929f3fb2c2744e97eb915199f86e5545f1e0da755445a604101 |
|
MD5 | b80fa0f97e51db741d7a70bd2da3f4af |
|
BLAKE2b-256 | 361ee034b720545030541deb1bcef700f47ea627497b96ed2823a5b38549de29 |