Returns True if layer should have Value Embedding (alternating, last always included).
(layer_idx, n_layer)
| 45 | |
| 46 | |
| 47 | def 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 | |
| 52 | def apply_rotary_emb(x, cos, sin): |