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.0b29.tar.gz
(22.5 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b29.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c44a98c3a0a51b15a5a827b8df3e91745f81e854bb64c093698a98ac85d7bc7 |
|
MD5 | 7ff557cbc3a4e839788faac29d1905a7 |
|
BLAKE2b-256 | 89ea86ce13775e4687953fa0244f3f923c5fb99bbdd7ee1ea28588e3f9f48db7 |
Close
Hashes for scale_llm_engine-0.0.0b29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf8197177e606b8a53f644de053d301433bf43b60277e89030fae1b26b6ee86 |
|
MD5 | 5b644639ed165f96d3d48a69ae7d6574 |
|
BLAKE2b-256 | 4774efa1b4bde8558a87210c0c760fa979222d1e6c4812fb05393a2c3b4e6fe7 |