-
-
Save plzdontshare/f561ec9fea4c03c076e817af74440b84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%tensorflow_version 1.x | |
!pip install -q gpt-2-simple | |
import gpt_2_simple as gpt2 | |
from datetime import datetime | |
from google.colab import files | |
# Загружаем GPT-2 модель | |
# Тут 124M - это имя модели | |
# Можно так же использовать 355M | |
gpt2.download_gpt2(model_name="124M") | |
# Указываем имя файла который мы загрузили | |
file_name = "text.csv" | |
# Тут начинается действо: | |
sess = gpt2.start_tf_sess() | |
gpt2.finetune(sess, | |
dataset=file_name, | |
model_name='124M', | |
steps=1000, | |
restore_from='fresh', | |
run_name='run1', | |
print_every=10, | |
sample_every=100, | |
save_every=500 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment