# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + id="KBkpRgBCBS2_"
# !pip install -q gpt-2-simple
import gpt_2_simple as gpt2
from datetime import datetime
from google.colab import files

# + id="P8wSlgXoDPCR"
gpt2.download_gpt2(model_name="124M")

# + id="6OFnPCLADfll"
file_name = "DickinsonCorpus.txt"

# + id="aeXshJM-Cuaf"
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=200,
              save_every=500
              )

StarcoderdataJupyterScriptsDedupFiltered