# Unable to train token classification model

**URL:** <https://discuss.huggingface.co/t/unable-to-train-token-classification-model/37958>\
**Category:** 🤗Transformers\
**Created:** [April 27, 2023, 9:34pm UTC](https://discuss.huggingface.co/t/unable-to-train-token-classification-model/37958 "2023-04-27T21:34:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tauhait](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@Tauhait](https://discuss.huggingface.co/u/Tauhait)\
**Post date:** [April 27, 2023, 9:34pm UTC](https://discuss.huggingface.co/t/unable-to-train-token-classification-model/37958/1 "2023-04-27T21:34:22Z")

</div>

[Token Classification Notebook Link](https://colab.research.google.com/drive/1XBYy9goRq7UWIhBaMWLNgBtAmvmNn169?usp=sharing)

—\> 24 trainer.train()

6 frames  
/usr/local/lib/python3.10/dist-packages/transformers/data/data\_collator.py in torch\_call(self, features)  
308 no\_labels\_features = [{k: v for k, v in feature.items() if k != label\_name} for feature in features]  
309  
 → 310 batch = self.tokenizer.pad(  
311 no\_labels\_features,  
312 padding=self.padding,

AttributeError: ‘DatasetDict’ object has no attribute ‘pad’

Any help will be highly appreciated.
