Skip to content

使用lora微调minicpmo模型导出缺少tts #9106

@UsanoCoCr

Description

@UsanoCoCr

Reminder

  • I have read the above rules and searched the existing issues.

System Info

使用minicpm仓库readme中提供的示例配置文件导入minicpmo

### model
model_name_or_path: /data/MiniCPM-o/MiniCPM-o-tune # MiniCPM-o-2_6 MiniCPM-V-2_6
adapter_name_or_path: saves/minicpmo_2_6_dailytalk/lora/sft
template: minicpm_o # minicpm_o minicpm_v
finetuning_type: lora
trust_remote_code: true

export
export_dir: models/transformers_modules/minicpmo_2_6_lora_sft
export_size: 2
export_device: cpu
export_legacy_format: false

导出后测试模型效果,运行inference逻辑,到:

self.minicpmo_model.tts.float()

报错:

AttributeError: 'MiniCPMO' object has no attribute 'tts'

如果把这句注释掉,语音的inference也不会支持,因为export出的模型确实缺少tts

Reproduction

1. 使用自己的数据/示例数据,用Lora Fine-Tuning的示例脚本([lora](https://github.com/OpenBMB/MiniCPM-V/blob/main/docs/llamafactory_train_and_infer.md))finetune minicpmo
2. 使用示例脚本导出模型参数
3. 运行模型语音inference代码

Others

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpendingThis problem is yet to be addressed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions