Giter Site home page Giter Site logo

asappresearch / revisit-bert-finetuning Goto Github PK

View Code? Open in Web Editor NEW
184.0 184.0 14.0 367 KB

For the code release of our arXiv paper "Revisiting Few-sample BERT Fine-tuning" (https://arxiv.org/abs/2006.05987).

License: Other

Python 93.43% Shell 6.57%

revisit-bert-finetuning's People

Contributors

fwu-asapp avatar tianyi-asapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

revisit-bert-finetuning's Issues

BiasCorrection in AdamW

Great paper, thanks.

Quick question, am I correct to assume that the bias correction has been addressed in the transformers library? It seems that their new AdamW is taking an argument BiasCorrection, which evaluates to True by default, hence using BC.

Bug with exclude_last_group

The condition to trigger exclude_last_group is never True because "i" will always be smaller than len(self.param_groups). See #6

Pre-trained Weight Decay

Hi, thanks for the great paper and implementation. I have a question regarding pre-trained weight decay.

Assume I don't want to use layerwise learning rate decay (args.layerwise_learning_rate_decay == 1.0), in get_optimizer_grouped_parameters I will get two parameter groups: decay and no decay. Hence in PriorWD all initial parameters will be recorded

self.prior_params = {}
        for i, group in enumerate(self.param_groups):
            for p in group["params"]:
                self.prior_params[id(p)] = p.detach().clone()

In this case, during updating, all parameters will have a weight decay towards the initial value.
However, I suppose that we don't want the classification layer to decay towards the init values, so it seems that we should really create a separate parameter group for the classification layer.

I was wondering whether my reasoning would make sense to you, or where did I get it wrong?

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.