

"""simple docstring"""






from copy import deepcopy

import torch
import torch.nn.functional as F
from torch.optim import AdamW
from torch.optim.lr_scheduler import LambdaLR
from torch.utils.data import DataLoader

from accelerate.accelerator import Accelerator
from accelerate.state import GradientState
from accelerate.test_utils import RegressionDataset, RegressionModel
from accelerate.utils import DistributedType, is_torch_version, set_seed





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase      ,   __UpperCamelCase      ,   __UpperCamelCase						) ->      Dict:




 for param, grad_param in zip(model_a.parameters()      ,   model_b.parameters()						):
  if not param.requires_grad:
   continue
  if not did_step:
   # Grads should not be in sync
   assert (
       torch.allclose(param.grad      ,   grad_param.grad						) is False
   ), f'''Gradients in sync when they should not be at iteration {iteration}:\nmodel_a grad ({param.grad}) == model_b grad ({grad_param.grad})'''
  else:
   # Grads should be in sync
   assert (
       torch.allclose(param.grad      ,   grad_param.grad						) is True
   ), f'''Gradients not in sync when they should be at iteration {iteration}:\nmodel_a grad ({param.grad}) != model_b grad ({grad_param.grad})'''





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase      ,   __UpperCamelCase      ,   __UpperCamelCase      ,   __UpperCamelCase=True						) ->      str:
 model.train()
 __magic_name__     =      model(__A						)
 __magic_name__     =      F.mse_loss(__A      ,   target.to(output.device						)						)
 if not do_backward:
  loss /= accelerator.gradient_accumulation_steps
  loss.backward()
 else:
  accelerator.backward(__A						)





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase=False						) ->      Optional[Any]:
 set_seed(42						)
 __magic_name__     =      RegressionModel()
 __magic_name__     =      deepcopy(__A						)
 __magic_name__     =      RegressionDataset(length=80						)
 __magic_name__     =      DataLoader(__A      ,   batch_size=16						)
 model.to(accelerator.device						)
 if sched:
  __magic_name__     =      AdamW(params=model.parameters()      ,   lr=1e-3						)
  __magic_name__     =      AdamW(params=ddp_model.parameters()      ,   lr=1e-3						)
  __magic_name__     =      LambdaLR(__A      ,   lr_lambda=lambda __UpperCamelCase						: epoch**0.65						)
  __magic_name__     =      LambdaLR(__A      ,   lr_lambda=lambda __UpperCamelCase						: epoch**0.65						)
 # Make a copy of `model`
 if sched:
  __magic_name__     =      accelerator.prepare(__A      ,   __A      ,   __A      ,   __A						)
 else:
  __magic_name__     =      accelerator.prepare(__A      ,   __A						)
 if sched:
  return (model, opt, sched, dataloader, ddp_model, ddp_opt, ddp_sched)
 return model, ddp_model, dataloader





def 	lowercase      (   __UpperCamelCase						) ->      Tuple:
 __magic_name__     =      get_training_setup(__A						)
 # Use a single batch
 __magic_name__     =      next(iter(__A						)						).values()
 for iteration in range(3						):
  # Gather the distributed inputs and targs for the base model
  __magic_name__     =      accelerator.gather((ddp_input, ddp_target)						)
  __magic_name__     =      input.to(accelerator.device						), target.to(accelerator.device						)
  # Perform our initial ground truth step in non "DDP"
  step_model(__A      ,   __A      ,   __A      ,   __A						)
  # Do "gradient accumulation" (noop)
  if iteration % 2 == 0:
   # Accumulate grads locally
   with accelerator.no_sync(__A						):
    step_model(__A      ,   __A      ,   __A      ,   __A						)
  else:
   # Sync grads
   step_model(__A      ,   __A      ,   __A      ,   __A						)

  # Since `no_sync` is a noop, `ddp_model` and `model` grads should always be in sync
  check_model_parameters(__A      ,   __A      ,   __A      ,   __A						)
  for param, ddp_param in zip(model.parameters()      ,   ddp_model.parameters()						):
   if not param.requires_grad:
    continue
   assert torch.allclose(
       param.grad      ,   ddp_param.grad						), f'''Gradients not in sync when they should be:\nModel grad ({param.grad}) != DDP grad ({ddp_param.grad})'''

  # Shuffle ddp_input on each iteration
  torch.manual_seed(1337 + iteration						)
  __magic_name__     =      ddp_input[torch.randperm(len(__A						)						)]





