Mtp Decoder#
-
class MTPDecoder : public trt_edgellm::rt::DecodingStrategy#
Public Functions
- MTPDecoder(
- DecodingRuntimeContext &runtime,
- SpecDecodeDraftingConfig const &draftingConfig,
- std::unique_ptr<EngineExecutor> draftExecutor,
- ExternalWeightManager draftWeights,
- 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 DecodingKvHeadroom requiredKvHeadroom() const override#
-
virtual bool decodeStep(DecodingInferenceContext &context) override#
-
virtual bool captureCudaGraphs(cudaStream_t stream) override#
- virtual bool initializeForGeneration(
- DecodingInferenceContext &context
Hybrid+MTP endpoint reuse runs the draft prefill pre-publication (mirrors EagleDecoder). Default MTP keeps its decode-round-0 draft prefill: this override is a no-op unless context.hybridMtpEndpointReuse is set.
- 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