Llama-3-CBHybrid

Llama-3-CBHybridM-8B

by Cerebras · Available as an open-weight Hugging Face model

An open-weight 8-billion-parameter text model based on Llama-3.1-8B-Instruct. Its hybrid architecture uses sparse attention in most layers to reduce KV-cache memory during long-context inference.

Text Reasoning Coding
Llama-3-CBHybridM-8B is Cerebras's medium hybrid-attention model for long-context text generation. Rather than using dense attention in every transformer layer, it combines 28 sparse-attention layers with four dense layers. The result is a downloadable Hugging Face model aimed at applications such as document question answering, retrieval-augmented generation, summarization, conversation, few-shot prompting, and code completion where KV-cache memory can become a deployment constraint.
Outputs

What Llama-3-CBHybridM-8B can produce

Text
Inputs

What it can understand

Text
Capabilities

Support features

Prompt caching
Model profile

Performance characteristics

6/10 Reasoning
7/10 Coding
7/10 Speed
9/10 Cost efficiency
Specifications

Technical details

Family Llama-3-CBHybrid
Type General Purpose
Context window 34K tokens
Max output tokens tokens
Release date 2025-03-24
Status Available as an open-weight Hugging Face model
Knowledge cutoff notes

No exact knowledge cutoff is stated in the Cerebras model card or configuration. The model is a fine-tuned derivative of Llama-3.1-8B-Instruct, but the parent model's cutoff should not be automatically assigned to this exact checkpoint.

Model notes

Canonical Hugging Face repository: cerebras/Llama-3-CBHybridM-8B. The model is derived from Meta-Llama-3.1-8B-Instruct and uses Cerebras custom CBHybridLlamaForCausalLM code. It has 28 sparse-attention layers and four dense-attention layers out of 32. The configuration specifies an 8,192-token sliding window, 512 sink tokens, and max_position_embeddings of 33,792. Cerebras reported 1.275 GB KV-cache use at a representative 16K sequence length versus 2.147 GB for the dense Llama-3.1-8B-Instruct baseline. The model card documents optional insertion of eight memory tokens per 256 original tokens. It requires trust_remote_code when loaded with Transformers. No official hosted API price, maximum generated-token limit, knowledge cutoff, web-search support, JSON mode, batch API, or provider-native streaming specification was found for this exact open-weight model. Caching is marked positive only for the model's documented KV-cache architecture, not for a provider prompt-caching service. Licensed under the Llama 3.1 Community License.

Model guide

Cerebras Llama-3-CBHybridM-8B: Lower KV-Cache Memory for Long-Context Inference

Cerebras Llama-3-CBHybridM-8B is an open-weight 8-billion-parameter text-generation model derived from Llama-3.1-8B-Instruct. Its hybrid attention design uses sparse attention in 28 of 32 transformer layers and dense attention in the remaining four, reducing key-value cache memory requirements during long-context inference while retaining broadly comparable long-context performance to the dense baseline.

What is Llama-3-CBHybridM-8B?

Llama-3-CBHybridM-8B is an open-weight causal language model released by Cerebras on March 24, 2025. It generates text and is based on Meta's Llama-3.1-8B-Instruct, but it is not simply the unmodified base checkpoint: Cerebras fine-tuned it using sparse-attention methods from Cerebras Model Zoo 2.4.

The model's main purpose is to make long-context inference more memory-efficient. In a conventional dense transformer, every attention layer can maintain key-value, or KV, cache data for the sequence processed so far. That cache can consume substantial accelerator memory as conversations and documents become longer. Llama-3-CBHybridM-8B replaces most of its dense-attention layers with sparse attention while retaining a smaller number of dense layers for quality and information mixing.

This is a downloadable model rather than a documented hosted Cerebras API offering. The canonical repository is cerebras/Llama-3-CBHybridM-8B on Hugging Face.

How the hybrid attention architecture works

The model has 32 transformer layers. Twenty-eight use sparse lambda-mask attention, while four selected layers retain dense attention. Sparse attention limits which earlier tokens a layer directly attends to, reducing the amount of cached attention state required for long sequences. The dense layers provide broader attention connections at selected points in the network.

