InternLM / InternLM/xtuner

微调后的模型格式转换为 Xtuner / HF / LLaVA 的问题

Open
#848 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.2k
Forks
448
Avg merge
3d 15h
Merged PRs (30d)
26

Description

## 问题-1
你好,当我运行脚本`llava_llama3_8b_instruct_qlora_clip_vit_large_p14_336_e1_gpu1_finetune.py`后,对保存后的模型进行格式转换,`.pth` --> `xtuner`格式,文件结构如下:
截屏2024-07-17 下午9 11 58
这个模型结构与开源的模型文件结构不同,这是为什么?
**xtuner/llava-llama-3-8b-v1_1** 结构如下:
截屏2024-07-17 下午9 15 17

## 问题-2
如果将基于 QLoRA方式微调后的模型转换为 huggingface 格式,会抛出异常信息如下:
```
self.to_huggingface_llava(cfg, save_dir, fp32,
File "/root/autodl-tmp/xtuner/xtuner/model/llava.py", line 420, in to_huggingface_llava
assert getattr(self.llm, 'hf_quantizer', None) is None, \
AssertionError: This conversion format does not support quantized LLM.
```
请问这是什么原因?是否目前不支持量化版模型格式转换呢?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.