text: 
  
  TITLE
  "special token {} has to be either str or AddedToken but got:
  
  COMMENTS
  8
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  Hello, two weeks ago I fine-tune the Roberta language model on my data using hugging face (codes given below) and save output at the google drive. Now when using it for semantic search with sentence transformer. I am getting the error that
  
  
  **"TypeError: special token bos_token has to be either str or AddedToken but got: <class 'dict'>"**
  
  ```
  
  from sentence_transformers import SentenceTransformer
  from sentence_transformers import models, losses
  import scipy.spatial
  import pickle as pkl
  word_embedding_model = models.RoBERTa("/content/drive/My Drive/Ottawa_citit")
  
  # Apply mean pooling to get one fixed sized sentence vector
  pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension(),
                                 pooling_mode_mean_tokens=True,
                                 pooling_mode_cls_token=False,
                                 pooling_mode_max_tokens=False)
  
  model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
  
   Previously fine-tuned Roberta
  
  `!python "/content/transformers/examples/contrib/legacy/run_language_modeling.py" \
      --output_dir "/content/drive/My Drive/Ottawa_citit" \
      --model_name_or_path roberta-base \
      --do_train \
      --per_gpu_train_batch_size 8 \
      --seed 42 \
      --train_data_file "/content/input_text.txt" \
      --block_size 256 \
      --line_by_line \
      --learning_rate 6e-4 \
      --num_train_epochs 3 \
      --save_total_limit 2 \
      --save_steps 200 \
      --weight_decay 0.01 \
       --mlm`
  ```