You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<class 'model_center.model.basemodel.BaseModelOutput'>
Traceback (most recent call last):
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 203, in
main()
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 200, in main
finetune(args, tokenizer, model, optimizer, lr_scheduler, dataset, verbalizer)
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 130, in finetune
logits = logits.index_select(dim=-1, index=verbalizer)
AttributeError: 'BaseModelOutput' object has no attribute 'index_select'
Describe the bug
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.642 seconds.
Prefix dict has been built successfully.
Loading model cost 0.646 seconds.
Prefix dict has been built successfully.
Traceback (most recent call last):
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 203, in
main()
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 200, in main
finetune(args, tokenizer, model, optimizer, lr_scheduler, dataset, verbalizer)
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 130, in finetune
logits = logits.index_select(dim=-1, index=verbalizer)
AttributeError: 'BaseModelOutput' object has no attribute 'index_select'
tensor([[[ 24.5469, -16.3125, 12.9609, ..., -26.2656, 1.8779, -25.1406],
[ 30.8906, -16.9375, 9.6719, ..., -20.2969, 3.0117, -22.3125],
[ 30.8281, -21.5781, 11.2500, ..., -23.3750, 1.5078, -22.7812],
...,
[ 10.5469, 25.8438, 4.4414, ..., -10.7578, -8.1484, 11.7344],
[ 10.4688, 25.9062, 4.3164, ..., -10.6719, -8.1875, 11.6875],
[ 10.3828, 25.9844, 4.1797, ..., -10.5625, -8.2188, 11.6562]],
<class 'model_center.model.basemodel.BaseModelOutput'>
Traceback (most recent call last):
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 203, in
main()
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 200, in main
finetune(args, tokenizer, model, optimizer, lr_scheduler, dataset, verbalizer)
File "/data2/lvyang/ModelCenter-main/examples/cpm1/finetune_cpm1.py", line 130, in finetune
logits = logits.index_select(dim=-1, index=verbalizer)
AttributeError: 'BaseModelOutput' object has no attribute 'index_select'
Minimal steps to reproduce
Expected behavior
Screenshots
Environment:
torch 1.10.2+cu111
model_center 0.1.5
bmtrian 0.1.8
finetuning scripts:ModelCenter-main/examples/cpm1/finetun_cpm1.sh
code: ModelCenter-main/examples/cpm1/finetune_cpm1.py
The text was updated successfully, but these errors were encountered: