| 64 | /// A single decoder block with depthwise conv mixer + FFN. |
| 65 | #[derive(Debug, Clone)] |
| 66 | struct DecoderBlock { |
| 67 | norm_weight: Tensor, |
| 68 | ffn_norm_weight: Tensor, |
| 69 | eps: f32, |
| 70 | gamma: Tensor, |
| 71 | /// Depthwise conv weight: (channels, 1, 7) — stored as (channels, 7) for manual impl |
| 72 | mixer_weight: Tensor, |
| 73 | mixer_bias: Tensor, |
| 74 | ffn_gamma: Tensor, |
| 75 | ffn_linear1_weight: Tensor, |
| 76 | ffn_linear1_bias: Option<Tensor>, |
| 77 | ffn_linear2_weight: Tensor, |
| 78 | ffn_linear2_bias: Option<Tensor>, |
| 79 | backend: Arc<dyn ComputeBackend>, |
| 80 | } |
| 81 | |
| 82 | /// Manual depthwise conv1d using broadcast_mul + sum. |
| 83 | /// This avoids candle's pathologically slow grouped Conv1d CUDA kernel. |
nothing calls this directly
no outgoing calls
no test coverage detected