bert4torch icon indicating copy to clipboard operation
bert4torch copied to clipboard

An elegent pytorch implement of transformers

Results 33 bert4torch issues
Sort by recently updated
recently updated
newest added

通义千问Qwen的测试py,86行方法SeqGeneration,参数tokenizer_encode_config和tokenizer_decode_config报错,看了好像没有这两个参数?是我使用方法不对吗?

[issue](https://github.com/microsoft/onnxruntime/issues/16268) [issue](https://github.com/microsoft/onnxruntime/issues/16264)

我使用 **AutoModel.from_pretrained** 来替代 **build_transformer_model(config_path, checkpoint_path)** 作为backbone后,发现模型训练过程不会更新backbone的参数( requires_grad=True),而其他的加上的 linear 层还是正常更新的。 请问能提示下是哪里的问题吗?

您好,大佬,我用97M的deberta_v2模型训练多分类模型,发现保存的模型400M,有点没搞明白啊

提问时请尽可能提供如下信息: ### 基本信息 - 你使用的**操作系统**: CentOS Linux release 7.8.2003 (Core) - 你使用的**Python**版本: 3.8.5 - 你使用的**Pytorch**版本: 2.0.1 - 你使用的**bert4torch**版本: 0.2.8 - 你加载的**预训练模型**: 无 ### 核心代码 ``` pip install git+https://github.com/Tongjilibo/bert4torch git clone...

大佬,有意复现一下这篇CNER 吗?[Delving Deep into Regularity: A Simple but Effective Method for Chinese Named Entity Recognition](https://paperswithcode.com/paper/delving-deep-into-regularity-a-simple-but)

todo list

您好,W2NER模型如何load中文不连续实体呢?就像原文中的CADEC数据集一样的格式,以所有字符的下标数组作为实体位置标记: ```json { "sentence": ["For", "all", "of", "you", "who", "now", "have", "extremely", "low", "LDL", "and", "a", "bad", "case", "of", "joint", "pain", "to", "the", "extent", "that", "it", "is", "very", "arthritic", "or",...

todo list

提问时请尽可能提供如下信息: 基本信息 你使用的操作系统: ubuntu20.04 你使用的Python版本: 3.8.10 你使用的Pytorch版本: 1.10.2 你使用的bert4torch版本: 0.2.7.post2 你加载的预训练模型: bert-base ### 核心代码 ```python adversarial_train = AdversarialTraining('fgm') model, optimizer, train_dataloader, eval_dataloader, lr_scheduler, adversarial_train = accelerator.prepare( model, optimizer, train_dataloader, eval_dataloader,...

首先感谢并且欢迎给出宝贵建议的大佬们~,有的issue是关于想用的预训练模型没有内置,解释如下 - **原因**:有的模型的影响力没有那么大,个人开发精力有限,只能先维护好常用模型 - **建议方案**:bert4torch是支持加载transformers的模型的,此时bert4torch只是相当于一个trainer,具体的网络结构还是在transformers中,但是训练过程和callback的调用和原来一致,使用教程如下[tutorials_load_transformers_model.py](https://github.com/Tongjilibo/bert4torch/blob/master/examples/tutorials/tutorials_load_transformers_model.py) - **完美方案**:可以尝试自己用bert4torch实现,然后提pull request成为contributor,一起为社区做贡献