| 175 | } |
| 176 | |
| 177 | MioCodecLinearWeights bind_linear( |
| 178 | const MioCodecWeights & weights, |
| 179 | const std::string & prefix, |
| 180 | int64_t in_features, |
| 181 | int64_t out_features, |
| 182 | bool use_bias = true) { |
| 183 | MioCodecLinearWeights linear; |
| 184 | linear.weight = require_loaded_tensor(weights, prefix + ".weight", {out_features, in_features}); |
| 185 | if (use_bias) { |
| 186 | linear.bias = require_loaded_tensor(weights, prefix + ".bias", {out_features}); |
| 187 | } |
| 188 | return linear; |
| 189 | } |
| 190 | |
| 191 | MioCodecLinearWeights bind_qkv_linear( |
| 192 | MioCodecWeights & weights, |
no outgoing calls
no test coverage detected