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.0b20.tar.gz
(20.0 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e76a98b8cfc14594b3867283fe2b5c30676f363b124c8b9b9b38de9d0be7a5f6 |
|
MD5 | 99fbaeab07457d91e787324615bf6cee |
|
BLAKE2b-256 | 2d6ebab58f601ca0abc0454f0a6058ca5fee03ac291ddb23b09130765b3358ec |
Close
Hashes for scale_llm_engine-0.0.0b20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637349d7ed24852c0edf0dafd5bab37b5af4e7dd79ef37b1cc56ddd46acf84cd |
|
MD5 | 805c60f843a8e6eb8bb33d08127d9c19 |
|
BLAKE2b-256 | 98c7da92bcef705f77ea349d03670ba04b917f5c93655ef889f371b2a6624991 |