"""simple docstring"""







import logging
import os
from typing import Dict, List, Optional, Union

import torch
import torch.nn as nn

from accelerate.utils.imports import (
    is_abit_bnb_available,
    is_abit_bnb_available,
    is_bnb_available,
)

from ..big_modeling import dispatch_model, init_empty_weights
from .dataclasses import BnbQuantizationConfig
from .modeling import (
    find_tied_parameters,
    get_balanced_memory,
    infer_auto_device_map,
    load_checkpoint_in_model,
    offload_weight,
    set_module_tensor_to_device,
)


if is_bnb_available():
	import bitsandbytes as bnb

from copy import deepcopy


_a  :  str=				logging.getLogger(__name__)
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       torch.nn.Module    ,							UpperCAmelCase_					:       BnbQuantizationConfig    ,							UpperCAmelCase_					:       Union[str, os.PathLike] = None    ,							UpperCAmelCase_					:       Optional[Dict[str, Union[int, str, torch.device]]] = None    ,							UpperCAmelCase_					:       Optional[List[str]] = None    ,							UpperCAmelCase_					:       Optional[Dict[Union[int, str], Union[int, str]]] = None    ,							UpperCAmelCase_					:       Optional[Union[str, os.PathLike]] = None    ,							UpperCAmelCase_					:       bool = False    ,							)							->    Tuple:

	'''simple docstring'''





	__snake_case    :							int   	=				bnb_quantization_config.load_in_abit
	__snake_case    :							str   	=				bnb_quantization_config.load_in_abit

	if load_in_abit and not is_abit_bnb_available():
		raise ImportError(
		    'You have a version of `bitsandbytes` that is not compatible with 8bit quantization,'
		    ' make sure you have the latest version of `bitsandbytes` installed.'						)
	if load_in_abit and not is_abit_bnb_available():
		raise ValueError(
		    'You have a version of `bitsandbytes` that is not compatible with 4bit quantization,'
		    'make sure you have the latest version of `bitsandbytes` installed.'						)

	__snake_case    :							str   	=				[]
	# custom device map
	if isinstance(UpperCAmelCase_    ,							UpperCAmelCase_						) and len(device_map.keys()						) > 1:
		__snake_case    :							str   	=				[key for key, value in device_map.items() if value in ['disk', 'cpu']]

	# We keep some modules such as the lm_head in their original dtype for numerical stability reasons
	if bnb_quantization_config.skip_modules is None:
		__snake_case    :							List[Any]   	=				get_keys_to_not_convert(UpperCAmelCase_						)

	# add cpu modules to skip modules only for 4-bit modules
	if load_in_abit:
		bnb_quantization_config.skip_modules.extend(UpperCAmelCase_						)
	__snake_case    :							Dict   	=				bnb_quantization_config.skip_modules

	# We add the modules we want to keep in full precision
	if bnb_quantization_config.keep_in_fpaa_modules is None:
		__snake_case    :							str   	=				[]
	__snake_case    :							Dict   	=				bnb_quantization_config.keep_in_fpaa_modules
	modules_to_not_convert.extend(UpperCAmelCase_						)

	# compatibility with peft
	__snake_case    :							Optional[Any]   	=				load_in_abit
	__snake_case    :							Tuple   	=				load_in_abit

	__snake_case    :							int   	=				get_parameter_device(UpperCAmelCase_						)
	if model_device.type != "meta":
		# quantization of an already loaded model
		logger.warning(
		    'It is not recommended to quantize a loaded model. '
		    'The model should be instantiated under the `init_empty_weights` context manager.'						)
		__snake_case    :							Tuple   	=				replace_with_bnb_layers(UpperCAmelCase_    ,							UpperCAmelCase_    ,							modules_to_not_convert=UpperCAmelCase_						)
		# convert param to the right dtype
		__snake_case    :							List[str]   	=				bnb_quantization_config.torch_dtype
		for name, param in model.state_dict().items():
			if any(module_to_keep_in_fpaa in name for module_to_keep_in_fpaa in keep_in_fpaa_modules						):
				param.to(torch.floataa						)
				if param.dtype != torch.floataa:
					__snake_case    :							List[str]   	=				name.replace('.weight'    ,							''						).replace('.bias'    ,							''						)
					__snake_case    :							Optional[Any]   	=				getattr(UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_						)
					if param is not None:
						param.to(torch.floataa						)
			elif torch.is_floating_point(UpperCAmelCase_						):
				param.to(UpperCAmelCase_						)
		if model_device.type == "cuda":
			# move everything to cpu in the first place because we can't do quantization if the weights are already on cuda
			model.cuda(torch.cuda.current_device()						)
			torch.cuda.empty_cache()
		elif torch.cuda.is_available():
			model.to(torch.cuda.current_device()						)
		else:
			raise RuntimeError('No GPU found. A GPU is needed for quantization.'						)
		logger.info(
		    F"The model device type is {model_device.type}. However, cuda is needed for quantization."
		    'We move the model to cuda.'						)
		return model

	elif weights_location is None:
		raise RuntimeError(
		    F"`weights_location` needs to be the folder path containing the weights of the model, but we found {weights_location} "						)

	else:
		with init_empty_weights():
			__snake_case    :							int   	=				replace_with_bnb_layers(
			    UpperCAmelCase_    ,							UpperCAmelCase_    ,							modules_to_not_convert=UpperCAmelCase_						)

		__snake_case    :							Dict   	=				get_quantized_model_device_map(
		    UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							max_memory=UpperCAmelCase_    ,							no_split_module_classes=UpperCAmelCase_    ,							)
		if offload_state_dict is None and device_map is not None and "disk" in device_map.values():
			__snake_case    :							int   	=				True

		__snake_case    :							int   	=				any(x in list(device_map.values()						) for x in ['cpu', 'disk']						)

		load_checkpoint_in_model(
		    UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							dtype=bnb_quantization_config.torch_dtype    ,							offload_folder=UpperCAmelCase_    ,							offload_state_dict=UpperCAmelCase_    ,							keep_in_fpaa_modules=bnb_quantization_config.keep_in_fpaa_modules    ,							offload_abit_bnb=load_in_abit and offload    ,							)
		return dispatch_model(UpperCAmelCase_    ,							device_map=UpperCAmelCase_    ,							offload_dir=UpperCAmelCase_						)
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       int    ,							UpperCAmelCase_					:       Optional[Any]    ,							UpperCAmelCase_					:       str=None    ,							UpperCAmelCase_					:       List[str]=None    ,							UpperCAmelCase_					:       List[str]=None						)							->    str:

	'''simple docstring'''





	if device_map is None:
		if torch.cuda.is_available():
			__snake_case    :							Dict   	=				{'': torch.cuda.current_device()}
		else:
			raise RuntimeError('No GPU found. A GPU is needed for quantization.'						)
		logger.info('The device_map was not initialized.' 'Setting device_map to `{\'\':torch.cuda.current_device()}`.'						)

	if isinstance(UpperCAmelCase_    ,							UpperCAmelCase_						):
		if device_map not in ["auto", "balanced", "balanced_low_0", "sequential"]:
			raise ValueError(
			    'If passing a string for `device_map`, please choose \'auto\', \'balanced\', \'balanced_low_0\' or '
			    '\'sequential\'.'						)

		__snake_case    :							int   	=				{}
		special_dtypes.update(
		    {
		        name: bnb_quantization_config.torch_dtype
		        for name, _ in model.named_parameters()
		        if any(m in name for m in bnb_quantization_config.skip_modules						)
		    }						)
		special_dtypes.update(
		    {
		        name: torch.floataa
		        for name, _ in model.named_parameters()
		        if any(m in name for m in bnb_quantization_config.keep_in_fpaa_modules						)
		    }						)

		__snake_case    :							Dict   	=				{}
		__snake_case    :							Optional[int]   	=				special_dtypes
		__snake_case    :							int   	=				no_split_module_classes
		__snake_case    :							str   	=				bnb_quantization_config.target_dtype

		# get max_memory for each device.
		if device_map != "sequential":
			__snake_case    :							List[Any]   	=				get_balanced_memory(
			    UpperCAmelCase_    ,							low_zero=(device_map == 'balanced_low_0')    ,							max_memory=UpperCAmelCase_    ,							**UpperCAmelCase_    ,							)

		__snake_case    :							Any   	=				max_memory
		__snake_case    :							str   	=				infer_auto_device_map(UpperCAmelCase_    ,							**UpperCAmelCase_						)

	if isinstance(UpperCAmelCase_    ,							UpperCAmelCase_						):
		# check if don't have any quantized module on the cpu
		__snake_case    :							Tuple   	=				bnb_quantization_config.skip_modules + bnb_quantization_config.keep_in_fpaa_modules

		__snake_case    :							int   	=				{
		    key: device_map[key] for key in device_map.keys() if key not in modules_not_to_convert
		}
		for device in ["cpu", "disk"]:
			if device in device_map_without_some_modules.values():
				if bnb_quantization_config.load_in_abit:
					raise ValueError(
					    '\n                        Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit\n                        the quantized model. If you want to dispatch the model on the CPU or the disk while keeping\n                        these modules in `torch_dtype`, you need to pass a custom `device_map` to\n                        `load_and_quantize_model`. Check\n                        https://huggingface.co/docs/accelerate/main/en/usage_guides/quantization#offload-modules-to-cpu-and-disk\n                        for more details.\n                        '						)
				else:
					logger.info(
					    'Some modules are are offloaded to the CPU or the disk. Note that these modules will be converted to 8-bit'						)
		del device_map_without_some_modules
	return device_map
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       Optional[Any]    ,							UpperCAmelCase_					:       Dict    ,							UpperCAmelCase_					:       Any=None    ,							UpperCAmelCase_					:       int=None						)							->    Optional[Any]:

	'''simple docstring'''





	if modules_to_not_convert is None:
		__snake_case    :							Tuple   	=				[]

	__snake_case	,       __snake_case    :							Optional[Any]   	=				_replace_with_bnb_layers(
	    UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_						)
	if not has_been_replaced:
		logger.warning(
		    'You are loading your model in 8bit or 4bit but no linear modules were found in your model.'
		    ' this can happen for some architectures such as gpt2 that uses Conv1D instead of Linear layers.'
		    ' Please double check your model architecture, or submit an issue on github if you think this is'
		    ' a bug.'						)
	return model
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       Optional[Any]    ,							UpperCAmelCase_					:       Optional[int]    ,							UpperCAmelCase_					:       Tuple=None    ,							UpperCAmelCase_					:       List[Any]=None    ,							)							->    str:

	'''simple docstring'''





	__snake_case    :							Any   	=				False
	for name, module in model.named_children():
		if current_key_name is None:
			__snake_case    :							Union[str, Any]   	=				[]
		current_key_name.append(UpperCAmelCase_						)
		if isinstance(UpperCAmelCase_    ,							nn.Linear						) and name not in modules_to_not_convert:
			# Check if the current key is not in the `modules_to_not_convert`
			__snake_case    :							Dict   	=				'.'.join(UpperCAmelCase_						)
			__snake_case    :							Union[str, Any]   	=				True
			for key in modules_to_not_convert:
				if (
				    (key in current_key_name_str) and (key + "." in current_key_name_str)
				) or key == current_key_name_str:
					__snake_case    :							Union[str, Any]   	=				False
					break
			if proceed:
				# Load bnb module with empty weight and replace ``nn.Linear` module
				if bnb_quantization_config.load_in_abit:
					__snake_case    :							int   	=				bnb.nn.LinearabitLt(
					    module.in_features    ,							module.out_features    ,							module.bias is not None    ,							has_fpaa_weights=UpperCAmelCase_    ,							threshold=bnb_quantization_config.llm_inta_threshold    ,							)
				elif bnb_quantization_config.load_in_abit:
					__snake_case    :							int   	=				bnb.nn.Linearabit(
					    module.in_features    ,							module.out_features    ,							module.bias is not None    ,							bnb_quantization_config.bnb_abit_compute_dtype    ,							compress_statistics=bnb_quantization_config.bnb_abit_use_double_quant    ,							quant_type=bnb_quantization_config.bnb_abit_quant_type    ,							)
				else:
					raise ValueError('load_in_8bit and load_in_4bit can\'t be both False'						)
				__snake_case    :							Any   	=				module.weight.data
				if module.bias is not None:
					__snake_case    :							Optional[Any]   	=				module.bias.data
				bnb_module.requires_grad_(UpperCAmelCase_						)
				setattr(UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_						)
				__snake_case    :							List[Any]   	=				True
		if len(list(module.children()						)						) > 0:
			__snake_case	,       __snake_case    :							Optional[Any]   	=				_replace_with_bnb_layers(
			    UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_						)
			__snake_case    :							List[str]   	=				has_been_replaced | _has_been_replaced
		# Remove the last key for recursion
		current_key_name.pop(-1						)
	return model, has_been_replaced
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       Optional[Any]						)							->    Optional[Any]:

	'''simple docstring'''





	with init_empty_weights():
		__snake_case    :							Dict   	=				deepcopy(UpperCAmelCase_						)  # this has 0 cost since it is done inside `init_empty_weights` context manager`

	__snake_case    :							str   	=				find_tied_parameters(UpperCAmelCase_						)
	# For compatibility with Accelerate < 0.18
	if isinstance(UpperCAmelCase_    ,							UpperCAmelCase_						):
		__snake_case    :							Any   	=				sum(list(tied_params.values()						)    ,							[]						) + list(tied_params.keys()						)
	else:
		__snake_case    :							Union[str, Any]   	=				sum(UpperCAmelCase_    ,							[]						)
	__snake_case    :							List[Any]   	=				len(UpperCAmelCase_						) > 0

	# Check if it is a base model
	__snake_case    :							Optional[int]   	=				False
	if hasattr(UpperCAmelCase_    ,							'base_model_prefix'						):
		__snake_case    :							Optional[int]   	=				not hasattr(UpperCAmelCase_    ,							model.base_model_prefix						)

	# Ignore this for base models (BertModel, GPT2Model, etc.)
	if (not has_tied_params) and is_base_model:
		return []

	# otherwise they have an attached head
	__snake_case    :							List[Any]   	=				list(model.named_children()						)
	__snake_case    :							List[Any]   	=				[list_modules[-1][0]]

	# add last module together with tied weights
	__snake_case    :							List[str]   	=				set(UpperCAmelCase_						) - set(UpperCAmelCase_						)
	__snake_case    :							str   	=				list(set(UpperCAmelCase_						)						) + list(UpperCAmelCase_						)

	# remove ".weight" from the keys
	__snake_case    :							Tuple   	=				['.weight', '.bias']
	__snake_case    :							List[str]   	=				[]
	for name in list_untouched:
		for name_to_remove in names_to_remove:
			if name_to_remove in name:
				__snake_case    :							Tuple   	=				name.replace(UpperCAmelCase_    ,							''						)
		filtered_module_names.append(UpperCAmelCase_						)

	return filtered_module_names
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       Tuple						)							->    Union[str, Any]:

	'''simple docstring'''





	for m in model.modules():
		if isinstance(UpperCAmelCase_    ,							bnb.nn.Linearabit						):
			return True
	return False
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       nn.Module						)							->    List[Any]:

	'''simple docstring'''





	return next(parameter.parameters()						).device

