Implementing Transfer Learning using Pegasus for Text Summarization generating junk characters

245 views Asked by At

I've been trying to generate summaries using Pegasus library and following the steps as mentioned -

  1. Created Input Data .tfrecord in pegasus\data\testdata
  2. Created a function to return transformer_params named test_transformers (suppose)
  3. Running python3 pegasus/bin/train.py --params=test_transformer --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model,batch_size=1,beam_size=5,beam_alpha=0.6 --model_dir=ckpt/pegasus_ckpt/xsum/model.ckpt-30000
  4. python3 pegasus/bin/evaluate.py --params=test_transformer --param_overrides=vocab_filename=ckpt/pegasus_ckpt/c4.unigram.newline.10pct.96000.model,batch_size=1,beam_size=5,beam_alpha=0.6 --model_dir=ckpt/pegasus_ckpt/xsum/model.ckpt-30000

However, I am facing this issue in outputs when I am generating text -

Outputs Having Junk

Is there some issue in the way its implemented or the way I'm running the python code in step 3 and 4?

Thanks in Advance !

1

There are 1 answers

0
Anant Kumar On BEST ANSWER

Here's a link to the closed issue.

The reasons highlighted for this issue is :-

1. --model_dir is typically a directory instead of a particular checkpoint. 
   -> Try changing model_dir to actual model directory instead of checkpoint
2. It seems there are only 100 training steps. 
   -> Try changing "train_steps": 100