parameters: (cls, pretrained_model_name_or_path, build_vocab_embs=False,
                          task_name='', cache_dir=None, *inputs, **kwargs)
return_statement: return tokenizer
docstring: Instantiate a PreTrainedBertModel from a pre-trained model file.
          Download and cache the pre-trained model file if needed.
docstring_summary: Instantiate a PreTrainedBertModel from a pre-trained model file.
          Download and cache the pre-trained model file if needed.
docstring_tokens: Instantiate a PreTrainedBertModel from a pre - trained model file . Download and cache the pre - trained model file if needed .
function: def from_pretrained(cls, pretrained_model_name_or_path, build_vocab_embs=False,
                          task_name='', cache_dir=None, *inputs, **kwargs):
          """
          Instantiate a PreTrainedBertModel from a pre-trained model file.
          Download and cache the pre-trained model file if needed.
          """
          if not build_vocab_embs:
              # assert pretrained_model_name_or_path in PRETRAINED_VOCAB_ARCHIVE_MAP
              resolved_vocab_file = os.path.join(pretrained_model_name_or_path, 'vocab.txt')
  
              max_len = 512
              kwargs['max_len'] = min(kwargs.get('max_len', int(1e12)), max_len)
              # Instantiate tokenizer.
              tokenizer = cls(resolved_vocab_file, *inputs, **kwargs)
          else:
              resolved_vocab_file = os.path.join(pretrained_model_name_or_path, task_name + '/vocab.txt')
              max_len = 512
              kwargs['max_len'] = min(kwargs.get('max_len', int(1e12)), max_len)
              # Instantiate tokenizer.
              tokenizer = cls(resolved_vocab_file, basic_only=True, *inputs, **kwargs)
  
          return tokenizer
function_tokens: def from_pretrained ( cls , pretrained_model_name_or_path , build_vocab_embs = False , task_name = '' , cache_dir = None , * inputs , * * kwargs ) : if not build_vocab_embs : # assert pretrained_model_name_or_path in PRETRAINED_VOCAB_ARCHIVE_MAP resolved_vocab_file = os . path . join ( pretrained_model_name_or_path , 'vocab.txt' ) max_len = 512 kwargs [ 'max_len' ] = min ( kwargs . get ( 'max_len' , int ( 1e12 ) ) , max_len ) # Instantiate tokenizer. tokenizer = cls ( resolved_vocab_file , * inputs , * * kwargs ) else : resolved_vocab_file = os . path . join ( pretrained_model_name_or_path , task_name + '/vocab.txt' ) max_len = 512 kwargs [ 'max_len' ] = min ( kwargs . get ( 'max_len' , int ( 1e12 ) ) , max_len ) # Instantiate tokenizer. tokenizer = cls ( resolved_vocab_file , basic_only = True , * inputs , * * kwargs ) return tokenizer