class_docstr: A modified wrapper for a public python BPE tokenizer. The modifications allow encoding directly into the formats
  required for finetune. Particularly with respect to formatting with multiple inputs.
class_docstr_tok: ["A","modified","wrapper","for","a","public","python","BPE","tokenizer",".","The","modifications","allow","encoding","directly","into","the","formats","required","for","finetune",".","Particularly","with","respect","to","formatting","with","multiple","inputs","."]
code: def init_encoders(self):
      self.byte_encoder = bytes_to_unicode()
      self.byte_decoder = {v: k for k, v in self.byte_encoder.items()}
  
      # Should haved added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions
      self.pat = re.compile(
          r"""'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+"""
      )
  
file_path: finetune/finetune/base_models/gpt2/encoder.py
imports: import os
  import json
  import traceback
  import regex
  from functools import lru_cache
  import numpy
  import finetune
  from finetune.encoding.input_encoder import BaseEncoder, EncodedOutput, get_pairs
label_desc: Use image node_id 2 for calling the GPT2Encoder obj's underlying member method code with example usage: obj.init_encoders() without return types