Code Monkey home page Code Monkey logo

Comments (5)

ConnorJL avatar ConnorJL commented on July 20, 2024 4

This is a known bug. I haven't yet had the time to track down the exact cause. Three things you can try are setting the precision to float32, use a GPU instead of a CPU or change the "train_batch_size" and "predict_batch_size" parameters to 1. Some of these seem to fix it sometimes. I will fix this bug when I have the time to actually track down its source.

The bug also shouldn't happen if you predict with a single word.

from gpt2.

minimaxir avatar minimaxir commented on July 20, 2024 3

I encountered the same issue working on gpt-2-simple: minimaxir/gpt-2-simple#38

The solution was to subtract the length of the prefix tokens from the maximum length to prevent OOB.

from gpt2.

tbfly avatar tbfly commented on July 20, 2024

Maybe you can try tensorflow==1.13.0
as:
https://medium.com/@NPCollapse/replicating-gpt2-1-5b-86454a7f26af
hints:

Tensorflow (I was using version 1.13) is…not perfect.

from gpt2.

kyb3r avatar kyb3r commented on July 20, 2024

I got the same error, here is the full output and traceback I got: https://hasteb.in/wilupika.py

Maybe it will be helpful :)

from gpt2.

ConnorJL avatar ConnorJL commented on July 20, 2024

Thanks minimaxir! I've implemented that fix now and think everything should be working. If this problem crops up again for anyone, feel free to reopen this issue.

from gpt2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.