def 	lowercase      (   __UpperCamelCase						) ->      Optional[int]:
 __magic_name__     =      get_training_setup(__A						)
 # Use a single batch
 __magic_name__     =      next(iter(__A						)						).values()
 for iteration in range(3						):
  # Gather the distributed inputs and targs for the base model
  __magic_name__     =      accelerator.gather((ddp_input, ddp_target)						)
  __magic_name__     =      input.to(accelerator.device						), target.to(accelerator.device						)
  # Perform our initial ground truth step in non "DDP"
  step_model(__A      ,   __A      ,   __A      ,   __A						)
  # Do "gradient accumulation" (noop)
  if iteration % 2 == 0:
   # Accumulate grads locally
   with accelerator.no_sync(__A						):
    step_model(__A      ,   __A      ,   __A      ,   __A						)
  else:
   # Sync grads
   step_model(__A      ,   __A      ,   __A      ,   __A						)

  # DDP model and model should only be in sync when not (iteration % 2 == 0)
  for param, ddp_param in zip(model.parameters()      ,   ddp_model.parameters()						):
   if not param.requires_grad:
    continue
   if iteration % 2 == 0:
    # Grads should not be in sync
    assert (
        torch.allclose(param.grad      ,   ddp_param.grad						) is False
    ), f'''Gradients in sync when they should not be:\nModel grad ({param.grad}) == DDP grad ({ddp_param.grad})'''
   else:
    # Grads should be in sync
    assert (
        torch.allclose(param.grad      ,   ddp_param.grad						) is True
    ), f'''Gradients not in sync when they should be:\nModel grad ({param.grad}) != DDP grad ({ddp_param.grad})'''

        # Shuffle ddp_input on each iteration
  torch.manual_seed(1337 + iteration						)
  __magic_name__     =      ddp_input[torch.randperm(len(__A						)						)]





def 	lowercase      (   __UpperCamelCase=False      ,   __UpperCamelCase=False						) ->      Union[str, Any]:
 __magic_name__     =      Accelerator(
     split_batches=__A      ,   dispatch_batches=__A      ,   gradient_accumulation_steps=2						)
 # Test that context manager behaves properly
 __magic_name__     =      get_training_setup(__A						)
 for iteration, batch in enumerate(__A						):
  __magic_name__     =      batch.values()
  # Gather the distributed inputs and targs for the base model
  __magic_name__     =      accelerator.gather((ddp_input, ddp_target)						)
  __magic_name__     =      input.to(accelerator.device						), target.to(accelerator.device						)
  # Perform our initial ground truth step in non "DDP"
  step_model(__A      ,   __A      ,   __A      ,   __A      ,   __A						)
  # Do "gradient accumulation" (noop)
  with accelerator.accumulate(__A						):
   step_model(__A      ,   __A      ,   __A      ,   __A						)

  # DDP model and model should only be in sync when not (iteration % 2 == 0)
  for param, ddp_param in zip(model.parameters()      ,   ddp_model.parameters()						):
   if not param.requires_grad:
    continue
   if ((iteration + 1) % 2 == 0) or (iteration == len(__A						) - 1):
    # Grads should be in sync
    assert (
        torch.allclose(param.grad      ,   ddp_param.grad						) is True
    ), f'''Gradients not in sync when they should be at iteration {iteration}:\nModel grad ({param.grad}) != DDP grad ({ddp_param.grad})'''
   else:
    # Grads should not be in sync
    assert (
        torch.allclose(param.grad      ,   ddp_param.grad						) is False
    ), f'''Gradients in sync when they should not be at iteration {iteration}:\nModel grad ({param.grad}) == DDP grad ({ddp_param.grad})'''

        # Shuffle ddp_input on each iteration
  torch.manual_seed(1337 + iteration						)
  __magic_name__     =      ddp_input[torch.randperm(len(__A						)						)]
 GradientState._reset_state()





