update init
This commit is contained in:
@@ -31,8 +31,8 @@ pub struct Qwen2_5VLGenerateModel<'a> {
|
||||
im_end_id: u32,
|
||||
}
|
||||
|
||||
impl<'a> GenerateModel for Qwen2_5VLGenerateModel<'a> {
|
||||
fn init(path: &str, device: Option<&Device>, dtype: Option<DType>) -> Result<Self> {
|
||||
impl<'a> Qwen2_5VLGenerateModel<'a> {
|
||||
pub fn init(path: &str, device: Option<&Device>, dtype: Option<DType>) -> Result<Self> {
|
||||
let chat_template = ChatTemplate::init(path)?;
|
||||
let tokenizer = TokenizerModel::init(path)?;
|
||||
let config_path = path.to_string() + "/config.json";
|
||||
@@ -57,6 +57,9 @@ impl<'a> GenerateModel for Qwen2_5VLGenerateModel<'a> {
|
||||
im_end_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> GenerateModel for Qwen2_5VLGenerateModel<'a> {
|
||||
|
||||
fn generate(&mut self, mes: ChatCompletionParameters) -> Result<ChatCompletionResponse> {
|
||||
let mut logit_processor = get_logit_processor(mes.temperature, mes.top_p);
|
||||
|
||||
Reference in New Issue
Block a user