class_docstr: BERT encoder for pre-tokenized text.
class_docstr_tok: ["BERT","encoder","for","pre-tokenized","text","."]
code: def __init__(self, model_name_or_path: str):
      self.tokenizer = transformers.AutoTokenizer.from_pretrained(
          model_name_or_path
      )
      self.model = model_utils.load_pretrained(
          transformers.TFBertForMaskedLM,
          model_name_or_path,
          output_hidden_states=True,
          output_attentions=False,
      )
  
file_path: lit/lit_nlp/examples/coref/encoders.py
imports: import os
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.examples.coref import retokenize
  from lit_nlp.examples.models import model_utils
  from lit_nlp.lib import utils
  import numpy
  import tensorflow
  import transformers
label_desc: Use image node_id 2 to create a new BertEncoderWithOffsets object from inherited base classes: lit_model with example: obj = BertEncoderWithOffsets(model_name_or_path)