def 	lowercase      (   __UpperCamelCase=False      ,   __UpperCamelCase=False						) ->      Union[str, Any]:
 __magic_name__     =      Accelerator(
     split_batches=__A      ,   dispatch_batches=__A      ,   gradient_accumulation_steps=2						)
 # Test that context manager behaves properly
 __magic_name__     =      get_training_setup(__A      ,   __A						)
 for iteration, batch in enumerate(__A						):
  __magic_name__     =      batch.values()
  # Gather the distributed inputs and targs for the base model
  __magic_name__     =      accelerator.gather((ddp_input, ddp_target)						)
  __magic_name__     =      input.to(accelerator.device						), target.to(accelerator.device						)
  # Perform our initial ground truth step in non "DDP"
  model.train()
  ddp_model.train()
  step_model(__A      ,   __A      ,   __A      ,   __A      ,   __A						)
  opt.step()

  if ((iteration + 1) % 2 == 0) or ((iteration + 1) == len(__A						)):
   if split_batches:
    sched.step()
   else:
    for _ in range(accelerator.num_processes						):
     sched.step()
  opt.zero_grad()
  # Perform gradient accumulation under wrapper
  with accelerator.accumulate(__A						):
   step_model(__A      ,   __A      ,   __A      ,   __A						)
   ddp_opt.step()
   ddp_sched.step()
   ddp_opt.zero_grad()

  # Learning rates should be the same
  assert (
      opt.param_groups[0]["lr"] == ddp_opt.param_groups[0]["lr"]
  ), f'''Learning rates found in each optimizer did not align\nopt: {opt.param_groups[0]["lr"]}\nDDP opt: {ddp_opt.param_groups[0]["lr"]}\n'''
  __magic_name__     =      (((iteration + 1) % 2) == 0) or ((iteration + 1) == len(__A						))
  if accelerator.num_processes > 1:
   check_model_parameters(__A      ,   __A      ,   __A      ,   __A						)
  # Shuffle ddp_input on each iteration
  torch.manual_seed(1337 + iteration						)
 GradientState._reset_state()





def 	lowercase      (   ) ->      Union[str, Any]:
 __magic_name__     =      Accelerator()

 __magic_name__     =      RegressionDataset(length=80						)
 __magic_name__     =      DataLoader(__A      ,   batch_size=16						)
 __magic_name__     =      RegressionDataset(length=96						)
 __magic_name__     =      DataLoader(__A      ,   batch_size=16						)
 __magic_name__     =      accelerator.prepare(__A      ,   __A						)
 assert accelerator.gradient_state.active_dataloader is None
 for iteration, _ in enumerate(__A						):
  assert id(accelerator.gradient_state.active_dataloader						) == id(__A						)
  if iteration < len(__A						) - 1:
   assert not accelerator.gradient_state.end_of_dataloader
   if iteration == 1:
    for batch_num, _ in enumerate(__A						):
     assert id(accelerator.gradient_state.active_dataloader						) == id(__A						)
     if batch_num < len(__A						) - 1:
      assert not accelerator.gradient_state.end_of_dataloader
     else:
      assert accelerator.gradient_state.end_of_dataloader
  else:
   assert accelerator.gradient_state.end_of_dataloader
 assert accelerator.gradient_state.active_dataloader is None





