| 703 | } |
| 704 | |
| 705 | core::TensorValue linear( |
| 706 | core::ModuleBuildContext & ctx, |
| 707 | const core::TensorValue & input, |
| 708 | const modules::LinearWeights & weights) { |
| 709 | if (weights.weight.shape.rank != 2) { |
| 710 | throw std::runtime_error("VibeVoice tokenizer Linear weight must be rank 2"); |
| 711 | } |
| 712 | return modules::LinearModule({ |
| 713 | weights.weight.shape.dims[1], |
| 714 | weights.weight.shape.dims[0], |
| 715 | weights.bias.has_value(), |
| 716 | GGML_PREC_DEFAULT}).build(ctx, input, weights); |
| 717 | } |
| 718 | |
| 719 | core::TensorValue tokenizer_block( |
| 720 | core::ModuleBuildContext & ctx, |
no test coverage detected