From 9f3e74813bea44411274e2f08c8ad1dcd1cc9e86 Mon Sep 17 00:00:00 2001 From: AllentDan <41138331+AllentDan@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:05:54 +0800 Subject: [PATCH] Fix internvl2-40b awq inference (#2023) --- lmdeploy/turbomind/deploy/source_model/internvl.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lmdeploy/turbomind/deploy/source_model/internvl.py b/lmdeploy/turbomind/deploy/source_model/internvl.py index 7f5a7c6ff..6b4dc2beb 100644 --- a/lmdeploy/turbomind/deploy/source_model/internvl.py +++ b/lmdeploy/turbomind/deploy/source_model/internvl.py @@ -94,6 +94,11 @@ class InternVLAwqReader(LlamaAwqReader): norm_weight_key = 'language_model.model.norm.weight' output_weight_key = 'language_model.lm_head.weight' + def __init__(self, new_params: dict, unused_params: dict, last_bin: bool, + model_cfg: dict): + model_cfg = model_cfg.get('llm_config') + super().__init__(new_params, unused_params, last_bin, model_cfg) + class InternVL2AwqReader(InternLM2AwqReader): """InternVLReader for InternLM2 model."""