| 16 | /// Covers Falcon3-1B / 3B / 7B / 10B. |
| 17 | #[derive(Debug, Clone, serde::Deserialize)] |
| 18 | pub struct Falcon3Config { |
| 19 | pub hidden_size: usize, |
| 20 | pub intermediate_size: usize, |
| 21 | pub vocab_size: usize, |
| 22 | pub num_hidden_layers: usize, |
| 23 | pub num_attention_heads: usize, |
| 24 | #[serde(default)] |
| 25 | pub num_key_value_heads: Option<usize>, |
| 26 | pub rms_norm_eps: f64, |
| 27 | #[serde(default = "default_rope")] |
| 28 | pub rope_theta: f32, |
| 29 | #[serde(default)] |
| 30 | pub bos_token_id: Option<u32>, |
| 31 | #[serde(default)] |
| 32 | pub eos_token_id: Option<EosTokenId>, |
| 33 | #[serde(default)] |
| 34 | pub rope_scaling: Option<RopeScaling>, |
| 35 | #[serde(default)] |
| 36 | pub tie_word_embeddings: bool, |
| 37 | #[serde(default = "default_max_position_embeddings")] |
| 38 | pub max_position_embeddings: usize, |
| 39 | #[serde(default)] |
| 40 | pub head_dim: Option<usize>, |
| 41 | } |
| 42 | |
| 43 | impl Falcon3Config { |
| 44 | pub fn from_path(path: &Path) -> Result<Self> { |
nothing calls this directly
no outgoing calls
no test coverage detected