Closed JiafeiSun closed 1 year ago
state_dict = LlamaForCausalLM.load_parallel_state_dict(
path="hdd:s3://opennlplab_hdd/models/llama/llama-7b-hf",
config=config,
protocol="petrel",
format="hf"
)
改成
state_dict = LlamaForCausalLM.load_parallel_state_dict(
path=pretrained_path,
config=config,
)
就可以了,或者可以直接使用from_pretrained:
model = LlamaForCausalLM.from_pretrained(pretrained_path, config=config)
state_dict = LlamaForCausalLM.load_parallel_state_dict( path="hdd:s3://opennlplab_hdd/models/llama/llama-7b-hf", config=config, protocol="petrel", format="hf" )
改成
state_dict = LlamaForCausalLM.load_parallel_state_dict( path=pretrained_path, config=config, )
就可以了,或者可以直接使用from_pretrained:
model = LlamaForCausalLM.from_pretrained(pretrained_path, config=config)
多谢大佬