MCPcopy
hub / github.com/karpathy/autoresearch / has_ve

Function has_ve

train.py:47–49  ·  view source on GitHub ↗

Returns True if layer should have Value Embedding (alternating, last always included).

(layer_idx, n_layer)

Source from the content-addressed store, hash-verified

45
46
47def has_ve(layer_idx, n_layer):
48 """Returns True if layer should have Value Embedding (alternating, last always included)."""
49 return layer_idx % 2 == (n_layer - 1) % 2
50
51
52def apply_rotary_emb(x, cos, sin):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected