#pragma once
#include "ggml.h"
struct ggml_context;
struct ggml_tensor;
struct ggml_cgraph;
namespace transcribe::cohere {
struct CohereHParams;
struct CohereWeights;
struct EncoderDumps {
ggml_tensor * mel_in = nullptr;
ggml_tensor * pre_encode_out = nullptr;
ggml_tensor * pos_emb = nullptr;
ggml_tensor * block0_out = nullptr;
ggml_tensor * block_mid_out = nullptr; ggml_tensor * block_last_out = nullptr; ggml_tensor * final_out = nullptr;
ggml_tensor * enc_dec_proj_out = nullptr;
};
struct EncoderBuild {
ggml_tensor * mel_in = nullptr;
ggml_tensor * pos_emb_in = nullptr;
ggml_tensor * out = nullptr; EncoderDumps dumps {};
ggml_cgraph * graph = nullptr;
};
EncoderBuild build_encoder_graph(ggml_context * compute_ctx,
const CohereWeights & weights,
const CohereHParams & hp,
int n_mel_frames,
ggml_type kv_type = GGML_TYPE_COUNT,
bool use_flash = true,
const char * backend_name = "");
}