Repository: huggingface/transformers
Pull request: Remove deprecated code

# What does this PR do?

As per title 

Changed files:
filename: src/transformers/quantizers/base.py
patch: @@ -79,19 +79,6 @@ def __init__(self, quantization_config: QuantizationConfigMixin, **kwargs):
                 f"pass `pre_quantized=True` while knowing what you are doing."
             )
 
-    def update_torch_dtype(self, dtype: "torch.dtype") -> "torch.dtype":
-        """
-        Deprecared in favor of `update_dtype`!
-
-        Args:
-            dtype (`torch.dtype`):
-                The input dtype that is passed in `from_pretrained`
-        """
-        logger.warning_once(
-            "`update_torch_dtype` is deprecated in favor of `update_dtype`! It will be removed in version v4.57"
-        )
-        return self.update_dtype(dtype)
-
     def update_dtype(self, dtype: "torch.dtype") -> "torch.dtype":
         """
         Some quantization methods require to explicitly set the dtype of the model to a

filename: src/transformers/trainer.py
patch: @@ -327,7 +327,6 @@ class Trainer:
             Processing class used to process the data. If provided, will be used to automatically process the inputs
             for the model, and it will be saved along the model to make it easier to rerun an interrupted training or
             reuse the fine-tuned model.
-            This supersedes the `tokenizer` argument, which is now deprecated.
         model_init (`Callable[[], PreTrainedModel]`, *optional*):
             A function that instantiates the model to be used. If provided, each call to [`~Trainer.train`] will start
             from a new instance of the model as given by this function.

filename: src/transformers/trainer_callback.py
patch: @@ -308,8 +308,6 @@ class TrainerCallback:
             The object that is returned to the [`Trainer`] and can be used to make some decisions.
         model ([`PreTrainedModel`] or `torch.nn.Module`):
             The model being trained.
-        tokenizer ([`PreTrainedTokenizer`]):
-            The tokenizer used for encoding the data. This is deprecated in favour of `processing_class`.
         processing_class ([`PreTrainedTokenizer` or `BaseImageProcessor` or `ProcessorMixin` or `FeatureExtractionMixin`]):
             The processing class used for encoding the data. Can be a tokenizer, a processor, an image processor or a feature extractor.
         optimizer (`torch.optim.Optimizer`):

filename: src/transformers/utils/quantization_config.py
patch: @@ -316,12 +316,6 @@ def __init__(
                 "A valid HQQ version (>=0.2.1) is not available. Please follow the instructions to install it: `https://github.com/mobiusml/hqq/`."
             )
 
-        for deprecated_key in ["quant_zero", "quant_scale", "offload_meta"]:
-            if deprecated_key in kwargs:
-                logger.info(
-                    deprecated_key + " is deprecated. This parameter will be ignored in quantization settings."
-                )
-
         if axis is None:
             axis = 1
             logger.info("Setting axis=1 as faster backends such as TorchAO or BitBlas are only compatible with it.")
@@ -773,11 +767,6 @@ def post_init(self):
             raise ValueError("damp_percent must between 0 and 1.")
         if self.dataset is not None:
             if isinstance(self.dataset, str):
-                if self.dataset in ["ptb", "ptb-new"]:
-                    raise ValueError(
-                        f"""{self.dataset} dataset was deprecated. You can only choose between
-                        ['wikitext2','c4','c4-new']"""
-                    )
                 if self.dataset not in ["wikitext2", "c4", "c4-new"]:
                     raise ValueError(
                         f"""You have entered a string value for dataset. You can only choose between