def 	lowercase      (   ) ->      Tuple:
 __magic_name__     =      Accelerator()
 __magic_name__     =      accelerator.state
 if state.local_process_index == 0:
  print('''**Test `accumulate` gradient accumulation with dataloader break**'''						)
 test_dataloader_break()
 if state.distributed_type == DistributedType.NO:
  if state.local_process_index == 0:
   print('''**Test NOOP `no_sync` context manager**'''						)
  test_noop_sync(__A						)
 if state.distributed_type in (DistributedType.MULTI_GPU, DistributedType.MULTI_CPU):
  if state.local_process_index == 0:
   print('''**Test Distributed `no_sync` context manager**'''						)
  test_distributed_sync(__A						)
 if state.distributed_type == DistributedType.MULTI_GPU:
  for split_batch in [True, False]:
   for dispatch_batches in [True, False]:
    if state.local_process_index == 0:
     print(
         '''**Test `accumulate` gradient accumulation, '''      ,   f'''`split_batches={split_batch}` and `dispatch_batches={dispatch_batches}`**'''      ,   )
    test_gradient_accumulation(__A      ,   __A						)

    # Currently will break on torch 2.0 +, need to investigate why
 if is_torch_version('''<'''      ,   '''2.0'''						) or state.distributed_type == DistributedType.NO:
  if state.local_process_index == 0:
   print(
       '''**Test `accumulate` gradient accumulation with optimizer and scheduler, '''      ,   '''`split_batches=False`, `dispatch_batches=False`**'''      ,   )
  test_gradient_accumulation_with_opt_and_scheduler()
  if state.distributed_type == DistributedType.MULTI_GPU:
   for split_batch in [True, False]:
    for dispatch_batches in [True, False]:
     if not split_batch and not dispatch_batches:
      continue
     if state.local_process_index == 0:
      print(
          '''**Test `accumulate` gradient accumulation with optimizer and scheduler, '''      ,   f'''`split_batches={split_batch}` and `dispatch_batches={dispatch_batches}`**'''      ,   )
     test_gradient_accumulation_with_opt_and_scheduler(__A      ,   __A						)





def 	lowercase      (   __UpperCamelCase						) ->      Tuple:
 main()


if __name__ == "__main__":
       main()




"""simple docstring"""






import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_bert import BertTokenizer


__lowerCamelCase										=		logging.get_logger(__name__)

