use crate::backend::cpu::RopeType;
use crate::gguf::GgufFile;
use crate::model::ModelConfig;
use crate::model::transformer::WeightRef;
pub(crate) trait GpuWeightSource {
fn config(&self) -> &ModelConfig;
fn gguf(&self) -> &GgufFile;
fn output_norm_weight(&self) -> &[f32];
fn attn_norm_weight(&self, layer: usize) -> &[f32];
fn ffn_norm_weight(&self, layer: usize) -> &[f32];
fn attn_q_norm_weight(&self, layer: usize) -> Option<&[f32]>;
fn attn_k_norm_weight(&self, layer: usize) -> Option<&[f32]>;
fn conv_weight(&self, layer: usize) -> Option<&[f32]>;
fn attn_q_bias(&self, layer: usize) -> Option<&[f32]>;
fn attn_k_bias(&self, layer: usize) -> Option<&[f32]>;
fn attn_v_bias(&self, layer: usize) -> Option<&[f32]>;
fn rope_freqs(&self) -> Option<&[f32]>;
#[cfg_attr(not(feature = "gpu"), allow(dead_code))]
fn weight_bytes(&self, wref: &WeightRef) -> &[u8];
#[cfg_attr(not(feature = "gpu"), allow(dead_code))]
fn dequantize_weight(&self, wref: &WeightRef) -> Vec<f32>;
fn output_ref(&self) -> Option<&WeightRef>;
fn ffn_gate_ref(&self, layer: usize) -> &WeightRef;
fn ffn_up_ref(&self, layer: usize) -> &WeightRef;
fn ffn_down_ref(&self, layer: usize) -> &WeightRef;
fn conv_in_proj_ref(&self, layer: usize) -> Option<&WeightRef>;
fn conv_out_proj_ref(&self, layer: usize) -> Option<&WeightRef>;
fn attn_q_ref(&self, layer: usize) -> Option<&WeightRef>;
fn attn_k_ref(&self, layer: usize) -> Option<&WeightRef>;
fn attn_v_ref(&self, layer: usize) -> Option<&WeightRef>;
fn attn_output_ref(&self, layer: usize) -> Option<&WeightRef>;
fn rope_type(&self) -> RopeType;
#[cfg_attr(not(feature = "gpu"), allow(dead_code))]
fn supports_batched_prefill(&self) -> bool;
}