mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
parent
77341ee3c4
commit
7c6785d3df
@ -1,6 +1,6 @@
|
|||||||
transformers>=4.41.2,<=4.43.4
|
transformers>=4.41.2,<=4.43.4
|
||||||
datasets>=2.16.0,<=2.20.0
|
datasets>=2.16.0,<=2.21.0
|
||||||
accelerate>=0.30.1,<=0.32.0
|
accelerate>=0.30.1,<=0.33.0
|
||||||
peft>=0.11.1,<=0.12.0
|
peft>=0.11.1,<=0.12.0
|
||||||
trl>=0.8.6,<=0.9.6
|
trl>=0.8.6,<=0.9.6
|
||||||
gradio>=4.0.0
|
gradio>=4.0.0
|
||||||
|
@ -21,8 +21,8 @@ Level:
|
|||||||
Dependency graph:
|
Dependency graph:
|
||||||
main:
|
main:
|
||||||
transformers>=4.41.2,<=4.43.4
|
transformers>=4.41.2,<=4.43.4
|
||||||
datasets>=2.16.0,<=2.20.0
|
datasets>=2.16.0,<=2.21.0
|
||||||
accelerate>=0.30.1,<=0.32.0
|
accelerate>=0.30.1,<=0.33.0
|
||||||
peft>=0.11.1,<=0.12.0
|
peft>=0.11.1,<=0.12.0
|
||||||
trl>=0.8.6,<=0.9.6
|
trl>=0.8.6,<=0.9.6
|
||||||
attention:
|
attention:
|
||||||
|
@ -80,8 +80,8 @@ def check_dependencies() -> None:
|
|||||||
logger.warning("Version checking has been disabled, may lead to unexpected behaviors.")
|
logger.warning("Version checking has been disabled, may lead to unexpected behaviors.")
|
||||||
else:
|
else:
|
||||||
require_version("transformers>=4.41.2,<=4.43.4", "To fix: pip install transformers>=4.41.2,<=4.43.4")
|
require_version("transformers>=4.41.2,<=4.43.4", "To fix: pip install transformers>=4.41.2,<=4.43.4")
|
||||||
require_version("datasets>=2.16.0,<=2.20.0", "To fix: pip install datasets>=2.16.0,<=2.20.0")
|
require_version("datasets>=2.16.0,<=2.21.0", "To fix: pip install datasets>=2.16.0,<=2.21.0")
|
||||||
require_version("accelerate>=0.30.1,<=0.32.0", "To fix: pip install accelerate>=0.30.1,<=0.32.0")
|
require_version("accelerate>=0.30.1,<=0.33.0", "To fix: pip install accelerate>=0.30.1,<=0.33.0")
|
||||||
require_version("peft>=0.11.1,<=0.12.0", "To fix: pip install peft>=0.11.1,<=0.12.0")
|
require_version("peft>=0.11.1,<=0.12.0", "To fix: pip install peft>=0.11.1,<=0.12.0")
|
||||||
require_version("trl>=0.8.6,<=0.9.6", "To fix: pip install trl>=0.8.6,<=0.9.6")
|
require_version("trl>=0.8.6,<=0.9.6", "To fix: pip install trl>=0.8.6,<=0.9.6")
|
||||||
|
|
||||||
|
@ -75,8 +75,7 @@ def fix_valuehead_checkpoint(
|
|||||||
state_dict: Dict[str, torch.Tensor] = torch.load(path_to_checkpoint, map_location="cpu")
|
state_dict: Dict[str, torch.Tensor] = torch.load(path_to_checkpoint, map_location="cpu")
|
||||||
|
|
||||||
os.remove(path_to_checkpoint)
|
os.remove(path_to_checkpoint)
|
||||||
decoder_state_dict = {}
|
decoder_state_dict, v_head_state_dict = {}, {}
|
||||||
v_head_state_dict = {}
|
|
||||||
for name, param in state_dict.items():
|
for name, param in state_dict.items():
|
||||||
if name.startswith("v_head."):
|
if name.startswith("v_head."):
|
||||||
v_head_state_dict[name] = param
|
v_head_state_dict[name] = param
|
||||||
|
Loading…
x
Reference in New Issue
Block a user