-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/api_demo以及web_demo输出乱码 #391
Comments
qwen用了8bit后也是乱码。api日志有输出:Using bos_token, but it is not set yet. |
发现如果不用quantization_bit 8,输出的就正常 |
template 没选对。 |
请问这是指的template 没选对导致的乱码还是导致的回答里带自问自答?template 应该选择什么? |
qwen用了8-bit出乱码,不用就正常输出。 |
回答里面自问自答的根据你说的这个解决了。就是#170 的方案。 |
乱码应该是显卡本身不支持 8bit |
不是,显卡是A6000。直接在baichuan-13b的项目里面的web_demo执行8bit是正常的。 |
我用的t4,用qwen官方的8bit代码是可以跑的;但用项目里的api就会出乱码。官方给的代码如下: # quantization configuration for Int8 (8 bits)
quantization_config = BitsAndBytesConfig(load_in_8bit=True)
model = AutoModelForCausalLM.from_pretrained(
args.checkpoint_path,
device_map="cuda:0",
quantization_config=quantization_config,
max_memory=max_memory,
trust_remote_code=True,
).eval() |
@franklyd 更新一下代码试试 |
我微调了baichuan13-B也出现了乱码这个问题,代码我用的是8.9日晚上20点左右的。 说明: 开始有--checkpoint_dir path_to_checkpoint,也是乱码,去掉后还是乱码。 |
已修复,请更新代码。 |
用的baichuan-13B模型
启动命令分别用的
python api_demo.py --model_name_or_path baichuan-inc/Baichuan-13B-Chat --template default --quantization_bit 8
python web_demo.py --model_name_or_path baichuan-inc/Baichuan-13B-Chat --template default --quantization_bit 8
web_demo使用en和zh都是乱码
api_demo也是乱码
The text was updated successfully, but these errors were encountered: