Chat凉宫春日, An open sourced Role-Playing chatbot Cheng Li, Ziang Leng, and others.
Apache License 2.0
1.85k
stars
164
forks
source link
使用vllm数据并行和ChatHaruhi一起使用会报RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method #83
我的代码
from vllm import LLM, SamplingParams
from chatharuhi import ChatHaruhi (这里只要导入ChatHaruhi就会报Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method)
我的代码 from vllm import LLM, SamplingParams from chatharuhi import ChatHaruhi (这里只要导入ChatHaruhi就会报Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method)
def loadmodel(model_name, peft_model, quantization=None, use_fast_kernels=True, seed=42, **kwargs):
加载model、tokenizer、rag