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_name="llama-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
Built Distribution
Close
Hashes for scale_llm_engine-0.0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9ce65e056914b01d626d03e16b8b1e1db7c68727de2b14b06b9c92b091baad8 |
|
MD5 | 51d333e1f910235a18bab5c2dc8df4d8 |
|
BLAKE2b-256 | e79324548e5570bdc6bfc2ea98f25d7c8d7f5458f5a5df5cd02fe375537b8d23 |