naive_speculate.dependency.maker¶
Provide factory functions to conduct creation of various components.
make_autoregressive_decoder(config)
¶
Return an AutoregressiveDecoder instance based on the provided SpeculateConfig.
make_drafter(inferencer)
¶
Return a Drafter instance based on the provided Inferencer.
make_inferencer(language_model, inferencer_type)
¶
Return an Inferencer instance based on the provided LanguageModel and InferencerType.
make_kvcache(kvcache_type)
¶
Return a KVCache instance based on the provided KVCacheType.
make_lm(model_name)
¶
Return a LanguageModel instance based on the provided model name.
make_scorer(language_model)
¶
Return a Scorer instance based on the provided LanguageModel.
make_speculative_decoder(config)
¶
Return a SpeculativeDecoder instance based on the provided SpeculateConfig.