xtuner icon indicating copy to clipboard operation
xtuner copied to clipboard

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

Open TGLTommy opened this issue 1 year ago • 1 comments

问题-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.

请问这是什么原因?是否目前不支持量化版模型格式转换呢?

TGLTommy avatar Jul 17 '24 13:07 TGLTommy

same problem using QLoRA to finetune llava_llama3_8b_instruct AssertionError: This conversion format does not support quantized LLM.

ditto66 avatar Jul 23 '24 04:07 ditto66