Open thiagorova opened 4 years ago
Having same issue is there a resolution
A Finetuning session for the same model does this.
A simple workaround is to add
import tensorflow as tf
tf.reset_default_graph()
before your gpt2.finetune(..)
sample code:
def generate(input_file_name, nsamples=5000, model="124M"):
import tensorflow as tf
tf.reset_default_graph()
if not os.path.isdir(os.path.join("models","124M")):
print("Downloading the model : 124M pretrained, 500M final tuning")
gpt2.download_gpt2(model_name="124M")
filename=input_file_name
sess=gpt2.start_tf_sess()
gpt2.finetune(sess, dataset=filename, model_name=model, steps=2000, print_every=10, sample_every=49, save_every=100)
Hi I try this and the error still persist. Is there anyway resolution? Thank you
Also having this issue and also:
I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
This is because Tensorflow compile their binaries to support as many CPUs as possible. Not every CPU has AVX2, so Tensorflow isn't compiled to use it. It won't effect any of your code, but will effect performance. To compile from source, you can follow instructions on their website.
I compiled tensorflow-1.15.0 but still getting the error.
When compiling, you should be asked if you want to build with avx support. Enter the correct flags. E.g. /arch:AVX2. Then build the pip package and install.
Seems like the google storage objects used in this repo are not publicly available anymore. I worked around this by running a separate script here https://github.com/nshepperd/gpt-2/blob/finetuning/download_model.py#L19 which downloads the model correctly.
No dice.. use this instead
!git clone https://github.com/ilopezfr/gpt-2/
import os
os.chdir('gpt-2')
#Download model weights with
# !python download_model.py 117M
# !python download_model.py 345M
#!python download_model.py 774M
Hi! first of all, thanks a lot! Also, this is probably related to #97 and #96.
I'm running this from the pip installed version rather than straight from code. My computer is a MacOS Sierra.
As you can see below, I'm running finetune on a custom file called WPT.npz, generated here: nshepperd.
It's supposed to be a simple test where I added some Wikipedia files from the Portuguese dump to the original 117M gpt-2 training model.
I'm guessing that I'm doing something wrong, I just can't discover what. Any help would really be appreciated!
output (clean):
output (with some TensorFlow FutureWarnings. I doubt this has any use, but...)