fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Cannot load model parameters from checkpoint ./bart.base/model.pt; please ensure that the architectures match.

Open krcc5978 opened this issue 1 year ago • 1 comments

❓ Questions and Help

What is your question?

I tried to fine tune bart.base using CNN-DM. However, I cannot learn because I got the following error.

”Cannot load model parameters from checkpoint ./bart.base/model.pt; please ensure that the architectures match.”

Code

Traceback (most recent call last): File "/envs/fairseq_en/bin/fairseq-train", line 33, in sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-train')()) File "/bart/fairseq/fairseq_cli/train.py", line 557, in cli_main distributed_utils.call_main(cfg, main) File "/bart/fairseq/fairseq/distributed/utils.py", line 369, in call_main main(cfg, **kwargs) File "/bart/fairseq/fairseq_cli/train.py", line 168, in main disable_iterator_cache=task.has_sharded_data("train"), File "/bart/fairseq/fairseq/checkpoint_utils.py", line 253, in load_checkpoint reset_meters=reset_meters, File "/bart/fairseq/fairseq/trainer.py", line 582, in load_checkpoint "please ensure that the architectures match.".format(filename) Exception: Cannot load model parameters from checkpoint ./bart.base/model.pt; please ensure that the architectures match.

What have you tried?

I did step 4 of the README(https://github.com/facebookresearch/fairseq/blob/main/examples/bart/README.summarization.md)

I also wanted to use bart.base at that time, so I changed --arch from bart_large to bart_base.

What's your environment?

  • fairseq Version (e.g., 1.0 or main):main
  • PyTorch Version (e.g., 1.0) 1.12
  • OS (e.g., Linux): Linux
  • How you installed fairseq (pip, source): this README(https://github.com/facebookresearch/fairseq)
  • Build command you used (if compiling from source):
  • Python version: python 3.8
  • CUDA/cuDNN version: I use AWS (p3.2xlarge)
  • GPU models and configuration:
  • Any other relevant information:

krcc5978 avatar Jul 19 '22 02:07 krcc5978

I have the same problem, do you resolve this ?

ustcwhy avatar Sep 24 '22 02:09 ustcwhy