INFO:interact.py:Get pretrained model and tokenizer
ftfy or spacy is not installed using BERT BasicTokenizer instead of SpaCy & ftfy.
Some weights of the model checkpoint at /tmp/tmpyfepv9pj were not used when initializing OpenAIGPTLMHeadModel: ['multiple_choice_head.summary.weight', 'multiple_choice_head.summary.bias']
- This IS expected if you are initializing OpenAIGPTLMHeadModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing OpenAIGPTLMHeadModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
INFO:interact.py:Sample a personality
2021-01-30 15:41:11.147627: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
INFO:interact.py:Selected personality:
>>> i am stuck
[[249, 1048, 3029]]
CausalLMOutput(loss=None, logits=tensor([[[ -8.6809, -6.6040, -13.2421, ..., -0.3766, -0.2954, -2.8872],
[ -6.4764, -5.8869, -12.1966, ..., -0.5273, -0.7109, -3.7030],
[ -8.2790, -7.2821, -13.0864, ..., -0.7790, -0.6198, -3.7207],
[ -8.1779, -6.7467, -12.0495, ..., -0.6559, -0.5704, -3.2958],
[-10.7485, -8.1295, -16.9996, ..., -1.5298, -0.8893, -4.5471],
[ -6.8998, -6.9460, -13.6065, ..., -0.9634, -0.8269, -3.9406]]]), hidden_states=None, attentions=None)
Traceback (most recent call last):
File "interact.py", line 242, in <module>
run()
File "interact.py", line 233, in run
out_ids = sample_sequence(personality, history, tokenizer, model, args)
File "interact.py", line 140, in sample_sequence
logits = logits[0, -1, :] / args.temperature
File "/usr/local/lib/python3.6/dist-packages/transformers/file_utils.py", line 1418, in __getitem__
return self.to_tuple()[k]
TypeError: tuple indices must be integers or slices, not tuple```