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.0b24.tar.gz
(21.5 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff2d6386174b71511ccd00d17353c5863b60736bfbe77284b024f8bb423a99e0 |
|
MD5 | b68baf7aed090c55d72fb1d336711152 |
|
BLAKE2b-256 | 9ad37521a588ed25bcfa6579d64e3a0e5c80f11c22bff9bf3f83b851d2ff1011 |
Close
Hashes for scale_llm_engine-0.0.0b24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e6fd0710e317ff764fa6a80f9db6b11c71874be3e2a200543f4dafe9ecd351 |
|
MD5 | a0f601d19e81f80e9220dbb867590bc6 |
|
BLAKE2b-256 | 01b8f992e333f3c5a65b2491735af08d9449d995c2fdd1ac5b0bda237a0a4099 |