Giter Club home page Giter Club logo

Comments (5)

Tongjilibo avatar Tongjilibo commented on May 18, 2024

我给的示例代码,学习率固定,没有weight_decay,额外增加的网络结构我是随机初始化,这些一致不?我之前也跑了实验结果在performance里面,你跑的结果差不多嘛?方便的话可以把hugging face的代码发我,我这也排查下?防止是我的代码问题

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 18, 2024

我猜想是不是你的预训练模型有部分权重没有正确加载,使用bert4torch时候你warning提示吗

from bert4torch.

Bobo1204 avatar Bobo1204 commented on May 18, 2024

早上拉取了bert4torch的最新代码,测试了开源情感数据和一个我们自己的标注数据分类模型,收敛很快,3~6轮之间基本上达到最佳表现。

上面的问题我大概是五六月份用bert4torch测试的时候出现的,然后工作中就都用hugging face的tokenizer和model。尴尬...大佬牛逼

预训练模型加载,如果是hugging face上面的bert-base,'LayerNorm.gamma', 'LayerNorm.beta'和框架不一致,会有warning。以前我改了bert4torch/models.py中的映射,后来看到convert_scripts,改了权重里面的名称。改完效果提升在2~3个点之间。

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 18, 2024

嗯嗯,预训练权重有的不匹配,目前是convert脚本来修改后适配的

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 18, 2024

刚刚发现前两天修改的一个tokenizer读vocab.txt有个bug,刚刚已经修复,后续使用建议重新拉最新代码哈~

from bert4torch.

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.