MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeedExamples / load_transformer_layer

Function load_transformer_layer

Megatron-LM/utils.py:389–393  ·  view source on GitHub ↗
(our, oai, dst2src=False)

Source from the content-addressed store, hash-verified

387 load_weights(oai.c_proj, our.dense, dst2src)
388
389def load_transformer_layer(our, oai, dst2src=False):
390 load_weights(oai.ln_1, our.input_layernorm, dst2src)
391 load_weights(oai.ln_2, our.post_attention_layernorm, dst2src)
392 load_mlp(our.mlp, oai.mlp, dst2src)
393 load_attention(our.attention, oai.attn, dst2src)
394
395def move_weights(our, oai, dst2src=False):
396 """

Callers 1

move_weightsFunction · 0.85

Calls 3

load_weightsFunction · 0.85
load_mlpFunction · 0.85
load_attentionFunction · 0.85

Tested by

no test coverage detected