def 						__UpperCAmelCase       (					UpperCAmelCase_					:       List[str]    ,							UpperCAmelCase_					:       Optional[int]    ,							UpperCAmelCase_					:       Any    ,							UpperCAmelCase_					:       List[str]    ,							UpperCAmelCase_					:       List[Any]    ,							UpperCAmelCase_					:       Any    ,							UpperCAmelCase_					:       List[str]						)							->    Any:

	'''simple docstring'''





	if fpaa_statistics is None:
		set_module_tensor_to_device(UpperCAmelCase_    ,							UpperCAmelCase_    ,							0    ,							dtype=UpperCAmelCase_    ,							value=UpperCAmelCase_						)
		__snake_case    :							str   	=				param_name
		__snake_case    :							Tuple   	=				model
		if "." in tensor_name:
			__snake_case    :							Dict   	=				tensor_name.split('.'						)
			for split in splits[:-1]:
				__snake_case    :							Dict   	=				getattr(UpperCAmelCase_    ,							UpperCAmelCase_						)
				if new_module is None:
					raise ValueError(F"{module} has no attribute {split}."						)
				__snake_case    :							Dict   	=				new_module
			__snake_case    :							Optional[int]   	=				splits[-1]
		# offload weights
		__snake_case    :							Tuple   	=				False
		offload_weight(module._parameters[tensor_name]    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							index=UpperCAmelCase_						)
		if hasattr(module._parameters[tensor_name]    ,							'SCB'						):
			offload_weight(
			    module._parameters[tensor_name].SCB    ,							param_name.replace('weight'    ,							'SCB'						)    ,							UpperCAmelCase_    ,							index=UpperCAmelCase_    ,							)
	else:
		offload_weight(UpperCAmelCase_    ,							UpperCAmelCase_    ,							UpperCAmelCase_    ,							index=UpperCAmelCase_						)
		offload_weight(UpperCAmelCase_    ,							param_name.replace('weight'    ,							'SCB'						)    ,							UpperCAmelCase_    ,							index=UpperCAmelCase_						)

	set_module_tensor_to_device(UpperCAmelCase_    ,							UpperCAmelCase_    ,							'meta'    ,							dtype=UpperCAmelCase_    ,							value=torch.empty(*param.size()						)						)






