# BartForConditionalGeneration with PubMedBERT/Bio\_ClinicalBERT tokenizer

**URL:** <https://discuss.huggingface.co/t/bartforconditionalgeneration-with-pubmedbert-bio-clinicalbert-tokenizer/5694>\
**Category:** 🤗Transformers\
**Created:** [April 22, 2021, 5:08pm UTC](https://discuss.huggingface.co/t/bartforconditionalgeneration-with-pubmedbert-bio-clinicalbert-tokenizer/5694 "2021-04-22T17:08:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamara](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@Tamara](https://discuss.huggingface.co/u/Tamara)\
**Post date:** [April 22, 2021, 5:08pm UTC](https://discuss.huggingface.co/t/bartforconditionalgeneration-with-pubmedbert-bio-clinicalbert-tokenizer/5694/1 "2021-04-22T17:08:54Z")

</div>

Hello,  
I am using [BartForConditionalGeneration architecture](https://github.com/huggingface/transformers/blob/master/examples/pytorch/summarization/run_summarization.py) from @sgugger to train the model to summarize medical reports. The model achieves good results when the tokenizer is the same as the model. However, I tried to replace the tokenizer with a PubMedBERT/Bio\_ClinicalBERT tokenizer, but the model doesn’t learn well.  
Do you have any idea why the model doesn’t work well with any of these medical tokenizers? Or what will be a good way to use PubMedBERT/Bio\_ClinicalBERT tokenizer in the BartForConditionalGeneration model?

Thank you very much! I appreciate your help!  
Tamara
