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.0b18.tar.gz
(19.4 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29273bf2df0d4edce77bf2bf015300587103b0165a8e29085e2b7342f3121c8b |
|
MD5 | 2cd34b478b9285d0eec4599164b21c47 |
|
BLAKE2b-256 | fdbd88d4267d0b624c7cc26686712118271f15c4345e8d0060beee138512242c |
Close
Hashes for scale_llm_engine-0.0.0b18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fca32a4dbda75abfa3949272cb1ed50ef74e03fb7dac1e8633b959d6a78d1b1 |
|
MD5 | 23b533e0b0b148090bb6e9c2540ae300 |
|
BLAKE2b-256 | 96bd3dd077b999a76fc65a35b86217858ece238472ae3889904b69e0c93b7ef8 |