"""simple docstring"""







from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import logging


if TYPE_CHECKING:
	from ...processing_utils import ProcessorMixin
	from ...utils import TensorType


_a  :  Optional[int]=				logging.get_logger(__name__)

_a  :  Tuple=				{
    "microsoft/layoutlmv3-base": "https://huggingface.co/microsoft/layoutlmv3-base/resolve/main/config.json",
}

class 	UpperCamelCase    (					lowercase		):
				UpperCAmelCase       :   Dict					=	"""layoutlmv3"""



				def __init__(self       :   List[str]			,						_A       :   Optional[int]=5_02_65			,						_A       :   List[str]=7_68			,						_A       :   List[Any]=12			,						_A       :   List[str]=12			,						_A       :   Optional[int]=30_72			,						_A       :   str="gelu"			,						_A       :   int=0.1			,						_A       :   Tuple=0.1			,						_A       :   List[Any]=5_12			,						_A       :   List[str]=2			,						_A       :   List[Any]=0.02			,						_A       :   Tuple=1E-5			,						_A       :   Dict=1			,						_A       :   str=0			,						_A       :   str=2			,						_A       :   List[str]=10_24			,						_A       :   Optional[Any]=1_28			,						_A       :   Union[str, Any]=1_28			,						_A       :   Union[str, Any]=True			,						_A       :   Union[str, Any]=32			,						_A       :   Any=1_28			,						_A       :   Optional[Any]=64			,						_A       :   List[Any]=2_56			,						_A       :   str=True			,						_A       :   List[Any]=True			,						_A       :   Tuple=True			,						_A       :   Tuple=2_24			,						_A       :   Tuple=3			,						_A       :   Optional[Any]=16			,						_A       :   Tuple=None			,						**_A       :   Optional[int]			,						)					->			Optional[int]:
					super().__init__(
					    vocab_size=_A			,						hidden_size=_A			,						num_hidden_layers=_A			,						num_attention_heads=_A			,						intermediate_size=_A			,						hidden_act=_A			,						hidden_dropout_prob=_A			,						attention_probs_dropout_prob=_A			,						max_position_embeddings=_A			,						type_vocab_size=_A			,						initializer_range=_A			,						layer_norm_eps=_A			,						pad_token_id=_A			,						bos_token_id=_A			,						eos_token_id=_A			,						**_A			,						)
					__snake_case    :							List[Any]   	=				max_ad_position_embeddings
					__snake_case    :							List[str]   	=				coordinate_size
					__snake_case    :							int   	=				shape_size
					__snake_case    :							List[str]   	=				has_relative_attention_bias
					__snake_case    :							Union[str, Any]   	=				rel_pos_bins
					__snake_case    :							Tuple   	=				max_rel_pos
					__snake_case    :							Optional[Any]   	=				has_spatial_attention_bias
					__snake_case    :							Union[str, Any]   	=				rel_ad_pos_bins
					__snake_case    :							Any   	=				max_rel_ad_pos
					__snake_case    :							Tuple   	=				text_embed
					__snake_case    :							str   	=				visual_embed
					__snake_case    :							List[str]   	=				input_size
					__snake_case    :							List[Any]   	=				num_channels
					__snake_case    :							Union[str, Any]   	=				patch_size
					__snake_case    :							str   	=				classifier_dropout







