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

Deployment configuration for Gpt language models. More...

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

Public Member Functions

 GptModelConfig (dim_t context_length)
 Construct with a required context length.
std::string toString () const
Public Member Functions inherited from Mila::Dnn::LanguageModelConfig< GptModelConfig >
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
GptModelConfigwithContextLength (dim_t context_length)
 Set the maximum sequence length.
GptModelConfigwithFP4Quantization ()
 FP4 quantization – FP4 weights, FP8 KV cache.
GptModelConfigwithFP8Quantization ()
 FP8 quantization – FP8 weights, FP8 KV cache.
GptModelConfigwithFullPrecision ()
 Full precision – BF16 weights, BF16 KV cache.
GptModelConfigwithKvCacheCompression (KvCacheCompression kv)
 Set the KV cache compression mode independently.
GptModelConfigwithWeightQuantization (WeightQuantization wq)
 Set the weight quantization mode independently.

Additional Inherited Members

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

Detailed Description

Deployment configuration for Gpt language models.

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

Constructor & Destructor Documentation

◆ GptModelConfig()

Mila::Dnn::GptModelConfig::GptModelConfig ( 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: