Skip to main content

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.0b41.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

scale_llm_engine-0.0.0b41-py3-none-any.whl (68.1 kB view details)

Uploaded Python 3

File details

Details for the file scale_llm_engine-0.0.0b41.tar.gz.

File metadata

  • Download URL: scale_llm_engine-0.0.0b41.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.14

File hashes

Hashes for scale_llm_engine-0.0.0b41.tar.gz
Algorithm Hash digest
SHA256 af518abf692d5e4131c8b46041616e506be2e8904eb6868553a795892ae606d2
MD5 11a4ce03cbd9ecf14faa91d4e8935344
BLAKE2b-256 a1bd4cf81cf3b6ed625c63187c3417fec8917911068ae4287591fc693f7a6b7a

See more details on using hashes here.

File details

Details for the file scale_llm_engine-0.0.0b41-py3-none-any.whl.

File metadata

  • Download URL: scale_llm_engine-0.0.0b41-py3-none-any.whl
  • Upload date:
  • Size: 68.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.14

File hashes

Hashes for scale_llm_engine-0.0.0b41-py3-none-any.whl
Algorithm Hash digest
SHA256 62848d6eb0d7a9cd7c748ffcbf29d0805a1e9bdd7819d98ee2fd6a297c388647
MD5 ba31cd7f0ea7f8a42f72f5916fb56d15
BLAKE2b-256 dbf759196194d69bfcf4bc0a2c0112d6287a9b0b9184b9a2fbf6e37239144435

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page