class 	UpperCamelCase    (					lowercase		):
				UpperCAmelCase       :   Optional[int]					=	version.parse("""1.12"""		)



				@property
				def       _lowercase  (self       :   Optional[int])					->			Mapping[str, Mapping[int, str]]:
					# The order of inputs is different for question answering and sequence classification
					if self.task in ["question-answering", "sequence-classification"]:
						return OrderedDict(
						    [
						        ('input_ids', {0: 'batch', 1: 'sequence'}),
						        ('attention_mask', {0: 'batch', 1: 'sequence'}),
						        ('bbox', {0: 'batch', 1: 'sequence'}),
						        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
						    ])
					else:
						return OrderedDict(
						    [
						        ('input_ids', {0: 'batch', 1: 'sequence'}),
						        ('bbox', {0: 'batch', 1: 'sequence'}),
						        ('attention_mask', {0: 'batch', 1: 'sequence'}),
						        ('pixel_values', {0: 'batch', 1: 'num_channels'}),
						    ])



				@property
				def       _lowercase  (self       :   Tuple)					->			float:
					return 1E-5



				@property
				def       _lowercase  (self       :   Optional[int])					->			int:
					return 12






				def       _lowercase  (self       :   str			,						_A       :   "ProcessorMixin"			,						_A       :   int = -1			,						_A       :   int = -1			,						_A       :   bool = False			,						_A       :   Optional["TensorType"] = None			,						_A       :   int = 3			,						_A       :   int = 40			,						_A       :   int = 40			,						)					->			Mapping[str, Any]:
					setattr(processor.image_processor			,						'apply_ocr'			,						_A)

					# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
					__snake_case    :							Union[str, Any]   	=				compute_effective_axis_dimension(
					    _A			,						fixed_dimension=OnnxConfig.default_fixed_batch			,						num_token_to_add=0)
					# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
					__snake_case    :							Any   	=				processor.tokenizer.num_special_tokens_to_add(_A)
					__snake_case    :							Optional[int]   	=				compute_effective_axis_dimension(
					    _A			,						fixed_dimension=OnnxConfig.default_fixed_sequence			,						num_token_to_add=_A)
					# Generate dummy inputs according to compute batch and sequence
					__snake_case    :							Optional[int]   	=				[[' '.join([processor.tokenizer.unk_token]) * seq_length]] * batch_size

					# Generate dummy bounding boxes
					__snake_case    :							Dict   	=				[[[48, 84, 73, 1_28]]] * batch_size

					# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
					# batch_size = compute_effective_axis_dimension(batch_size, fixed_dimension=OnnxConfig.default_fixed_batch)
					__snake_case    :							Optional[Any]   	=				self._generate_dummy_images(_A			,						_A			,						_A			,						_A)

					__snake_case    :							Dict   	=				dict(
					    processor(
					        _A			,						text=_A			,						boxes=_A			,						return_tensors=_A			,						))

					return inputs





