Conversation
|
有没有一些数据例子能快跑一些?提供个几条测试数据?(各种模态的) |
|
@Harryjun 上面提供了。 |
音频微调有BUG:已经提了issue:#7552 |
|
请问模型支持全参数微调么? |
支持 |
我试了一下全参数训练,用单张A100去训练,会报显存不足的错误,用8张A100使用deepspeed去训练,会报 |
但是这样下载的是transformers==4.52.4, transformers中没有 Qwen2_5OmniModel,只有Qwen2_5OmniForConditionalGeneration; |
有 |
* preserve image_sizes * preserve image_sizes * init plugin * support audio-text2text lora * nit * support image/video-text2text, audio-text2text * remove args * remove lines * add docs && nit * remove some comments * fix && add merge part script * add license
|
我已经更新了最新的transformers==4.52.4,成功merge了权重,然而并没有找到你上面例子中给出的Qwen2_5OmniModel |
是的 |
您好,就是我现在有一个问题, 我前天安装了训练环境训练qwen-omni,但是我仍然使用的是pip install git+https://github.com/Kuangdd01/transformers.git@qwen25omni这个transformers版本进行的训练,因为训练时间比较长,我今天合并之后,发现没有办法使用官方的transformers和vllm进行推理。 请问我可以直接升级transformers版本,然后进行合并来支持使用官方的transformers和vllm进行推理吗 |
具体是什么报错呢,vllm的报错吗 |
抱歉打扰您。我的具体情况是这样的, 我在6月11号下载了LLaMafactory的代码,但是使用的transformers的版本是用的git+https://github.com/Kuangdd01/transformers.git@qwen25omni的,因为我们没有关注最新的issue。在Omni上进行了全量的sft训练之后,对模型进行了merge。然后我们准备用vllm对该模型进行推理, vllm版本我们没有使用最新的版本,使用的0.8.5.post1, 使用的transformers版本是https://github.com/huggingface/transformers@v4.51.3-Qwen2.5-Omni-preview(使用这两个版本是因为我们用这些版本可以走完Omni的训练和推理流程), 我们不清楚是否因为这些代码在这段时间发生了更改。 现在的情况是,在推理时,vllm可以正常加载原始Qwen-Omni模型,但是用vllm加载merge之后的模型( a=LLM(model="/home/export/base/ycsc_lijt1/lijt1/online1/lxb/LLaMA-Factory/saves/0611_Omni_text/10_criteria_66k/final"))会报错 ”ValueError: Qwen2_5OmniForConditionalGeneration has no vLLM implementation and the Transformers implementation is not compatible with vLLM. Try setting VLLM_USE_V1=0.“ 。 我们目前很疑惑,为什么可以正常加载Omni但是加载sft并merge之后的Omni就会报这个错误。 |
我们解决这个问题了, 在使用vllm加载合并之后的模型时,需要将合并之后的模型中config的architectures字段从”Qwen2_5OmniForConditionalGeneration“手动改成”Qwen2_5OmniModel“,这样vllm就可以直接加载了。 |
好的 我记录一下 |
这个architecture的变化是SFT的过程中产生的吗?能否在merge脚本中修改arch,避免手动步骤? |
最新版的transfomrers代码中移除了 |
使用最新的代码,sft还是会报错:LLaMA-Factory/src/llamafactory/data/mm_plugin.py", line 179, in _validate_input
|
|
@crystalww 若遇到类似 from transformers import AutoProcessor
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-Omni-7B") |
|
Qwen2.5-Omni 微调支持 audio+text 2 audio+text吗?如果支持,数据格式是怎么样的 |
暂不支持audio decoder部分的微调 |
您好,请问Qwen2.5-Omni微调只要输出是音频就不支持是吗,但是这个模型不是语音端到端,微调输出文本的不就失去部分端到端的优势了吗?因为需要在输出文本后再加个TTS转成音频。 |
没办法构造raw audio到codec_ids的映射关系,那么就不能端到端进行训练了,具体可以看talker generation的代码,实际上音频的输出也是要等thinker部分的generated text再生成的,我们暂时只提供一个训练模型在下游任务微调thinker的能力,对于talker部分涉及到很多loss,包括codec ids的ce loss, dit部分的loss以及wave 部分的mse loss很难进行构建 |
您好,感谢回复,请问我可以理解为Qwen2.5-Omni本身开源程度是允许对输出音频进行微调,但是就算不用LlamaFactory微调,用其他工具对输出音频进行微调都比较复杂,所以暂时没有人做出来是吗? |
|
# for lora
python3 ./scripts/qwen_omni_merge.py merge_lora \
--base_model_path="./Qwen2_5Omni" \
--lora_checkpoint_path="./lora_checkpoint" \
--save_path="./target_dir"可以加入模型合并后的量化吗? |
|
请问qwen2.5 omni支持多轮对话微调吗 |
|
请问模型能不能不合并,直接以lora的加载方式进行推理呢 |
vllm目前不支持该模型这样推理。 |
|
File "/opt/huawei/miniconda3/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1969, in post_init |
|
/huawei/miniconda3/lib/python3.10/site-packages/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py", line 523, in get_rope_index |
我也遇到了 |
What does this PR do?
This PR aims to support the fine-tuning/post-training of the
Thinkerpart of the latest Qwen2.5-Omni model.Env Info
# prepare transformers with the following cmd pip install -U transformersTODO List
These tests were done with
loraanddemodata setups with freezingaudio tower&vision tower.Test recipes
Checkpoint Merging
Currently, we have updated the scripts for merging lora weights of
thinkermodel or merging full weights ofthinkermodel.Usage below:
Then try the official inference pipeline:
Fixes #7504 (issue)
For Finetuning with data
video + audioRefer to #7638 for data preparation and turn
use_audio_in_videototrueFor vllm serve
Warning
After loading the merged model using vllm, you need to manually change the architectures field in the model's config file from
Qwen2_5OmniForConditionalGenerationtoQwen2_5OmniModel. After this change, vllm can load it automatically.Before submitting