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

Method run_step

src/models/vevo2/ar.cpp:808–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806 }
807 }
808
809 ggml_backend_t backend = nullptr;
810 core::BackendType backend_type = core::BackendType::Cpu;
811 int threads = 1;
812 std::shared_ptr<const Vevo2ARWeights> weights;
813 int64_t cache_steps = 0;
814 std::unique_ptr<ggml_context, GgmlContextDeleter> ctx;
815 ggml_tensor * token_id = nullptr;
816 ggml_tensor * positions = nullptr;
817 ggml_tensor * attention_mask = nullptr;
818 ggml_tensor * logits = nullptr;
819 std::vector<ggml_tensor *> key_sources;
820 std::vector<ggml_tensor *> value_sources;
821 std::vector<std::vector<ggml_tensor *>> key_destinations;
822 std::vector<std::vector<ggml_tensor *>> value_destinations;
823 std::vector<ggml_fp16_t> attention_mask_values;
824 runtime::TransformerKVCache step_cache;
825 ggml_cgraph * graph = nullptr;
826 ggml_backend_buffer_t buffer = nullptr;
827};
828
829Vevo2AutoregressiveRuntime::Vevo2AutoregressiveRuntime(
830 std::shared_ptr<const Vevo2Assets> assets,
831 core::ExecutionContext & execution_context,
832 size_t weight_context_bytes,
833 size_t prefill_graph_context_bytes,
834 size_t decode_graph_context_bytes,
835 assets::TensorStorageType weight_storage_type)
836 : assets_(require_assets(std::move(assets))),
837 execution_context_(execution_context),
838 prefill_graph_context_bytes_(prefill_graph_context_bytes),
839 decode_graph_context_bytes_(decode_graph_context_bytes),
840 tokenizer_(assets_),
841 weight_source_(assets_->ar_weights),
842 weights_(load_ar_weights(
843 *assets_,
844 execution_context_.backend(),
845 execution_context_.backend_type(),

Callers 1

Calls 14

ggml_backend_tensor_setFunction · 0.85
ggml_fp32_to_fp16Function · 0.85
set_backend_threadsFunction · 0.85
compute_backend_graphFunction · 0.85
ggml_backend_synchronizeFunction · 0.85
ggml_backend_tensor_getFunction · 0.85
ggml_backend_tensor_copyFunction · 0.85
valid_stepsMethod · 0.45
current_endMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected