{"record":{"id":"edb213368b465c7c","repo":"huggingface/transformers","slug":"please-correct-the-following-deepspeed-config-valu","errorCode":null,"errorMessage":"Please correct the following DeepSpeed config values that mismatch TrainingArguments values:\\n{mismatches}\\nThe easiest method is to set these DeepSpeed config values to 'auto'.","messagePattern":"Please correct the following DeepSpeed config values that mismatch TrainingArguments values:\\\\n(.+?)\\\\nThe easiest method is to set these DeepSpeed config values to 'auto'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/transformers/integrations/deepspeed.py","lineNumber":255,"sourceCode":"                    \"zero_optimization.stage3_param_persistence_threshold\",\n                    10 * hidden_size,\n                )\n\n        # scheduler\n        self.fill_match(\n            \"scheduler.params.total_num_steps\",\n            num_training_steps,\n            \"num_training_steps (calculated)\",\n        )\n        self.fill_match(\n            \"scheduler.params.warmup_num_steps\",\n            args.get_warmup_steps(num_training_steps),\n            \"warmup_steps\",\n        )\n\n        if len(self.mismatches) > 0:\n            mismatches = \"\\n\".join(self.mismatches)\n            raise ValueError(\n                \"Please correct the following DeepSpeed config values that mismatch TrainingArguments\"\n                f\" values:\\n{mismatches}\\nThe easiest method is to set these DeepSpeed config values to 'auto'.\"\n            )\n\n\n# keep the config object global to be able to access it anywhere during TrainingArguments life-cycle\n_hf_deepspeed_config_weak_ref = None\n\n\ndef set_hf_deepspeed_config(hf_deepspeed_config_obj):\n    # this is a special weakref global object to allow us to get to Deepspeed config from APIs\n    # that don't have an easy way to get to the Deepspeed config outside of the Trainer domain.\n    global _hf_deepspeed_config_weak_ref\n    # will go away automatically when HfDeepSpeedConfig is destroyed (when TrainingArguments is destroyed)\n    _hf_deepspeed_config_weak_ref = weakref.ref(hf_deepspeed_config_obj)\n\n\ndef unset_hf_deepspeed_config():","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/huggingface/transformers/blob/a597f974857b3d92939971296bc0deb93d33d780/src/transformers/integrations/deepspeed.py#L237-L273","documentation":"Error \"Please correct the following DeepSpeed config values that mismatch TrainingArguments values:\\n{mismatches}\\nThe easiest method is to set these DeepSpeed config values to 'auto'.\" thrown in huggingface/transformers.","triggerScenarios":"Raised in DeepSpeed config validation when DeepSpeed config values conflict with TrainingArguments values.","commonSituations":"Batch size, learning rate, or precision set differently in ds_config.json and TrainingArguments; both must match or use 'auto'.","solutions":["Set the mismatched DeepSpeed config values to 'auto' so they inherit from TrainingArguments.","Align the DeepSpeed config values with the TrainingArguments values manually."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a597f974857b3d92939971296bc0deb93d33d780","analyzedAt":"2026-08-14T18:24:08.354Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}