MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __init__

Method __init__

llms/speculative_decoding/decoder.py:41–53  ·  view source on GitHub ↗
(
        self,
        model: Model,
        draft_model: Model,
        tokenizer: str,
        num_draft: int = 5,
        delta: float = 0.0,
    )

Source from the content-addressed store, hash-verified

39
40class SpeculativeDecoder:
41 def __init__(
42 self,
43 model: Model,
44 draft_model: Model,
45 tokenizer: str,
46 num_draft: int = 5,
47 delta: float = 0.0,
48 ):
49 self.tokenizer = Tokenizer(tokenizer)
50 self.model = model
51 self.draft_model = draft_model
52 self.num_draft = num_draft
53 self.delta = delta
54
55 def _generate(
56 self,

Callers

nothing calls this directly

Calls 1

TokenizerClass · 0.70

Tested by

no test coverage detected