Yang Fan
Yang Fan
@1920853199 您好,可以提供一下vllm版本吗? 这个有可能是导致的,在中修复,该修复已并入vllm-0.3.3版本;您可以尝试下这个版本。
> > @1920853199 您好,可以提供一下vllm版本吗? 这个有可能是[vllm-project/vllm#3034](https://github.com/vllm-project/vllm/issues/3034)导致的,在[vllm-project/vllm#3016](https://github.com/vllm-project/vllm/pull/3016)中修复,该修复已并入vllm-0.3.3版本;您可以尝试下这个版本。 > > 升级可以了,不过低版本的vllm,用百川的模型就不会出现截断的问题,这是vllm的问题还是qwen和baichuan的差异呢 如果您使用的是fastchat + vllm部署的话,这个是因为在fastchat的[Conversation](https://github.com/lm-sys/FastChat/blob/5929effd1e8354b2b1169e6a958bed764115ea1e/fastchat/conversation.py#L1081)中,baichuan2未设置`stop_token_ids`和`stop_str`,而qwen和yi等模型设置了这两个值,因此会受到这个bug的影响。(对话模板如此配置的具体原因,可以参考链接代码中指向的各个config配置文件)。
@MrRace current vLLM implementation of Qwen2 has a bug when `tie_word_embeddings=True` (Qwen1.5-0.5B models). and fixed this bug, you can update your vLLM to latest version and try again.
您好,这个报错的原因应该是运行时没找到模型文件目录。 注意到您启动docker时的命令是: ```bash CHECKPOINT_PATH=/data/qwen/Qwen-main/ docker run --gpus ${DEVICE} --rm --name edu-model --mount type=bind,source=${CHECKPOINT_PATH},target=/data/shared/Qwen/Qwen-7B --mount type=bind,source=${DATA_PATH},target=/data/shared/Qwen/data --mount type=bind,source=${OUTPUT_PATH},target=/data/shared/Qwen/output_qwen --shm-size=2gb -it ${IMAGE_NAME} ``` 因此,请保证宿主机上的路径`/data/qwen/Qwen-main/`指向你下载的模型,并且在docker中运行demo时,加上`-c /data/shared/Qwen/Qwen-7B/`选项。
@chesp 这张图似乎没有截图完整,下面的tokenizer相关文件没有截出来,但是按照上面代码下载的模型文件应当是完整的,可能是启动`web_demo.py`时指定的参数问题。您可以提供一下实际运行`web_demo.py`的命令参数。 ps: 观察到您下载了Qwen-7B,这是没有经过微调的base版本模型,不应当用于web demo,建议下载Qwen-7B-Chat版本的模型。
> 还是报错:huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/data/shared/Qwen/Qwen-Chat/'. Use `repo_type` argument if needed. 下载的模型文件没有问题,应该还是启动demo时候的问题,可以发一下启动web demo的命令吗?
> docker run --gpus all --rm --name edu-model --mount type=bind,source=/root/.cache/modelscope/hub/qwen/Qwen-7B-Chat,target=/data/shared/Qwen/Qwen-7B-Chat --mount type=bind,source=/data/qwen/dataset,target=/data/shared/Qwen/data --mount type=bind,source=/data/qwen/output/checkpoint,target=/data/shared/Qwen/output_qwen --shm-size=2gb -it qwenllm/qwen:cu117 启动docker之后,可以尝试下`python web_demo.py -c /data/shared/Qwen/Qwen-7B-Chat/`看下是否正常 也可以确认一下docker容器内是否正确挂载了模型目录
> 现在是docker run就报错,启动不了 麻烦提供一下报错信息?
>  明白了,你在运行docker run的时候没有加上命令,因此运行的是docker镜像内的默认启动命令,也就是`python3 web_demo.py --server-port 80 --server-name 0.0.0.0 -c /data/shared/Qwen/Qwen-Chat/`。但是这个和你挂载的路径不一致,所以找不到模型而报错。 有几种解决方式: 1. 修改挂载路径 ```bash docker run --gpus all --rm --name edu-model --mount type=bind,source=/root/.cache/modelscope/hub/qwen/Qwen-7B-Chat,target=/data/shared/Qwen/Qwen-Chat --mount type=bind,source=/data/qwen/dataset,target=/data/shared/Qwen/data --mount type=bind,source=/data/qwen/output/checkpoint,target=/data/shared/Qwen/output_qwen -p 80:80...
@chesp 报错是因为你使用单机量化微调脚本(Q-LoRA),但是使用的是非量化的模型,所以auto-gptq无法识别。 可以将`finetune/finetune_qlora_single_gpu.sh`修改为`finetune/finetune_lora_single_gpu.sh`。 或者,如果显存不足,一定要使用Q-LoRA,那么需要下载相应的量化版本模型Qwen-7B-Chat-Int4。 可以参考[文档中微调的说明](https://github.com/QwenLM/Qwen/blob/main/README_CN.md#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)。