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.0b13.tar.gz
(18.5 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66d3cc1e78c2bc639361e9b5675ead17402b462dc2dd8cafc27bb275d3270f98 |
|
MD5 | 6dee5b3b895b45136534a054e7b3e8af |
|
BLAKE2b-256 | 1dd7f18bac5a675cbdec6f49930d7684ba759512470eb263585b01991166f589 |
Close
Hashes for scale_llm_engine-0.0.0b13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6de34b0c8de7197777d49175e0be938b349aa7f4feb8b530485d4b1430127c9d |
|
MD5 | a9cafff5ea0a20cbc93f1cce3d97e096 |
|
BLAKE2b-256 | 083fd5eb4cd106335a6abc81fb811499f11341b741fd009d1231f8ea08b1378e |