Embedding
The Embedding layer is used to create word embeddings.
Learn more about Embeddings (opens in a new tab)
Usage
from tinygrad.nn import Embedding
class TinyNet:
def __init__(self, dim, vocab_size=50257):
self.wte = Embedding(vocab_size, dim)
Arguments
vocab_size
The size of the vocabulary. This is the maximum integer index + 1.
embed_size
The dimension of the dense embedding.