Giter VIP home page Giter VIP logo

Comments (3)

charlesxu90 avatar charlesxu90 commented on June 1, 2024

Or you can training on pretraining dataset with a small block_size, and fine-tune on the small dataset with a larger block_size?

That seems not reasonable to me as block_size influence the number of parameters of a BERT model.

from transpolymer.

ChangwenXu98 avatar ChangwenXu98 commented on June 1, 2024

Hi @charlesxu90,

Thanks for the question. The block_size is used to determine the maximum number of tokens for a sequence in one single task. Therefore, This hyperparameter is determined by the longest sequence length in the dataset (We don't want to truncate the sequence since the last few tokens also convey important information). We can definitely fix it to a large number to allow for all the datasets we use. However, in our case, the sequence length distributions of the datasets we use differ a lot. There's one dataset whose maximum sequence length is 411 and two datasets whose maximum sequence length is only 60. If we set block_size=411 for each task, the polymer sequences from short-length datasets will contain hundreds of mask tokens, which is a waste of memory. So this is the reason that we have different block_size for different tasks. Besides, there's a "max_position_embeddings" hyperparameter. As long as this one is fixed, the pretrained model could be loaded without any problem.

Hope this helps.

from transpolymer.

charlesxu90 avatar charlesxu90 commented on June 1, 2024

Thanks for the explanation. I thought 'max_position_embeddings' should be the same as 'block_size'. This is interesting to know such a difference.

from transpolymer.

Related Issues (13)

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.