Skip to content

naive_speculate.dependency.container

Provide DependencyContainer, as dependency provider for speculative decoding components.

DependencyContainer

Centralized container for initializing and managing all necessary dependencies.

Specifically, it handles the initialization of the tokenizer, the speculative decoder, and the autoregressive decoder, based on the provided configurations.

Attributes:

Name Type Description
config SpeculateConfig

Configurations used for initializing dependencies.

autoregressive_decoder cached property

The initialized autoregressive decoder instance.

speculative_decoder cached property

The initialized speculative decoder instance.

tokenizer cached property

The initialized tokenizer instance.