MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / random_sample

Function random_sample

python/tests/test_dynamic_batch.py:13–15  ·  view source on GitHub ↗
(idx)

Source from the content-addressed store, hash-verified

11
12
13def random_sample(idx):
14 N = int(np.random.rand() * (1024 - 64) + 64)
15 return {"tokens": np.random.rand(N), "length": N, "idx": idx}
16
17
18def count_padding(sample):

Calls

no outgoing calls

Tested by

no test coverage detected