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.0b17.tar.gz
(18.9 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00d50513719ceb12657ee1fb4dfcc06741b555041b31a2d92677f04e67ccd548 |
|
MD5 | 20ba391a09b2911c4a2cf830ad13f7d1 |
|
BLAKE2b-256 | c1176a404da46d2bf47722e96f76199ce15604d5f056bc2b75780a123596d34a |
Close
Hashes for scale_llm_engine-0.0.0b17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36b1ee4338abef70f0791f5fc4a6497974024bd61d0ca661af1415baf12e9f90 |
|
MD5 | f3e4320d1391f3e240f3d577d35bf677 |
|
BLAKE2b-256 | a83c2bd4f2ec5f303e07220e7f8f14ba5a99e9fc9ffb0e7ba644bf95f7f6f591 |