Cerebras's configuration specifies an 8,192-token sliding window and 512 sink tokens. Sink tokens are a small set of early positions preserved for attention behavior, while the sliding window limits the main local attention region. The configuration also reports max_position_embeddings of 33,792 tokens. This is the model's documented maximum position setting, not a guarantee that every application will achieve the same usable context after accounting for prompts, generation, memory, and implementation details.

The repository uses custom Cerebras model code. When loading the checkpoint through Transformers, the documented setup requires remote-code trust, typically expressed as trust_remote_code=true. That requirement should be reviewed as part of a deployment's security and dependency policy.

KV-cache memory savings

The clearest reason to choose this model is its attention design. In Cerebras's published comparison at a representative 16K-token sequence length, Llama-3-CBHybridM-8B used 1.275 GB of KV-cache memory, compared with 2.147 GB for the dense Llama-3.1-8B-Instruct baseline. Cerebras described this as approximately 1.6x to 1.7x lower KV-cache memory use.

Lower KV-cache consumption can make a practical difference when serving several simultaneous conversations, processing long documents, or running inference on hardware with limited accelerator memory. It may allow a deployment to support longer prompts or more concurrent requests before memory becomes the limiting factor. The exact benefit will depend on sequence length, precision, batching, implementation, and hardware.

Cerebras reported broadly comparable long-context benchmark performance to the dense baseline and highlighted particularly strong relative results for code completion and few-shot learning in its published LongBench comparison. These are provider-reported results, so they should be treated as claims tied to the tested configurations rather than as a universal guarantee across tasks.

Context, inputs, and outputs

Llama-3-CBHybridM-8B is a text-only model. It accepts text and produces text; it does not natively process images, audio, or video, and it does not generate those media types. Its documented maximum position setting is 33,792 tokens, with an 8,192-token sliding-window configuration and 512 sink tokens.

No separate maximum generated-token limit is documented for this exact checkpoint in the supplied research. In practice, the usable prompt and generation space must be managed within the model configuration and the limits imposed by the loading and serving stack. Applications should test long prompts directly rather than assuming that the maximum position setting represents an unrestricted prompt-plus-output budget.

The model card also documents an optional insert_memory_tokens method. Cerebras reported that inserting eight memory tokens after every 256 original tokens produced the best accuracy in its ablations. This can change how long inputs are represented, but it also adds sequence complexity and should be evaluated for the specific workload rather than enabled automatically.

Capabilities and practical use cases

The model is intended for English text generation and common instruction-following workloads inherited from its Llama-3.1-8B-Instruct starting point. Suitable uses include:

  • Long-document question answering, especially when reducing KV-cache memory is important.
  • Retrieval-augmented generation over retrieved passages and supporting evidence.
  • Summarization of lengthy documents or conversations.
  • Conversational applications with extended interaction histories.
  • Few-shot prompting where several examples must remain in the prompt.
  • Code completion and other text-based programming assistance.
  • Local or self-managed inference using downloadable Safetensors weights.

Its coding capability is best understood as a useful general-model capability rather than a guarantee of specialist software-engineering performance. Cerebras's published results showed strong relative performance for code completion in the tested comparison, but the model is still an 8-billion-parameter checkpoint and should be validated against the languages, repositories, and completion styles that matter to a project.

Speed, cost, and deployment trade-offs

The model has no official hosted token price in the supplied documentation. Because it is distributed as open weights, the financial trade-off is primarily determined by the hardware, hosting arrangement, operational capacity, and engineering work required to run it. It should not be described as having a Cerebras API input or output price.

Reduced KV-cache memory can improve the economics of long-context serving by making better use of available accelerator memory or increasing concurrency. However, it does not mean that every workload will be faster or cheaper. Sparse attention introduces custom implementation behavior, and performance depends on the serving framework and hardware. A dense model may remain simpler to deploy, better supported by a particular inference stack, or preferable for short prompts where cache savings are less important.

The supplied evaluation rates the model's speed and cost favorably, but those ratings are editorial assessments rather than Cerebras-published specifications. They should be treated as comparative guidance, not as a promised tokens-per-second rate or a universal cost result.

Reasoning, tools, and API features

