Closed childlong closed 8 months ago
模型初始化的时候没用使用config参数 config = transformers.AutoConfig.from_pretrained( pre_train_path, trust_remote_code=True, ) config.use_cache = False model = AutoModelForCausalLM.from_pretrained(pre_train_path, trust_remote_code=True, device_map="auto") 是不是应该是这样的 config = transformers.AutoConfig.from_pretrained( pre_train_path, trust_remote_code=True, ) config.use_cache = False model = AutoModelForCausalLM.from_pretrained(pre_train_path, config=config, trust_remote_code=True, device_map="auto")
可以
模型初始化的时候没用使用config参数 config = transformers.AutoConfig.from_pretrained( pre_train_path, trust_remote_code=True, ) config.use_cache = False model = AutoModelForCausalLM.from_pretrained(pre_train_path, trust_remote_code=True, device_map="auto") 是不是应该是这样的 config = transformers.AutoConfig.from_pretrained( pre_train_path, trust_remote_code=True, ) config.use_cache = False model = AutoModelForCausalLM.from_pretrained(pre_train_path, config=config, trust_remote_code=True, device_map="auto")