mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-12 21:02:13 +08:00
33d5cfc393
date: 2025-12-18T23:23:16 master commit: 3cdee7b54718ee14bd85befd6c5bad3d699c5479
11 lines
244 B
Python
11 lines
244 B
Python
from tinygrad import Tensor, nn
|
|
|
|
if __name__ == "__main__":
|
|
vocab_size = 50257
|
|
n_embd = 768
|
|
lm_head = nn.Linear(n_embd, vocab_size, bias=False)
|
|
bs = 4
|
|
seq_len = 1024
|
|
x = Tensor.rand(bs, seq_len, n_embd)
|
|
ret = lm_head(x).realize()
|