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.0b33.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b33.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36d6a871162d9e7639403eb14929d0b973282cde835a73419d250716163740dc |
|
MD5 | 5841c69aa4968778e547bd20ffc9d145 |
|
BLAKE2b-256 | ecc34d13d275c8c38f722a05b776f36224e4fb0cfc679833cb48ad23a058d436 |
Close
Hashes for scale_llm_engine-0.0.0b33-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe95ae337dd5b3d97d39d65f4f215220a99abbc4e2d3e088a7e72083b42b21c |
|
MD5 | d723d499c3ca6e8a62d17b55ec20f1cc |
|
BLAKE2b-256 | 5f4db739f11930c2ee629cda9d848662fdd4e9d03e235f316018b5b7b26d8685 |