MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / draft

Method draft

examples/server/server.py:1170–1178  ·  view source on GitHub ↗
(
        self,
        input_ids: np.ndarray,
        /,
        *,
        seq_id: int,
        max_tokens: Optional[int],
    )

Source from the content-addressed store, hash-verified

1168class DraftProvider(abc.ABC):
1169 @abc.abstractmethod
1170 def draft(
1171 self,
1172 input_ids: np.ndarray,
1173 /,
1174 *,
1175 seq_id: int,
1176 max_tokens: Optional[int],
1177 ) -> np.ndarray:
1178 raise NotImplementedError()
1179
1180 def can_draft(self, input_length: int, /, *, seq_id: int) -> bool:
1181 return True

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected