Replies: 1 comment
-
Hey @dkbs12, thank you for reporting this. I can reproduce your error and will open an issue to fix this. Until then, you can try downgrading the Haystack version to Issue is opened: #5114 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm reporting another error happened in trying on 'Tutorial: Fine-Tuning a Model on Your Own Data'.
When I was fine-tuning model as same as written in tutorial as below;
reader = FARMReader(model_name_or_path="distilbert-base-uncased-distilled-squad", use_gpu=True)
data_dir = "data/squad20"
reader.train(data_dir=data_dir, train_filename="dev-v2.0.json", use_gpu=True, n_epochs=1, save_dir="my_model")
I found the error message as below;
RuntimeError: stack expects each tensor to be equal size, but got [6, 2] at entry 0 and [5, 2] at entry 1
So, I decided to use the file 'train-v2.0.json' instead of 'dev-v2.0.json' and it works.
Did I do it right? I'm not confident.
By the way, I faced the similar case while I tried Running distillation later.
When I tried just as same as written in tutorial as below;
teacher = FARMReader(model_name_or_path="my_model", use_gpu=True)
student = FARMReader(model_name_or_path="huawei-noah/TinyBERT_General_6L_768D", use_gpu=True)
student.distil_intermediate_layers_from(teacher, data_dir=".", train_filename="augmented_dataset.json", use_gpu=True)
student.distil_prediction_layer_from(teacher, data_dir="data/squad20", train_filename="dev-v2.0.json", use_gpu=True)
student.save(directory="my_distilled_model")
Finally, I found the error message regarding 'student.distil_prediction_layer_from' as below;
RuntimeError: stack expects each tensor to be equal size, but got [5, 2] at entry 0 and [6, 2] at entry 2
I retried to use the file 'train-v2.0.json' instead of 'dev-v2.0.json' for student.distil_prediction_layer.
But, it's keep working over and over and never stops at this time.
Could you help me with this matter?
I'm sorry to bother you again.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions