Closed pwo42 closed 3 years ago
Thanks! What versions of torch and transformers?
Hi, they are:
torch==1.7.1 transformers==4.3.2
Thank you!
For now please use transformers<=3.5.1
Fixed. The reason was different default of BERT output format in transformers version >=4.0.0
Hi
When I run the "Basic usage" example in README, I received the error, "IndexError: string index out of range".
~\anaconda3\lib\site-packages\blanc\blanc.py in run_inference_batch(self, model, batch) 318 predictions = {} 319 for idx in model_input.masked_idxs: --> 320 predicted_id = model_output[idx].argmax() 321 (predicted_token,) = self.model_tokenizer.convert_ids_to_tokens([predicted_id]) 322 predictions[idx] = predicted_token
IndexError: string index out of range