update model_name
This commit is contained in:
@@ -42,7 +42,11 @@ impl<'a> Qwen3GenerateModel<'a> {
|
||||
let generation_config_path = path.to_string() + "/generation_config.json";
|
||||
let generation_config: Qwen3GenerationConfig =
|
||||
serde_json::from_slice(&std::fs::read(generation_config_path)?)?;
|
||||
|
||||
let model_name = std::path::Path::new(path)
|
||||
.file_name()
|
||||
.and_then(|s| s.to_str())
|
||||
.unwrap_or("qwen3")
|
||||
.to_string();
|
||||
Ok(Qwen3GenerateModel {
|
||||
chat_template,
|
||||
tokenizer,
|
||||
@@ -51,7 +55,7 @@ impl<'a> Qwen3GenerateModel<'a> {
|
||||
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: "qwen3".to_string(),
|
||||
model_name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user