1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! # Yi-1.5
//!
//! 01.AI Yi-1.5 (Young et al., 2024) is a family of bilingual language models
//! (6B / 9B / 34B) based on the LLaMA-2 decoder architecture with:
//!
//! - Extended vocabulary: 64 000 tokens.
//! - Grouped Query Attention: 4 KV heads (6B/9B) or 8 KV heads (34B).
//! - Tied embeddings: `lm_head.weight == embed_tokens.weight`.
//! - High RoPE base θ = 5 000 000 for long-context support.
//! - SwiGLU FFN, no bias.
//! - ChatML chat format (same as Qwen-2).
//!
//! ## Usage
//!
//! ```rust,no_run
//! use trustformers_models::yi::{YiConfig, YiForCausalLM};
//!
//! let config = YiConfig::small_test();
//! let model = YiForCausalLM::new(config)?;
//! let logits = model.forward(vec![1u32, 2, 3])?;
//! # Ok::<(), trustformers_core::errors::TrustformersError>(())
//! ```
pub use format_yi_chat;
pub use YiConfig;
pub use ;
pub use ;