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

Function load_conv

src/models/qwen3_tts/tokenizer_speech_decoder.cpp:240–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 config.num_semantic_quantizers = json::require_i64(decoder, "num_semantic_quantizers");
239 config.sliding_window = json::require_i64(decoder, "sliding_window");
240 config.head_dim = json::require_i64(decoder, "head_dim");
241 config.rope_theta = json::optional_f32(decoder, "rope_theta", config.rope_theta);
242 config.rms_norm_eps = json::optional_f32(decoder, "rms_norm_eps", config.rms_norm_eps);
243 config.upsample_rates = json::require_i64_array(decoder, "upsample_rates");
244 config.upsampling_ratios = json::require_i64_array(decoder, "upsampling_ratios");
245 return config;
246}
247
248Conv1dWeights load_conv(
249 core::BackendWeightStore & store,
250 const assets::TensorSource & source,
251 const std::string & prefix,
252 assets::TensorStorageType storage_type,
253 int64_t in_channels,
254 int64_t out_channels,
255 int64_t kernel,
256 int64_t stride = 1,
257 int64_t dilation = 1,
258 int64_t groups = 1,
259 bool use_bias = true) {
260 Conv1dWeights weights;
261 weights.in_channels = in_channels;
262 weights.out_channels = out_channels;
263 weights.kernel = kernel;
264 weights.stride = stride;
265 weights.dilation = dilation;
266 weights.groups = groups;
267 weights.use_bias = use_bias;
268 weights.weight = store.load_tensor(source, prefix + ".weight", storage_type, {out_channels, in_channels / groups, kernel});

Callers 1

load_weightsFunction · 0.70

Calls 1

load_tensorMethod · 0.80

Tested by

no test coverage detected