__lowerCamelCase										=		{"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

__lowerCamelCase										=		{
    "vocab_file": {
        "bert-base-uncased": "https://huggingface.co/bert-base-uncased/resolve/main/vocab.txt",
        "bert-large-uncased": "https://huggingface.co/bert-large-uncased/resolve/main/vocab.txt",
        "bert-base-cased": "https://huggingface.co/bert-base-cased/resolve/main/vocab.txt",
        "bert-large-cased": "https://huggingface.co/bert-large-cased/resolve/main/vocab.txt",
        "bert-base-multilingual-uncased": (
            "https://huggingface.co/bert-base-multilingual-uncased/resolve/main/vocab.txt"
        ),
        "bert-base-multilingual-cased": "https://huggingface.co/bert-base-multilingual-cased/resolve/main/vocab.txt",
        "bert-base-chinese": "https://huggingface.co/bert-base-chinese/resolve/main/vocab.txt",
        "bert-base-german-cased": "https://huggingface.co/bert-base-german-cased/resolve/main/vocab.txt",
        "bert-large-uncased-whole-word-masking": (
            "https://huggingface.co/bert-large-uncased-whole-word-masking/resolve/main/vocab.txt"
        ),
        "bert-large-cased-whole-word-masking": (
            "https://huggingface.co/bert-large-cased-whole-word-masking/resolve/main/vocab.txt"
        ),
        "bert-large-uncased-whole-word-masking-finetuned-squad": (
            "https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/vocab.txt"
        ),
        "bert-large-cased-whole-word-masking-finetuned-squad": (
            "https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad/resolve/main/vocab.txt"
        ),
        "bert-base-cased-finetuned-mrpc": (
            "https://huggingface.co/bert-base-cased-finetuned-mrpc/resolve/main/vocab.txt"
        ),
        "bert-base-german-dbmdz-cased": "https://huggingface.co/bert-base-german-dbmdz-cased/resolve/main/vocab.txt",
        "bert-base-german-dbmdz-uncased": (
            "https://huggingface.co/bert-base-german-dbmdz-uncased/resolve/main/vocab.txt"
        ),
        "TurkuNLP/bert-base-finnish-cased-v1": (
            "https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1/resolve/main/vocab.txt"
        ),
        "TurkuNLP/bert-base-finnish-uncased-v1": (
            "https://huggingface.co/TurkuNLP/bert-base-finnish-uncased-v1/resolve/main/vocab.txt"
        ),
        "wietsedv/bert-base-dutch-cased": (
            "https://huggingface.co/wietsedv/bert-base-dutch-cased/resolve/main/vocab.txt"
        ),
    },
    "tokenizer_file": {
        "bert-base-uncased": "https://huggingface.co/bert-base-uncased/resolve/main/tokenizer.json",
        "bert-large-uncased": "https://huggingface.co/bert-large-uncased/resolve/main/tokenizer.json",
        "bert-base-cased": "https://huggingface.co/bert-base-cased/resolve/main/tokenizer.json",
        "bert-large-cased": "https://huggingface.co/bert-large-cased/resolve/main/tokenizer.json",
        "bert-base-multilingual-uncased": (
            "https://huggingface.co/bert-base-multilingual-uncased/resolve/main/tokenizer.json"
        ),
        "bert-base-multilingual-cased": (
            "https://huggingface.co/bert-base-multilingual-cased/resolve/main/tokenizer.json"
        ),
        "bert-base-chinese": "https://huggingface.co/bert-base-chinese/resolve/main/tokenizer.json",
        "bert-base-german-cased": "https://huggingface.co/bert-base-german-cased/resolve/main/tokenizer.json",
        "bert-large-uncased-whole-word-masking": (
            "https://huggingface.co/bert-large-uncased-whole-word-masking/resolve/main/tokenizer.json"
        ),
        "bert-large-cased-whole-word-masking": (
            "https://huggingface.co/bert-large-cased-whole-word-masking/resolve/main/tokenizer.json"
        ),
        "bert-large-uncased-whole-word-masking-finetuned-squad": (
            "https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/tokenizer.json"
        ),
        "bert-large-cased-whole-word-masking-finetuned-squad": (
            "https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad/resolve/main/tokenizer.json"
        ),
        "bert-base-cased-finetuned-mrpc": (
            "https://huggingface.co/bert-base-cased-finetuned-mrpc/resolve/main/tokenizer.json"
        ),
        "bert-base-german-dbmdz-cased": (
            "https://huggingface.co/bert-base-german-dbmdz-cased/resolve/main/tokenizer.json"
        ),
        "bert-base-german-dbmdz-uncased": (
            "https://huggingface.co/bert-base-german-dbmdz-uncased/resolve/main/tokenizer.json"
        ),
        "TurkuNLP/bert-base-finnish-cased-v1": (
            "https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1/resolve/main/tokenizer.json"
        ),
        "TurkuNLP/bert-base-finnish-uncased-v1": (
            "https://huggingface.co/TurkuNLP/bert-base-finnish-uncased-v1/resolve/main/tokenizer.json"
        ),
        "wietsedv/bert-base-dutch-cased": (
            "https://huggingface.co/wietsedv/bert-base-dutch-cased/resolve/main/tokenizer.json"
        ),
    },
}

__lowerCamelCase										=		{
    "bert-base-uncased": 5_12,
    "bert-large-uncased": 5_12,
    "bert-base-cased": 5_12,
    "bert-large-cased": 5_12,
    "bert-base-multilingual-uncased": 5_12,
    "bert-base-multilingual-cased": 5_12,
    "bert-base-chinese": 5_12,
    "bert-base-german-cased": 5_12,
    "bert-large-uncased-whole-word-masking": 5_12,
    "bert-large-cased-whole-word-masking": 5_12,
    "bert-large-uncased-whole-word-masking-finetuned-squad": 5_12,
    "bert-large-cased-whole-word-masking-finetuned-squad": 5_12,
    "bert-base-cased-finetuned-mrpc": 5_12,
    "bert-base-german-dbmdz-cased": 5_12,
    "bert-base-german-dbmdz-uncased": 5_12,
    "TurkuNLP/bert-base-finnish-cased-v1": 5_12,
    "TurkuNLP/bert-base-finnish-uncased-v1": 5_12,
    "wietsedv/bert-base-dutch-cased": 5_12,
}

__lowerCamelCase										=		{
    "bert-base-uncased": {"do_lower_case": True},
    "bert-large-uncased": {"do_lower_case": True},
    "bert-base-cased": {"do_lower_case": False},
    "bert-large-cased": {"do_lower_case": False},
    "bert-base-multilingual-uncased": {"do_lower_case": True},
    "bert-base-multilingual-cased": {"do_lower_case": False},
    "bert-base-chinese": {"do_lower_case": False},
    "bert-base-german-cased": {"do_lower_case": False},
    "bert-large-uncased-whole-word-masking": {"do_lower_case": True},
    "bert-large-cased-whole-word-masking": {"do_lower_case": False},
    "bert-large-uncased-whole-word-masking-finetuned-squad": {"do_lower_case": True},
    "bert-large-cased-whole-word-masking-finetuned-squad": {"do_lower_case": False},
    "bert-base-cased-finetuned-mrpc": {"do_lower_case": False},
    "bert-base-german-dbmdz-cased": {"do_lower_case": False},
    "bert-base-german-dbmdz-uncased": {"do_lower_case": True},
    "TurkuNLP/bert-base-finnish-cased-v1": {"do_lower_case": False},
    "TurkuNLP/bert-base-finnish-uncased-v1": {"do_lower_case": True},
    "wietsedv/bert-base-dutch-cased": {"do_lower_case": False},
}
class        _lowercase					(     __UpperCAmelCase     ):
     _lowerCamelCase     =       VOCAB_FILES_NAMES
     _lowerCamelCase     =       PRETRAINED_VOCAB_FILES_MAP
     _lowerCamelCase     =       PRETRAINED_INIT_CONFIGURATION
     _lowerCamelCase     =       PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     _lowerCamelCase     =       BertTokenizer







     def __init__(      self ,						UpperCamelCase_=None ,						UpperCamelCase_=None ,						UpperCamelCase_=True ,						UpperCamelCase_="[UNK]" ,						UpperCamelCase_="[SEP]" ,						UpperCamelCase_="[PAD]" ,						UpperCamelCase_="[CLS]" ,						UpperCamelCase_="[MASK]" ,						UpperCamelCase_=True ,						UpperCamelCase_=None ,						**UpperCamelCase_ ,						):
      super().__init__(
          UpperCamelCase_ ,						tokenizer_file=UpperCamelCase_ ,						do_lower_case=UpperCamelCase_ ,						unk_token=UpperCamelCase_ ,						sep_token=UpperCamelCase_ ,						pad_token=UpperCamelCase_ ,						cls_token=UpperCamelCase_ ,						mask_token=UpperCamelCase_ ,						tokenize_chinese_chars=UpperCamelCase_ ,						strip_accents=UpperCamelCase_ ,						**UpperCamelCase_ ,						)

      __magic_name__     =      json.loads(self.backend_tokenizer.normalizer.__getstate__()       )
      if (
          normalizer_state.get('''lowercase''' ,						UpperCamelCase_       ) != do_lower_case
          or normalizer_state.get('''strip_accents''' ,						UpperCamelCase_       ) != strip_accents
          or normalizer_state.get('''handle_chinese_chars''' ,						UpperCamelCase_       ) != tokenize_chinese_chars
      ):
       __magic_name__     =      getattr(UpperCamelCase_ ,						normalizer_state.pop('''type'''       )       )
       __magic_name__     =      do_lower_case
       __magic_name__     =      strip_accents
       __magic_name__     =      tokenize_chinese_chars
       __magic_name__     =      normalizer_class(**UpperCamelCase_       )

      __magic_name__     =      do_lower_case







     def 	lowerCAmelCase__    (      self ,						UpperCamelCase_ ,						UpperCamelCase_=None       ):
      __magic_name__     =      [self.cls_token_id] + token_ids_a + [self.sep_token_id]

      if token_ids_a:
       output += token_ids_a + [self.sep_token_id]

      return output







     def 	lowerCAmelCase__    (      self ,						UpperCamelCase_ ,						UpperCamelCase_ = None       ):
      __magic_name__     =      [self.sep_token_id]
      __magic_name__     =      [self.cls_token_id]
      if token_ids_a is None:
       return len(cls + token_ids_a + sep       ) * [0]
      return len(cls + token_ids_a + sep       ) * [0] + len(token_ids_a + sep       ) * [1]







     def 	lowerCAmelCase__    (      self ,						UpperCamelCase_ ,						UpperCamelCase_ = None       ):
      __magic_name__     =      self._tokenizer.model.save(UpperCamelCase_ ,						name=UpperCamelCase_       )
      return tuple(UpperCamelCase_       )

