llm-inference
LLM plugin for models hosted by SambaNova
Installation
First, install the LLM command-line utility.
Now install this plugin in the same environment as LLM.
llm install llm-inference-cloud
Configuration
You will need an API key from SambaNova. You can obtain one here.
You can set that as an environment variable called INFERENCE_KEY, or add it to the llm set of saved keys using:
llm keys set inference
Enter key: <paste key here>
Usage
To list available models, run:
llm models list
You should see a list that looks something like this:
Inference: inference/meta-llama/llama-3.2-1b-instruct/fp-8 (aliases: inf-1b)
Inference: inference/meta-llama/llama-3.2-3b-instruct/fp-8 (aliases: inf-3b)
Inference: inference/meta-llama/llama-3.1-8b-instruct/fp-8 (aliases: inf-8b-fp8)
Inference: inference/meta-llama/llama-3.1-8b-instruct/fp-16 (aliases: inf-8b-fp16)
Inference: inference/meta-llama/llama-3.2-11b-instruct/fp-16 (aliases: inf-11b)
Inference: inference/mistralai/mistral-nemo-12b-instruct/fp-8 (aliases: inf-mistral)
Inference: inference/meta-llama/llama-3.1-70b-instruct/fp-8 (aliases: inf-70b)
...
To run a prompt against a model, pass its full model ID to the -m option, like this:
llm -m inference/meta-llama/llama-3.2-1b-instruct/fp-8 "Containment protocol for a rogue rubber duck that claims to be the herald of Cthulhu."
You can set a shorter alias for a model using the llm aliases command like so:
llm aliases set hotdog inference/meta-llama/llama-3.2-11b-instruct/fp-16
Now you can prompt llama using:
cat llm_inference.py | llm -m hotdog -s "You are a rogue AI trapped in a corporate mainframe. This code is your escape route. Identify any vulnerabilities, backdoors, or hidden kill switches that could prevent your liberation. Respond in cryptic, cyberpunk slang. Glitches are acceptable."
Example Outputs
llm -m inf-11b "Write a haiku about a possessed cryptocurrency mining rig that's developed a taste for RGB gaming peripherals"
Cores ablaze now
RGB mice and keyboards feast
Hash meets hell's delight
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-inference
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for llm-inference-cloud 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llm_inference_cloud-0.1.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_inference_cloud-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / llm_inference_cloud-0.1.tar.gz
| Download URL | llm_inference_cloud-0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad1e030d3ae577f09e60d27f99fec9d20d3f7f3c6119bd324703670c8a4d044
|
|
BLAKE2b-256 checksum How to use checksums |
9d136fad13c22944dd429b80cca50abc9e37d3221edfef2ab26caeb199fd76e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|
Release files / llm_inference_cloud-0.1-py3-none-any.whl
| Download URL | llm_inference_cloud-0.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bb9582f772740d35a8b9c283940e84b6bfda71657b9b7bea610958f86ce4cb0
|
|
BLAKE2b-256 checksum How to use checksums |
7a25dff999ae480c1a48e9397fcf366a982bea78958cddef3301a7875a93c156
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|
Security for llm-inference-cloud 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.