baichuan-inc / Baichuan-13B

A 13B large language model developed by Baichuan Intelligent Technology
https://huggingface.co/baichuan-inc/Baichuan-13B-Chat
Apache License 2.0
2.98k stars 236 forks source link

cli_demo.py 切换Baichuan-13B-Base 问答异常 #176

Open cgq0816 opened 1 year ago

cgq0816 commented 1 year ago

加载模型方式 config = GenerationConfig.from_pretrained( "/data/model/Baichuan-13B-Base" ) model = AutoModelForCausalLM.from_pretrained( "/data/model/Baichuan-13B-Base", torch_dtype=torch.float16, device_map="auto", trust_remote_code=True ) model.generation_config = config tokenizer = AutoTokenizer.from_pretrained( "/data/model/Baichuan-13B-Base", use_fast=False, trust_remote_code=True ) 也按照其他人issues的问题进行了配置 image 但是还是会报如下错误 image 请问我该如何使用Baichuan-13B-Base做问答呢?

Liu-Tianmeng commented 1 year ago

我也报了相同的错,请问有解决方法吗~

yangbiaoqiange commented 11 months ago

同问,如何用basemodel做问答呢?