|
Mila
Deep Neural Network Library
|
Model-fixed configuration for TokenSampler. More...
Public Member Functions | |
| float | getFinalLogitSoftcap () const noexcept |
| int64_t | getVocabularySize () const noexcept |
| void | validate () const |
| Validate configuration parameters. | |
| template<typename Self> | |
| decltype(auto) | withFinalLogitSoftcap (this Self &&self, float softcap) noexcept |
| template<typename Self> | |
| decltype(auto) | withVocabularySize (this Self &&self, int64_t vocab_size) noexcept |
Model-fixed configuration for TokenSampler.
vocab_size is the logits width; final_logit_softcap is the Gemma-style c*tanh(logits/c) cap applied before temperature (0 disables it). Per-request sampling parameters live in GenerateParams (see TokenSampling.md section 4.1).
|
inline |
Validate configuration parameters.
Throws std::invalid_argument on invalid configuration.