zzz47zzz / cet Goto Github PK
View Code? Open in Web Editor NEW[ACL2023] Preserving Commonsense Knowledge from Pre-trained Language Models via Causal Inference
Home Page: https://aclanthology.org/2023.acl-long.509/
[ACL2023] Preserving Commonsense Knowledge from Pre-trained Language Models via Causal Inference
Home Page: https://aclanthology.org/2023.acl-long.509/
如题,在/utils/data_utils.py, Line368,传入target_str。但是InputExample没有该字段。
按照源代码来跑,报错:AttributeError: 'DataParallel' object has no attribute 'train_model'
。定位到问题应该是运行 mian.py
中 model = torch.nn.DataParallel(model, device_ids=list(range(torch.cuda.device_count()))
后,model被封装成DataParallel类中的module。故擅自添加了 model = model.module
后不再报错。
但是用了DataParallel貌似仍然是单卡运行(4块可用)。请问该如何解决?
单卡跑的时候提示 CUDA out of memory
,batch_size用了默认的8,单个GPU内存10G,调整为3左右才可顺利跑起来。
main.py: Line262__getitem__()
-> utils/data_utils.py: self.tokenizer()
传入args.max_input_len并没有在parser中添加。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.