salesforce / ctrl

Conditional Transformer Language Model for Controllable Generation
https://arxiv.org/abs/1909.05858
BSD 3-Clause "New" or "Revised" License
1.87k stars 208 forks source link

repeats the last word on AWS #71

Open dataSci-rigo opened 4 years ago

dataSci-rigo commented 4 years ago

When trying to run CTRL on EC2,

python2 generation.py --model seqlen512_v1.ckpt/model.ckpt-740000.data-00000-of-00001 --temperature 0.2 --topk 5

I get results that look like this "Wikipedia Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry Jerry" When I run this in colab I don't have any issues. I also don't get the following warnings. Has anyone see problems like this before?

WARNING:tensorflow:Entity <bound method MultiHeadAttention.call of <transformer.MultiHeadAttention object at 0x7f6d8007d390>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method MultiHeadAttention.call of <transformer.MultiHeadAttention object at 0x7f6d8007d390>>: AttributeError: 'module' object has no attribute 'Num' WARNING:tensorflow:Entity <bound method EncoderLayer.call of <transformer.EncoderLayer object at 0x7f6d80011050>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method EncoderLayer.call of <transformer.EncoderLayer object at 0x7f6d80011050>>: AssertionError: Bad argument number for Name: 3, expecting 4

jrocktorrens commented 2 years ago

Im having the same issue, have you succeeded to find a solution?