# Pegasus max\_token\_len restriction

**URL:** <https://discuss.huggingface.co/t/pegasus-max-token-len-restriction/18343>\
**Category:** 🤗Transformers\
**Created:** [May 25, 2022, 8:56am UTC](https://discuss.huggingface.co/t/pegasus-max-token-len-restriction/18343 "2022-05-25T08:56:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nloc2578](https://avatars.discourse-cdn.com/v4/letter/n/6bbea6/32.png) [@nloc2578](https://discuss.huggingface.co/u/nloc2578)\
**Post date:** [May 25, 2022, 8:56am UTC](https://discuss.huggingface.co/t/pegasus-max-token-len-restriction/18343/1 "2022-05-25T08:56:52Z")

</div>

Hi everyone, I was fine\_tuning a few model using the “google/pegasus\_xsum” for question-answering task, I want to take in “context” then generate the “question”. My problem is that: I can only set my source\_max\_token\_len = 512 for the “context”, if it \> 512, I’ll receive:  
“RuntimeError: CUDA error: device-side assert triggered  
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.”  
I think that Google Colab RAM memory only allow me to run with the max\_token\_len less than or equal to 512  
Does anyone know how to handle this?
