Skip to main content
Cerebras is a model provider that serves open source models with an emphasis on speed. The Cerebras CS-3 system, powered by the Wafer-Scale Engine-3 (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. This will help you getting started with ChatCerebras chat models. For detailed documentation of all ChatCerebras features and configurations head to the API reference.

Overview

Integration details

Model features

See the links in the table headers below for guides on how to use specific features.

Setup

To access ChatCerebras models you’ll need to create a Cerebras account, get an API key, and install the @langchain/cerebras integration package.

Credentials

Get an API Key from cloud.cerebras.ai and add it to your environment variables:
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:

Installation

The LangChain ChatCerebras integration lives in the @langchain/cerebras package:

Instantiation

Now we can instantiate our model object and generate chat completions:

Invocation

Json invocation


API reference

For detailed documentation of all ChatCerebras features and configurations head to the API reference.