MCPcopy Index your code
hub / github.com/zai-org/CogView / load_transformer_layer

Function load_transformer_layer

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

Source from the content-addressed store, hash-verified

413
414
415def load_transformer_layer(our, oai, dst2src=False):
416 load_weights(oai.ln_1, our.input_layernorm, dst2src)
417 load_weights(oai.ln_2, our.post_attention_layernorm, dst2src)
418 load_mlp(our.mlp, oai.mlp, dst2src)
419 load_attention(our.attention, oai.attn, dst2src)
420
421
422def 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