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.0b21.tar.gz
(20.0 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea629fdccc5586ec29884df585b457cdf1212667481a5533a88d25126de7014b |
|
MD5 | 2208acfc86793652c75197d5ea0e5fa7 |
|
BLAKE2b-256 | 2dd4ff846311ace04eab63885f11395d90d0199619c51021cc29f9bf0905c4d4 |
Close
Hashes for scale_llm_engine-0.0.0b21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6e86f4354d93bc478cfd8403906e6a6dfc0836f37be7763f865d41ab23a994 |
|
MD5 | 93ec1b6fe73f2602cc213e8005fdb17c |
|
BLAKE2b-256 | b2a54fc6e4c3c5e1df1ae0cfcd6873d890e3b2d83136f73d99e7ec81a664559f |