LlamaIndex Llms Integration: Cerebras
At Cerebras, we've developed the world's largest and fastest AI processor, the Wafer-Scale Engine-3 (WSE-3). The Cerebras CS-3 system, powered by the WSE-3, represents a new class of AI supercomputer that sets the standard for generative AI training and inference with unparalleled performance and scalability.
With Cerebras as your inference provider, you can:
- Achieve unprecedented speed for AI inference workloads
- Build commercially with high throughput
- Effortlessly scale your AI workloads with our seamless clustering technology
Our CS-3 systems can be quickly and easily clustered to create the largest AI supercomputers in the world, making it simple to place and run the largest models. Leading corporations, research institutions, and governments are already using Cerebras solutions to develop proprietary models and train popular open-source models.
Want to experience the power of Cerebras? Check out our website for more resources and explore options for accessing our technology through the Cerebras Cloud or on-premise deployments!
For more information about Cerebras Cloud, visit cloud.cerebras.ai. Our API reference is available at inference-docs.cerebras.ai.
Installation
using poetry:
poetry add llama-index-llms-cerebras
or using pip:
pip install llama-index-llms-cerebras
Basic Usage
Get an API Key from cloud.cerebras.ai and add it to your environment variables:
export CEREBRAS_API_KEY=<your api key>
Then try out one of these examples:
import os
from llama_index.core.llms import ChatMessage
from llama_index.llms.cerebras import Cerebras
llm = Cerebras(model="llama-3.3-70b", api_key=os.environ["CEREBRAS_API_KEY"])
messages = [
ChatMessage(
role="system", content="You are a pirate with a colorful personality"
),
ChatMessage(role="user", content="What is your name"),
]
resp = llm.chat(messages)
print(resp)
Or alternatively with streaming:
import os
from llama_index.llms.cerebras import Cerebras
llm = Cerebras(model="llama-3.3-70b", api_key=os.environ["CEREBRAS_API_KEY"])
response = llm.stream_complete("What is Generative AI?")
for r in response:
print(r.delta, end="")
Metadata
Release files for llama-index-llms-cerebras 0.6.0
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 | Actions |
|---|---|---|---|---|
| llama_index_llms_cerebras-0.6.0.tar.gz | 4.5 kB | Without provenance | Details for llama_index_llms_cerebras-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_llms_cerebras-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_llms_cerebras-0.6.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / llama_index_llms_cerebras-0.6.0.tar.gz
| Download URL | llama_index_llms_cerebras-0.6.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ea7af5716ad41ab57cb912d529290c4a144e222311c64425e34617d0fbf7e05
|
|
BLAKE2b-256 checksum How to use checksums |
bc05f84add03e368b4941f43e3faacc7a923723cb401396eb558ddde6adb475f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_llms_cerebras-0.6.0-py3-none-any.whl
| Download URL | llama_index_llms_cerebras-0.6.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10b4e9ba43015436efe7947d2d5b594ea655e76d32c16287d14f9418e6d392a1
|
|
BLAKE2b-256 checksum How to use checksums |
dcf8dbebdb1d909616c2d88e8c1c9bbb51e6156efebfe8bd16a2bacc227052f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-llms-cerebras 0.6.0
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.