Better HN
topnewbestaskshowjobs
Log inSign up

lvwarren

4 karma · joined Feb 11, 2023 (3y ago) · 3 submissions

Submissions

comment 3y ago · link · parent

Make this change in utils.py:

  def load_gpt2_params_from_tf_ckpt(tf_ckpt_path, hparams):
       [...]
        #name = name.removeprefix("model/")
        name = name[len('model/'):]
and you're cool example will run in Google Colab under Python 3.8 otherwise the 3.9 Jupyter patching is a headache.

comment 3y ago · link · parent

make this change and it will run under Python 3.8 in google colab

        #name = name.removeprefix("model/")
        name = name[len('model/'):]
in function: load_gpt2_params_from_tf_ckpt in the utils.py module