1use std::borrow::Cow;
2
3use crate::vendor::{content::ContentType, model as vendor_model};
4
5#[derive(Debug, Clone)]
6pub struct ModelConfig {
7 pub beg_size: usize,
8 pub end_size: usize,
9 pub min_file_size_for_dl: usize,
10 pub padding_token: i32,
11 pub block_size: usize,
12 pub thresholds: Cow<'static, [f32; ContentType::SIZE]>,
13 pub overwrite_map: Cow<'static, [ContentType; ContentType::SIZE]>,
14}
15
16impl ModelConfig {
17 pub(crate) fn features_size(&self) -> usize {
18 self.beg_size + self.end_size
19 }
20}
21
22pub(crate) fn runtime_config() -> ModelConfig {
23 vendor_model::CONFIG.clone()
24}