Internal change.

PiperOrigin-RevId: 732288967
This commit is contained in:
Phil Culliton 2025-02-28 16:04:54 -08:00 committed by Copybara-Service
parent 2bdf26d81d
commit 7cdb0d3874
1 changed files with 7 additions and 2 deletions

View File

@ -186,11 +186,16 @@ constexpr bool IsNuqStream() {
}
// Instruction-tuned models require extra 'turn structure' tokens in prompts.
enum class PromptWrapping { GEMMA_IT, GEMMA_PT, PALIGEMMA };
enum class PromptWrapping {
GEMMA_IT,
GEMMA_PT,
PALIGEMMA,
kSentinel // must be last
};
inline bool EnumValid(PromptWrapping type) {
return static_cast<int>(type) >= 0 &&
static_cast<int>(type) <= static_cast<int>(PromptWrapping::PALIGEMMA);
static_cast<int>(type) < static_cast<int>(PromptWrapping::kSentinel);
}
// Tensor types for loading weights. Note that not all types are supported as