Skip to content

naive_speculate.dependency

Manages dependencies injection.

Exports

DependencyContainer: Contains all assembled dependencies for speculative decoding.

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.