How to batch a multiple sentences (4000+)

I’m using finbert pretrained model for text classificantion, i have passed my 4000+ sentences through the tokenizer to create my batch, but when i pass this batch to the model to get my outputs it’s takes infinite time and can’t process, when i pass 2000-3000 sentences it’s takes time but the model can process. How can i pass 4000+ sentences ?