#pragma once
#include "decoder.h"
#include "mel.h"
#include "transcribe-backend.h"
#include "transcribe-load-common.h"
#include "transcribe-model.h"
#include "transcribe-session.h"
#include "transcribe-tokenizer.h"
#include "weights.h"
#include <cstdint>
#include <string>
#include <vector>
struct ggml_context;
struct ggml_tensor;
struct ggml_backend;
struct ggml_backend_buffer;
struct ggml_backend_sched;
typedef struct ggml_backend * ggml_backend_t;
typedef struct ggml_backend_buffer * ggml_backend_buffer_t;
typedef struct ggml_backend_sched * ggml_backend_sched_t;
namespace transcribe::gigaam {
void apply_family_invariants(transcribe_model & model);
struct GigaamModel final : public transcribe_model {
Tokenizer tok;
GigaamHParams hparams;
GigaamWeights weights;
ggml_context * ctx_meta = nullptr;
transcribe::BackendPlan plan;
transcribe::load_common::WeightStorage weight_storage;
GigaamMelFrontend mel;
HostDecoderWeights host_decoder;
GigaamModel() = default;
~GigaamModel() override;
const transcribe::Tokenizer * tokenizer() const override { return &tok; }
};
struct GigaamSession final : public transcribe_session {
ggml_tensor * encoder_out = nullptr;
std::vector<float> mel_buf;
std::vector<float> pos_buf; std::vector<float> mel_win; std::vector<float> enc_host;
GigaamSession() = default;
~GigaamSession() override;
void on_scratch_released() noexcept override;
};
}