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

Function write_causal_prefill_mask

src/models/vibevoice/decoder.cpp:296–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294VibeVoiceQwen2Weights load_vibevoice_decoder_weights(
295 const VibeVoiceAssets & assets,
296 ggml_backend_t backend,
297 core::BackendType backend_type,
298 size_t weight_context_bytes,
299 assets::TensorStorageType weight_storage_type) {
300 if (assets.model_weights == nullptr) {
301 throw std::runtime_error("VibeVoice decoder requires model weights");
302 }
303 const auto & config = assets.config.decoder;
304 require_head_dim(config);
305 VibeVoiceQwen2Weights weights;
306 weights.store = std::make_shared<core::BackendWeightStore>(
307 backend,
308 backend_type,
309 "vibevoice.decoder.weights",
310 weight_context_bytes);
311 const auto queue_started = std::chrono::steady_clock::now();
312 weights.token_embedding = weights.store->load_tensor(
313 *assets.model_weights,
314 "model.language_model.embed_tokens.weight",
315 weight_storage_type,
316 {config.vocab_size, config.hidden_size});
317 if (config.tie_word_embeddings) {
318 weights.lm_head = weights.token_embedding;
319 } else {

Callers 2

LayerGraphMethod · 0.85

Calls 6

ggml_backend_tensor_setFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected