yongqiang
commited on
Commit
·
6a33ea5
1
Parent(s):
ffa96d0
兼容 gptq config
Browse files- infer_axmodel.py +4 -1
infer_axmodel.py
CHANGED
|
@@ -166,7 +166,10 @@ if __name__ == "__main__":
|
|
| 166 |
prefill_data[image_insert_index : image_insert_index + 256] = vit_output_list[idx][0, :, :]
|
| 167 |
##################################
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
eos_token_id = None
|
| 172 |
if isinstance(cfg.eos_token_id, list) and len(cfg.eos_token_id) > 1:
|
|
|
|
| 166 |
prefill_data[image_insert_index : image_insert_index + 256] = vit_output_list[idx][0, :, :]
|
| 167 |
##################################
|
| 168 |
|
| 169 |
+
if hasattr(config, 'llm_config') and config.llm_config is not None: # 兼容 GPTQ INT4 模型
|
| 170 |
+
cfg = config.llm_config
|
| 171 |
+
else:
|
| 172 |
+
cfg = config
|
| 173 |
|
| 174 |
eos_token_id = None
|
| 175 |
if isinstance(cfg.eos_token_id, list) and len(cfg.eos_token_id) > 1:
|