class_docstr: Base Tensorizer class for all BERT style models including XLM,
  RoBERTa and XLM-R.
class_docstr_tok: ["Base","Tensorizer","class","for","all","BERT","style","models","including","XLM",",","RoBERTa","and","XLM-R","."]
code: def __init__(
      self,
      columns: List[str] = Config.columns,
      vocab: Vocabulary = None,
      tokenizer: Tokenizer = None,
      max_seq_len: int = Config.max_seq_len,
      base_tokenizer: Tokenizer = None,
  ) -> None:
      super().__init__()
      self.columns = columns
      self.vocab = vocab
      self.tokenizer = tokenizer
      self.base_tokenizer = base_tokenizer
      self.max_seq_len = max_seq_len
      # Needed to ensure that we're not masking special tokens. By default
      # we use the BOS token from the vocab. If a class has different
      # behavior (eg: XLM), it needs to override this.
      self.bos_token = self.vocab.bos_token
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
  from fairseq.data.dictionary import Dictionary
  from fairseq.data.legacy.masked_lm_dictionary import BertDictionary
  from pytext import resources
  from pytext.common.constants import Token
  from pytext.config.component import ComponentType, create_component
  from pytext.data.tensorizers import Tensorizer, TensorizerScriptImpl
  from pytext.data.tokenizers import Tokenizer, WordPieceTokenizer
  from pytext.data.utils import BOS, EOS, MASK, PAD, UNK, Vocabulary
  from pytext.torchscript.tensorizer.tensorizer import VocabLookup
  from pytext.torchscript.utils import pad_2d_mask, ScriptBatchInput
  from pytext.torchscript.vocab import ScriptVocabulary
  from pytext.utils.file_io import PathManager
  from pytext.utils.lazy import lazy_property
  from pytorch.text.fb.utils.transform_utils import pad_2d
label_desc: Use image node_id 1 to create a new BERTTensorizerBase object from inherited base classes: Tensorizer with example: obj = BERTTensorizerBase(columns, vocab, tokenizer, max_seq_len, base_tokenizer)