MCPcopy
hub / github.com/tinygrad/tinygrad / _run

Method _run

tinygrad/llm/model.py:134–136  ·  view source on GitHub ↗
(x:Tensor, start_pos:int|UOp)

Source from the content-addressed store, hash-verified

132 # we pass in the weights implicitly so we unpack the GGUF on the fly
133 @function(precompile=True, allow_implicit=True)
134 def _run(x:Tensor, start_pos:int|UOp):
135 h = x + self._attention(self.attn_norm(x), start_pos)
136 return (h + self._feed_forward(self.ffn_norm(h))).contiguous()
137 return _run(x, start_pos)
138
139class TransformerBlock(FFNBlock):

Callers

nothing calls this directly

Calls 3

_attentionMethod · 0.95
_feed_forwardMethod · 0.95
contiguousMethod · 0.45

Tested by

no test coverage detected