Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx-examples
/ encode
Method
encode
llms/speculative_decoding/model.py:292–293 ·
view source on GitHub ↗
(self, inputs: mx.array)
Source
from the content-addressed store, hash-verified
290
self.reset_cache()
291
292
def
encode(self, inputs: mx.array):
293
return
self.encoder(self.wte(inputs))
294
295
def
truncate_cache(self, num_to_truncate):
296
if
num_to_truncate <= 0:
Callers
1
__call__
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected