| 798 | */ |
| 799 | |
| 800 | struct edgetam_perceiver_layer { |
| 801 | // Cross-attention (latents attend to features) |
| 802 | struct ggml_tensor* ca_norm_latents_w = nullptr; |
| 803 | struct ggml_tensor* ca_norm_latents_b = nullptr; |
| 804 | struct ggml_tensor* ca_norm_x_w = nullptr; |
| 805 | struct ggml_tensor* ca_norm_x_b = nullptr; |
| 806 | struct ggml_tensor* ca_q_w = nullptr; // [64, 64] no bias |
| 807 | struct ggml_tensor* ca_kv_w = nullptr; // [128, 64] no bias |
| 808 | struct ggml_tensor* ca_out_w = nullptr; // [64, 64] no bias |
| 809 | |
| 810 | // FFN after cross-attention |
| 811 | struct ggml_tensor* ff_norm_w = nullptr; |
| 812 | struct ggml_tensor* ff_norm_b = nullptr; |
| 813 | struct ggml_tensor* ff_fc1_w = nullptr; // [256, 64] no bias |
| 814 | struct ggml_tensor* ff_fc2_w = nullptr; // [64, 256] no bias |
| 815 | |
| 816 | // Self-attention on latents |
| 817 | struct ggml_tensor* sa_norm_w = nullptr; |
| 818 | struct ggml_tensor* sa_norm_b = nullptr; |
| 819 | struct ggml_tensor* sa_q_w = nullptr; // [64, 64] no bias |
| 820 | struct ggml_tensor* sa_kv_w = nullptr; // [128, 64] no bias |
| 821 | struct ggml_tensor* sa_out_w = nullptr; // [64, 64] no bias |
| 822 | |
| 823 | // FFN after self-attention |
| 824 | struct ggml_tensor* sa_ff_norm_w = nullptr; |
| 825 | struct ggml_tensor* sa_ff_norm_b = nullptr; |
| 826 | struct ggml_tensor* sa_ff_fc1_w = nullptr; // [256, 64] |
| 827 | struct ggml_tensor* sa_ff_fc2_w = nullptr; // [64, 256] |
| 828 | }; |
| 829 | |
| 830 | struct edgetam_perceiver { |
| 831 | struct ggml_tensor* latents_1d = nullptr; // [256, 64] |
nothing calls this directly
no outgoing calls
no test coverage detected