Gemma4 Mtp Decoder#
-
class Gemma4MTPDecoder : public trt_edgellm::rt::DecodingStrategy#
Gemma4 assistant MTP decoder.
This class owns the Gemma4-specific draft-engine binding path. The assistant has no draft KV cache: its
past_key_values_*inputs are zero-copy aliases to the base target KV cache selected bykv_sharing_map.Public Functions
- Gemma4MTPDecoder(
- DecodingRuntimeContext &runtime,
- std::filesystem::path const &engineDir,
- SpecDecodeDraftingConfig const &draftingConfig,
- cudaStream_t stream,
-
inline virtual DecodingStrategyKind kind() const noexcept override#
-
inline virtual char const *name() const noexcept override#
-
inline virtual bool isSpeculative() const noexcept override#
-
virtual bool decodeStep(DecodingInferenceContext &context) override#
-
virtual bool captureCudaGraphs(cudaStream_t stream) override#
- virtual int64_t getRequiredContextMemorySize(
- virtual bool hasSystemPromptKVCache(
- SystemPromptCacheKey const &key,
- virtual void restoreSystemPromptKVCache(
- SystemPromptCacheKey const &key,
- int32_t batchIdx,
- cudaStream_t stream,
- virtual bool runSystemPromptPrefill(
- DecodingInferenceContext &context,
- virtual void saveSystemPromptKVCache(
- SystemPromptCacheKey const &key,
- std::string const &prompt,
- std::vector<tokenizer::Rank> const &tokenizedPrompt,
- int32_t promptIdsLength,
- cudaStream_t stream,