Comments (3)
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.
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.
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)
- Finetuned model HOT 3
- Smiles Tokenization for Pretraining HOT 2
- Cloning Issue HOT 1
- Regarding Validation Error and Testing Error HOT 1
- Regarding Egc Dataset HOT 2
- Supplementary Vocab File HOT 4
- TypeError when using Downstream.py HOT 4
- Finetuning attention maps HOT 5
- Issues with the running of Downsteam.py HOT 1
- Question about Tokenizer HOT 2
- OSError: Can't load tokenizer for 'roberta-base'. HOT 1
- RuntimeError: Error(s) in loading state_dict for DownstreamRegression: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transpolymer.