Clouditera / SecGPT

SecGPT网络安全大模型
Apache License 2.0
1.77k stars 237 forks source link

模型初始化 #13

Closed childlong closed 8 months ago

childlong commented 9 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")

boy-hack commented 8 months ago

可以