MCPcopy
hub / github.com/jaymody/picoGPT / linear

Function linear

gpt2.py:20–21  ·  view source on GitHub ↗
(x, w, b)

Source from the content-addressed store, hash-verified

18
19
20def linear(x, w, b): # [m, in], [in, out], [out] -> [m, out]
21 return x @ w + b
22
23
24def ffn(x, c_fc, c_proj): # [n_seq, n_embd] -> [n_seq, n_embd]

Callers 2

ffnFunction · 0.70
mhaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected