Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::GemmaModelConfig Struct Referenceexport

Deployment configuration for Gemma language models. More...

Inheritance diagram for Mila::Dnn::GemmaModelConfig:
Mila::Dnn::LanguageModelConfig< GemmaModelConfig >

Public Member Functions

 GemmaModelConfig (dim_t context_length)
 Construct with a required context length.
std::string toString () const
Public Member Functions inherited from Mila::Dnn::LanguageModelConfig< GemmaModelConfig >
std::string baseToString () const
 Produce the base fields portion of a toString() summary.
dim_t getContextLength () const noexcept
KvCacheCompression getKvCacheCompression () const noexcept
dim_t getLanguageModelHeadPositions () const noexcept
WeightQuantization getWeightQuantization () const noexcept
GemmaModelConfig & withContextLength (dim_t context_length)
 Set the maximum sequence length.
GemmaModelConfig & withFP4Quantization ()
 FP4 quantization – FP4 weights, FP8 KV cache.
GemmaModelConfig & withFP8Quantization ()
 FP8 quantization – FP8 weights, FP8 KV cache.
GemmaModelConfig & withFullPrecision ()
 Full precision – BF16 weights, BF16 KV cache.
GemmaModelConfig & withKvCacheCompression (KvCacheCompression kv)
 Set the KV cache compression mode independently.
GemmaModelConfig & withLanguageModelHeadPositions (dim_t positions)
 Positions the language-model head evaluates per pass.
GemmaModelConfig & withPrecisionPlan ()
 The family's designed per-role allocation, from a pre-quantized artifact.
GemmaModelConfig & withWeightQuantization (WeightQuantization wq)
 Set the weight quantization mode independently.

Additional Inherited Members

Protected Attributes inherited from Mila::Dnn::LanguageModelConfig< GemmaModelConfig >
dim_t context_length_
KvCacheCompression kv_cache_compression_
dim_t language_model_head_positions_
WeightQuantization weight_quantization_

Detailed Description

Deployment configuration for Gemma language models.

Inherits all fluent setters and accessors from LanguageModelConfig<GemmaModelConfig>.

Constructor & Destructor Documentation

◆ GemmaModelConfig()

Mila::Dnn::GemmaModelConfig::GemmaModelConfig ( dim_t context_length)
inlineexplicit

Construct with a required context length.

Parameters
context_lengthMaximum sequence length in tokens. Must be > 0.
Exceptions
std::invalid_argumentif context_length is zero.

The documentation for this struct was generated from the following file: