mgrankin / ru_transformers

Apache License 2.0
776 stars 108 forks source link

model directory structure #14

Closed adworse closed 4 years ago

adworse commented 4 years ago

First of all, thank you so much for the incredible work on it.

I'm trying to reproduce your results locally, rest.py obviously expects some other gpt2 directory structure, with medium folder in it etc. I was able to make it work by moving some files around, but I believe it's still somehow wrong because the quality of generation is very much lower than yours on https://porfirevich.ru/

curl -i -X POST -H 'Content-Type: application/json' -d '{"prompt":"Московский городской суд вынес постановление об отмене признания Ираном вины в ракетной атаке на украинский Боинг","length":60,"num_samples":4}' http://0.0.0.0:8000/gpt2/medium/

Results are somewhat funny, but yours are so much better.

mgrankin commented 4 years ago

Hello Dima,

The model you've downloaded is trained on a huge dataset but it isn't fine-tuned on Pelevin in the end. That is why it's not as funny as the one on the website.

You can download all models

aws s3 sync --no-sign-request s3://models.dobro.ai/gpt2/ru all

And grab the one from Pelevin directory if you want the same results.

adworse commented 4 years ago

OMG, it works and it's hilarious! Thank you very much for all this, it was great fun to play with:)