entrenar/inference.rs
1//! Inference — model inference and serving utilities
2//!
3//! Provides inference endpoints isolated from training loops
4//! to prevent hidden feedback loops (MTD-09: Feedback Loop Detection).
5//!
6//! Training and inference are strictly separated:
7//! - Training reads from data, writes model weights
8//! - Inference reads model weights, serves predictions
9//! - No inference output feeds back into training data
10
11/// Inference configuration
12#[derive(Debug, Clone)]
13pub struct InferenceConfig {
14 /// Model checkpoint path
15 pub model_path: String,
16 /// Maximum sequence length for inference
17 pub max_seq_len: usize,
18 /// Whether to use greedy decoding
19 pub greedy: bool,
20}
21
22impl Default for InferenceConfig {
23 fn default() -> Self {
24 Self { model_path: String::new(), max_seq_len: 2048, greedy: true }
25 }
26}