support non-reenterent-gc & fix #6358

Former-commit-id: 20446141e408885eb36d512bfb2dfb62bbc0c20d
This commit is contained in:
hiyouga
2024-12-17 11:41:59 +00:00
parent 6522467ddb
commit 4196d5b4d6
2 changed files with 7 additions and 1 deletions

View File

@@ -237,6 +237,10 @@ class ModelArguments(QuantizationArguments, ProcessorArguments, ExportArguments,
default=False,
metadata={"help": "Whether or not to disable gradient checkpointing."},
)
use_reentrant_gc: bool = field(
default=True,
metadata={"help": "Whether or not to use reentrant gradient checkpointing."},
)
upcast_layernorm: bool = field(
default=False,
metadata={"help": "Whether or not to upcast the layernorm weights in fp32."},