QwenLM / Qwen

The official repo of Qwen (通义千问) chat & pretrained large language model proposed by Alibaba Cloud.
Apache License 2.0
13.59k stars 1.11k forks source link

TypeError: __init__() got an unexpected keyword argument 'bf16' #1154

Closed houliangxue closed 6 months ago

houliangxue commented 6 months ago

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

当前行为 | Current Behavior

self.model = AutoModelForCausalLM.from_pretrained(model_path,torch_dtype="auto",device_map="auto",trust_remote_code=True, bf16=True).eval() self.tokenizer = AutoTokenizer.from_pretrained(model_path) self.generation_Config = GenerationConfig.from_pretrained(model_path, trust_remote_code=True)

期望行为 | Expected Behavior

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

4090显卡,transformer 4.37
,使用bf16=True

备注 | Anything else?

TypeError: init() got an unexpected keyword argument 'bf16'

jklj077 commented 6 months ago

Don't mix the use of Qwen and Qwen1.5 code examples. For information on Qwen1.5, please refer to https://github.com/Qwen/Qwen1.5 or https://qwen.readthedocs.io/en/latest/.