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

Function load_tokenizer_conv1d

src/models/chatterbox/s3_tokenizer_impl.cpp:23–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 return lhs.type == rhs.type && lhs.device == rhs.device && lhs.threads == rhs.threads;
22}
23
24S3TokenizerV2Weights::Conv1dWeights load_tokenizer_conv1d(
25 engine::core::BackendWeightStore & store,
26 const engine::assets::TensorSource & source,
27 const std::string & prefix,
28 int64_t out_channels,
29 int64_t in_channels,
30 int64_t kernel,
31 int64_t stride,
32 int64_t padding,
33 engine::assets::TensorStorageType weight_storage_type) {
34 S3TokenizerV2Weights::Conv1dWeights conv;
35 conv.out_channels = out_channels;
36 conv.in_channels = in_channels;
37 conv.kernel = kernel;
38 conv.stride = stride;
39 conv.padding = padding;
40 conv.weight_tensor = store.load_tensor(source, prefix + ".weight", weight_storage_type, {out_channels, in_channels, kernel});
41 conv.bias_tensor = store.load_f32_tensor(source, prefix + ".bias", {out_channels});
42 return conv;
43}
44
45S3TokenizerV2Weights::LayerNormWeights load_tokenizer_layer_norm(

Callers 1

Calls 2

load_tensorMethod · 0.80
load_f32_tensorMethod · 0.80

Tested by

no test coverage detected