mim-solutions / bert_for_longer_texts

BERT classification model for processing texts longer than 512 tokens. Text is first divided into smaller chunks and after feeding them to BERT, intermediate results are pooled. The implementation allows fine-tuning.
Other
126 stars 30 forks source link

Would it be okay to use the code below instead of bert? #24

Closed cwoonb closed 9 months ago

cwoonb commented 9 months ago

Original code

new code

MichalBrzozowski91 commented 9 months ago

Sure, the code should work for any pre-trained BERT model from huggingface hub.