Giter Site home page Giter Site logo

Comments (4)

rasbt avatar rasbt commented on August 20, 2024 1

Hi there,
this is expected because the GPT model only supports context lengths of up to 1024 tokens. I will add an info box to chapter 6 to make it more explicit. As a workaround, you can set max_length=1024 in the data loader.

from llms-from-scratch.

rasbt avatar rasbt commented on August 20, 2024 1

Yes, you can feed the input data in chunks. There are also alternative methods like LongLora to extend contexts windows. But these are techniques that are currently out of scope for this book. I am planning some day to also reimplement Llama 3 with a 8,192 tokens length, but this will probably be down the road in a few months. Also, not all readers have the necessary GPU to support that bit of a context length for finetuning.

So, I think the best way here would be to use models that natively support larger context lengths, like the Mixtral-8x7B model you suggested, if your hardware (GPU RAM) supports it,

from llms-from-scratch.

rasbt avatar rasbt commented on August 20, 2024

Added a warning about it via #176 . Thanks for reporting that.

from llms-from-scratch.

Ameet1992 avatar Ameet1992 commented on August 20, 2024

Hi,
GPT model only supports up to 1024 tokens, So we can use up to 1024 tokens only, Can't we use/implement for more than 1024 tokens using something like chunks/step-by-step feeding on the data loader side?
If not then, I need to explore fine-tuning for other models which support more than 10k tokens like Mixtral-8x7B...

from llms-from-scratch.

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.