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.0b30.tar.gz
(23.0 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b30.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a59230ac2a104feaeb8a3b861b8aa4e746a9edb3b721208cc9bc58a835bb703 |
|
MD5 | 165c0e921816bcce1137eb7aa347dff9 |
|
BLAKE2b-256 | c450f02e555585142158775681f8d4e81d37ae7d36cf6d584c525eb4957c22fb |
Close
Hashes for scale_llm_engine-0.0.0b30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 361538719c6a667addfa2dc00bd54d937d6610f90027117d3e9f17b2b029d225 |
|
MD5 | 66dc73e6c1b4a3fa1f7db1be72033013 |
|
BLAKE2b-256 | eca4a85e7ec90703c7e9d788b6b78450c4513f7743d4d4094908fa2223f9a0f5 |