Files
onepilot/tinygrad_repo/test/external/external_test_embedding.py
Adeeb Shihadeh ba7f7fd7a6 0.9.8 hotfixes
2025-04-07 12:42:46 -07:00

9 lines
206 B
Python

from tinygrad.tensor import Tensor
from tinygrad.nn import Embedding
if __name__ == "__main__":
vocab_size = 50257
dim = 128
test = Embedding(vocab_size, dim)
ret = test(Tensor([[1,2,3]])).numpy()