Llama-3-CBHybridM-8B is a general-purpose language model, not a separately documented reasoning model. It can produce step-by-step text when prompted, but the supplied research does not establish a dedicated reasoning mode, reasoning-token budget, or specialized reasoning benchmark.

There is also no verified provider-native tool calling, function calling, web search, structured-output guarantee, batching API, or hosted streaming specification for this exact checkpoint. Developers may be able to build application-level wrappers around its text output, but that should not be confused with a model-level or provider-level tool-use contract. Similarly, JSON-like responses may be requested through prompting, but a distinct verified JSON mode is not documented.

The model's documented KV-cache behavior is different from provider prompt caching. The checkpoint can use a KV cache during inference, but the supplied research does not verify a Cerebras prompt-caching service for this model.

Limitations and licensing

The most important limitation is that this is a custom open-weight implementation rather than a turnkey hosted service. Users are responsible for obtaining and managing the weights, installing compatible dependencies, selecting hardware, monitoring memory, and validating output quality. The requirement to trust custom remote code deserves particular attention in controlled environments.

The model is text-only and has no native image, audio, or video understanding or generation. Its exact knowledge cutoff is not stated in the model card or configuration. The cutoff of the parent Llama-3.1-8B-Instruct model should not automatically be assigned to this derivative.

The checkpoint is licensed under the Llama 3.1 Community License and inherits the applicable Llama 3.1 acceptable-use requirements. Organizations should review those terms before commercial or high-impact deployment.

When to choose Llama-3-CBHybridM-8B

Choose Llama-3-CBHybridM-8B when the workload is text-only, can be served from open weights, and spends enough time at long context lengths for KV-cache memory to matter. It is especially relevant for self-hosted document systems, long-running conversations, retrieval pipelines, and code-completion workloads where reducing memory pressure is more valuable than using a conventional dense architecture.

A dense Llama-family model may be more appropriate when compatibility with standard tooling is the priority, prompts are usually short, or the application needs a simpler and more widely tested deployment path. A hosted model may be preferable when the team does not want to manage GPUs, model files, custom code, scaling, or infrastructure costs. A multimodal model is required for image, audio, or video inputs and outputs, since this checkpoint handles text only. A specialized reasoning or tool-enabled model is a better fit when verified reasoning controls, function calling, web search, or structured-output guarantees are central requirements.

Overall, Llama-3-CBHybridM-8B is best understood as a targeted efficiency variant: its distinguishing value is not a new modality or a hosted API feature, but the use of hybrid sparse and dense attention to reduce memory requirements during long-context text inference.


Answers to Frequently Asked Questions

Does Llama-3-CBHybridM-8B provide hosted API access, tool calling, or multimodal input?
No verified hosted Cerebras API, official token pricing, provider-native tool calling, function calling, web search, structured-output guarantee, or prompt-caching service is documented for this checkpoint. It is a text-only open-weight model and does not natively process or generate images, audio, or video.
What are the main use cases for Llama-3-CBHybridM-8B?
The model is suited to text-only long-context workloads such as document question answering, retrieval-augmented generation, summarization, extended conversations, few-shot prompting, code completion, and self-managed inference with downloadable weights.
What is the context length of Llama-3-CBHybridM-8B?
The model configuration reports 33,792 max position embeddings, along with an 8,192-token sliding window and 512 sink tokens. This setting is not a guarantee of an unrestricted prompt-and-generation budget; usable context depends on the serving framework, memory, prompt length, and generation requirements.
What is Llama-3-CBHybridM-8B?
Llama-3-CBHybridM-8B is an open-weight, text-only causal language model released by Cerebras on March 24, 2025. It is derived from Meta's Llama-3.1-8B-Instruct and uses hybrid sparse and dense attention to reduce KV-cache memory during long-context inference.
How does Llama-3-CBHybridM-8B reduce KV-cache memory?
The model uses sparse lambda-mask attention in 28 of its 32 transformer layers, while four layers retain dense attention. Its configuration includes an 8,192-token sliding window and 512 sink tokens, limiting the amount of attention state that must be cached. Cerebras reported 1.275 GB of KV-cache memory at a representative 16K-token sequence length, compared with 2.147 GB for the dense Llama-3.1-8B-Instruct baseline.


Sources 4
AI Provider

About Cerebras