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.0b14.tar.gz
(18.6 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 062da395961af9cb15fd462d139d91ae6f936c90a4d78ff6b104a443435e0b1e |
|
MD5 | 02583f4262f07f878ad81647d015f566 |
|
BLAKE2b-256 | 5fc517cfff706b224e1e4431d20dfc29b1b7d1cae8b2d04db58e65d9e6f4b5b5 |
Close
Hashes for scale_llm_engine-0.0.0b14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f1fcc989204dab0e84a793624fc066e836242f62ea1dbda66426984132a1fb6 |
|
MD5 | 61ceac670c1b3d0d0df689b23ba49008 |
|
BLAKE2b-256 | ad9e8198db8f7e1d4556e38855a837fe7fb6d4d26e6c39d891f1509ec6b9176f |