class_docstr: HuggingFace's ByteLevelBPE Tokenizer.
  
  Fast because Rust.
class_docstr_tok: ["HuggingFace","'s","ByteLevelBPE","Tokenizer",".","Fast","because","Rust","."]
docstr: Sync the dictionary agent with Hugging Face tokenizer's BPE dict.
  
  Called only once on initialization.
docstr_tok: ["Sync","the","dictionary","agent","with","Hugging","Face","tokenizer","'s","BPE","dict",".","Called","only","once","on","initialization","."]
code: def sync_with_dict(self, dict_agent):
      """
      Sync the dictionary agent with Hugging Face tokenizer's BPE dict.
  
      Called only once on initialization.
      """
      special_tokens = [
          dict_agent.null_token,
          dict_agent.start_token,
          dict_agent.end_token,
          dict_agent.unk_token,
      ]
      self.add_special_tokens(dict_agent, special_tokens)
  
      for i in range(
          self.tokenizer.get_vocab_size() - len(special_tokens)
      ):
          token = self.tokenizer.id_to_token(i)
          dict_agent.add_token(token)
          # We don't have access to the hugging face word frequency table,
          # just set it to 1 instead
          dict_agent.freq[token] = 1
  
imports: from parlai.core.params import ParlaiParser
  from abc import ABC, abstractmethod
  from functools import lru_cache
  import json
  import os
  import random
  import re
  from typing import Dict, List, Optional, Set, Tuple
  from typing_extensions import final
  from parlai.core.build_data import download, make_dir
  from parlai.core.opt import Opt
  from parlai.utils.misc import warn_once
  from parlai.utils.typing import TShared
  from parlai.utils.io import PathManager
  import parlai.utils.logging
label_desc: Use image node_id 5 for calling the HuggingFaceBpeHelper obj's underlying member method code with example usage: obj.sync_with_dict(dict_agent) without return types