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.0b28.tar.gz
(22.5 kB
view hashes)
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b28.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898e6f5bdb1210d9467b4f7ed195cfa375b6f5e60642f670a420927a61fc72ce |
|
MD5 | 16c72c5ebd8dd0e7e8b57d1d01661198 |
|
BLAKE2b-256 | 1a524f6dd366c8b5be88ba523a4898c0f823b7393e27973ce5cf05062359fb9b |
Close
Hashes for scale_llm_engine-0.0.0b28-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a38ec72794c26e8e47d4733da2b5c975817f5087fb7592471a4d6fbd5d54f133 |
|
MD5 | bfbec4ec96d5b7644b9221130675f59f |
|
BLAKE2b-256 | ac5ac62676955ff8c5fd3747d33a2c1847f7ec39f5bb1e0fe5b3d981493f7d0f |