|
Mila
Deep Neural Network Library
|
Deployment configuration for Gemma language models. More...
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 |
| 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 & | 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_ |
| WeightQuantization | weight_quantization_ |
Deployment configuration for Gemma language models.
Inherits all fluent setters and accessors from LanguageModelConfig<GemmaModelConfig>.
|
inlineexplicit |
Construct with a required context length.
| context_length | Maximum sequence length in tokens. Must be > 0. |
| std::invalid_argument | if context_length is zero. |