swift icon indicating copy to clipboard operation
swift copied to clipboard

ms-swift: Use PEFT or Full-parameter to finetune 250+ LLMs or 25+ MLLMs

Results 206 swift issues
Sort by recently updated
recently updated
newest added

阿里在训练Qwen-audio-chat模型的时候,机器训练的性能调优到了什么程度:比如1万小时音频用8卡A100,训练一个epoch,需要多长时间?

现在训练时样本长短不一,如果batch size设的过大会导致OOM,设的过小GPU算力有没有被利用起来,我想把数据根据大小排序或分组,然后希望训练时能根据根据当前batch的长度来动态调节batch size,达到算力的最优利用,气温能给我一些实现的建议吗?

enhancement

请帮忙看一下,非常感谢! 脚本: ``` PYTHONPATH=../../.. \ CUDA_VISIBLE_DEVICES=1,2,3,4 \ torchrun \ --nproc_per_node=4 \ --master_port 29500 \ llm_sft.py \ --model_revision master \ --tuner_backend swift \ --template_type llama \ --dtype fp16 \ --output_dir output...

bug

https://arxiv.org/pdf/2401.01335.pdf 在文本的领域中 这种方式微调比DPO好一些,文生图也很好。我们可以支持一下这种方式的微调不 代码也都开源了

enhancement

在部署yi-vl-6b-chat模型时报错 ```shell CUDA_VISIBLE_DEVICES=0 swift deploy --model_type="yi-vl-6b-chat" --model_cache_dir="/home/ubuntu/project/Models/01ai/Yi-VL-6B/" ``` 报错 ```shell Traceback (most recent call last): File "/home/ubuntu/project/swift/swift/utils/import_utils.py", line 71, in _get_module return importlib.import_module('.' + module_name, self.__name__) File "/home/ubuntu/miniconda3/envs/modelscope_env/lib/python3.10/importlib/__init__.py", line 126,...

enhancement

lora微调llama-7b 13b batch_size=1是总体训练时间是最短的,不过GPU 利用率很低,batch_size设置高一点GPU利用率能上来但是训练时间会变久不少。。 文档说明是:--batch_size: 训练时的batch_size, 默认为1. 增大batch_size可以增加GPU的利用率, 但不一定会增加训练速度, 因为在一个batch中, 需要对较短的句子按该batch中最长句子的长度进行padding, 从而引入无效的计算量. 是不是可以通过按照句子长度进行分组,句子长度相似的分为一组,来加速训练呢?

enhancement

system字段会拼接到后台执行的命令,并且用双引号包括,不能正确转义 $ {} - 等特殊字符,存在命令注入。 比如在system字段输入: `$(touch /tmp/hack.txt)` 点击 `开始训练` 按钮后,`touch /tmp/hack.txt`这条命令会在后台执行。 除了安全风险之外,实际使用中如果system字段包含特殊字符,还会导致训练任务启动失败或者传入参数不符合预期。 请考虑将system字段拼接入 LLM 训练启动命令之前 转义或用单引号包括防止命令注入和运行错误。 The “system” field is concatenated to the command executed in the background and...

使用消费级顶级,或者AMD的AI卡,在rocm 5.7/6.0环境下,是否支持微调等加速?

目前了解到lora相关的有https://github.com/S-LoRA/S-LoRA https://github.com/predibase/lorax

adapter和p-tuning的代码如下: `import os os.environ['CUDA_VISIBLE_DEVICES'] = '3' # os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:128' from modelscope import Model, AutoModelForSequenceClassification, AutoTokenizer, MsDataset from swift import Swift, LoRAConfig, AdapterConfig, Trainer, TrainingArguments, PromptConfig, PrefixTuningConfig import torch torch.cuda.empty_cache()...