Files
sunnypilot-byd/tinygrad_repo/test/external/external_test_llama3_ff.py
T
github-actions[bot] de77c89cf6 sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging)
date: 2026-07-21T07:44:02
master commit: 2c334ede443d7391d27575af8c854a095ba702a8
2026-07-21 07:44:02 +00:00

13 lines
346 B
Python

#!/usr/bin/env python3
from tinygrad import Tensor, TinyJit, nn
from extra.models.llama import FeedForward
if __name__ == "__main__":
model = FeedForward(4096, 14336)
for x in nn.state.get_parameters(model): x.replace(x.half()).realize()
jrun = TinyJit(model)
for i in range(5):
print(f"*** run {i}")
jrun(Tensor.rand(1, 4096))