text: 
  
  TITLE
  can we use ckpt model file generated after finetuning the pre-trained models on custom dataset
  
  COMMENTS
  6
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  Hi Team,
  
  I have fine tuned pegasus huggingface wikihow model with my own custom dataset and end up with below files:
  
  model.ckpt-1000.data-00000-of-00001
  model.ckpt-1000.index
  model.ckpt-1000.meta
  events.out.tfevents.1608192436.ip-xxx-xx-x-xx
  events.out.tfevents.1608192510.ip-xxx-xx-x-xx.v2
  
  When I am running below code, it is taking pytorch_model.bin file automatically for generating summary. Where as I want to use ckpt model file for generating summary which I got after training.
  
  **Code I am using is :**
  
  model_path ='local-pegasus-wikihow'
  
  torch_device = 'cuda' if torch.cuda.is_available() else 'cpu'
  tokenizer = PegasusTokenizer.from_pretrained(model_path)
  
  model = PegasusForConditionalGeneration.from_pretrained(model_path).to(torch_device)
  
  batch = tokenizer.prepare_seq2seq_batch(src_text, truncation=True, padding='longest', return_tensors="pt").to(torch_device)
  translated = model.generate(**batch)
  tgt_text = tokenizer.batch_decode(translated, skip_special_tokens=True)
  print(tgt_text[0])
  
  Do I need to change code here so that it will take ckpt model file for generating summary instead of searching for pre-trained pytorch_model.bin or .h5 file?