MCPcopy Create free account
hub / github.com/THUDM/GLM / load_transformer_layer

Function load_transformer_layer

utils.py:446–450  ·  view source on GitHub ↗
(our, oai, dst2src=False)

Source from the content-addressed store, hash-verified

444
445
446def load_transformer_layer(our, oai, dst2src=False):
447 load_weights(oai.ln_1, our.input_layernorm, dst2src)
448 load_weights(oai.ln_2, our.post_attention_layernorm, dst2src)
449 load_mlp(our.mlp, oai.mlp, dst2src)
450 load_attention(our.attention, oai.attn, dst2src)
451
452
453def move_weights(our, oai, dst2src=False):

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