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.0b31.tar.gz
(23.0 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687b1563e5159896e256c472fc2a90ede11440c2c50c3bd84b274e0335ecf6c7 |
|
MD5 | bf7e392b08e9c1260615fe741b4da832 |
|
BLAKE2b-256 | 326acd9736f140d3dbc08ac8009a12545237922b13ce86e1b9afdd94a0f55c00 |
Close
Hashes for scale_llm_engine-0.0.0b31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed317067115981b78aeb7bc089341623b11418eb53f369c037a76c381c134d4 |
|
MD5 | 6c6d885db07477e0c767c0f65f9e5c6b |
|
BLAKE2b-256 | 71d6b594d211e148d9e7dbfee264a7ae6ad13081b08bd1eab788bc995f76ed8c |