MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / load_layer

Function load_layer

src/models/stable_audio/t5gemma.cpp:48–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 weights.post_ff_norm = store.load_f32_tensor(source, prefix + ".post_feedforward_layernorm.weight", {config.t5_hidden_size});
47 weights.q_proj = load_linear(
48 store,
49 source,
50 prefix + ".self_attn.q_proj",
51 storage_type,
52 config.t5_attention_heads * config.t5_head_dim,
53 config.t5_hidden_size,
54 false);
55 weights.k_proj = load_linear(
56 store,
57 source,
58 prefix + ".self_attn.k_proj",
59 storage_type,
60 config.t5_kv_heads * config.t5_head_dim,
61 config.t5_hidden_size,
62 false);
63 weights.v_proj = load_linear(
64 store,
65 source,
66 prefix + ".self_attn.v_proj",
67 storage_type,
68 config.t5_kv_heads * config.t5_head_dim,
69 config.t5_hidden_size,
70 false);
71 weights.o_proj = load_linear(
72 store,
73 source,
74 prefix + ".self_attn.o_proj",
75 storage_type,
76 config.t5_hidden_size,
77 config.t5_attention_heads * config.t5_head_dim,
78 false);
79 weights.gate_proj = load_linear(
80 store,
81 source,
82 prefix + ".mlp.gate_proj",
83 storage_type,
84 config.t5_intermediate_size,
85 config.t5_hidden_size,
86 false);
87 weights.up_proj = load_linear(
88 store,
89 source,
90 prefix + ".mlp.up_proj",
91 storage_type,
92 config.t5_intermediate_size,
93 config.t5_hidden_size,
94 false);
95 weights.down_proj = load_linear(
96 store,
97 source,
98 prefix + ".mlp.down_proj",
99 storage_type,
100 config.t5_hidden_size,
101 config.t5_intermediate_size,
102 false);
103 return weights;
104}
105

Callers 1

Calls 2

load_f32_tensorMethod · 0.80
load_linearFunction · 0.70

Tested by

no test coverage detected