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

**Describe the bug** What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图) 1. 使用最新代码后,使用int8模型后会报错 RuntimeError: probability tensor contains either `inf`, `nan` or element < 0 2. 如果不使用命令行,使用推理脚本 则推理出来后response是乱码...

一、现象 1.使用lora 认知训练,成功。命令为: python llm_sft.py --model_type qwen1half-0_5b-chat --model_id_or_path /home/work/pbg/Qwen1.5-0.5B-Chat \ --dtype fp16 --sft_type lora --tuner_backend peft --output_dir output \ --dataset blossom-math-zh --train_dataset_sample 1000 --num_train_epochs 2 --max_length 512 \ --check_dataset_strategy warning...

···python #custom.py from typing import Optional, Tuple from datasets import Dataset as HfDataset from modelscope import MsDataset from swift.llm import get_dataset, register_dataset, get_dataset_from_repo from swift.utils import get_logger logger = get_logger()...

一、推理错误 推理命令: swift infer --dtype fp16 --ckpt_dir '/home/haitaiwork/pbg/swift-main/examples/pytorch/llm/output/qwen1half-0_5b-chat/v9-20240509-172543/checkpoint-340' 或者使用: swift infer --ckpt_dir '/home/haitaiwork/pbg/swift-main/examples/pytorch/llm/output/qwen1half-0_5b-chat/v9-20240509-172543/checkpoint-340' 都出现乱码,并报错: [INFO:swift] generation_config: SamplingParams(n=1, best_of=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=0.3, top_p=0.7, top_k=20, min_p=0.0, use_beam_search=False, length_penalty=1.0, early_stopping=False, stop=[], stop_token_ids=[],...

使用NPU swift infer 后端支持VLLM吗

question

基于上次提的问题#691,后续改进后似乎依旧不能按微调的情况回复。 > 量化模型的merge lora精度损失很大的 建议训完后量化,然后使用vllm 您好,根据上次的反馈,我在这次使用的微调中,直接使用lora微调,并没有使用量化。quantization_bit = 0; 训练模型后,将模型进行合并(为了后续可以使用VLLM进行推理。) ``` CUDA_VISIBLE_DEVICES=0,1 swift export --ckpt_dir './swift_qwen/output/qwen1half-7b-chat-swift/qwen1half-7b-chat/v1-20240416-160243/checkpoint-69500' --sft_type 'lora' --merge_lora true --model_id_or_path './models/models/qwen/Qwen1___5-7B-Chat' ``` 此时发现,这样做,模型依旧未能按照实际微调的结果(即未合并前的模型)来进行回复。 想请问老师,到底时哪一步出现问题了?很是奇怪。

使用swift web-ui启动gradioweb界面,在LLM推理tab页,选择了多模态vl模型之后,怎么在界面上或者对话框中传入图片呢?

**Describe the bug** What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图) 多模态模型部署不了吗? 怎么部署到服务器上? 尝试部署这个模型。 internlm-xcomposer2-7b-chat **Your hardware and system info** Write your system info like CUDA version/system/GPU/torch...

**Describe the bug** What the bug is, and how to reproduce, better with screenshots(描述bug以及复现过程,最好有截图) 请问老师: - 我就是简单的想先测试一下 LLaMa3 8b-instruction 的效果。 - 所以我分别采用 《LLM推理文档》 以及 《VLLM推理加速与部署》 中的代码直接先用LLama3推理一下。 - 但是很奇怪,直接就出现这样的错误: ![638941CB-7CDA-4fa8-B77F-F3F767D4279C](https://github.com/modelscope/swift/assets/137602905/07df2245-12c6-41c2-b453-377c4edc95b6) -...