update model_name

This commit is contained in:
jhqxxx
2026-03-30 20:33:48 +08:00
parent db2d3a1eb4
commit ccbe799b90
15 changed files with 106 additions and 175 deletions
+6 -1
View File
@@ -78,6 +78,11 @@ impl FunAsrNanoGenerateModel {
}
let vb = VarBuilder::from_tensors(dict_to_hashmap, dtype, &device);
let fun_asr_nano = FunAsrNanoModel::new(vb, &cfg, &llm_cfg)?;
let model_name = std::path::Path::new(path)
.file_name()
.and_then(|s| s.to_str())
.unwrap_or("fun-asr-nano")
.to_string();
Ok(Self {
tokenizer,
processor,
@@ -87,7 +92,7 @@ impl FunAsrNanoGenerateModel {
eos_token_id1: generation_config.eos_token_id[0] as u32,
eos_token_id2: generation_config.eos_token_id[1] as u32,
generation_config,
model_name: "fun-asr-nano".to_string(),
model_name,
})
}
}