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_SERVE_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.0b19.tar.gz
(19.6 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b8eb3ed9885cd8bb6083a3cfaf0cd2bfe1e79118f8a46b20479774a249c6772 |
|
MD5 | 1d03c92a03349e0a3eea4fd21c8248a6 |
|
BLAKE2b-256 | eacbebee909dd3c3f5428543488908b76e25081e05f578016c88af268602f3d8 |
Close
Hashes for scale_llm_engine-0.0.0b19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09771521ab505f145495ac149325ef4133947e074b528e63955bcfb46cc76626 |
|
MD5 | fd9aa13318fd85c08cda1cf222360f3b |
|
BLAKE2b-256 | f85e725c47e5d1240de6d0a703bdce00d366be9faec71a802fdf7442b3969b73 |