Memory consumption by Punctuation model
Hi,
I am using PunctuationCapitalizationModel to add punctuation marks in raw text.
When i load the pretrained model it consumes 1427 mib memory approximately. This memory never gets free. The application that i created is flask application and runs in multithreaded environment. For every new request 1427mib memory gets consumed.
Code Snippet:
model = PunctuationCapitalizationModel.from_pretrained("punctuation_en_bert")
            model = model.cpu()
            texts = [word_data]
            processed_texts = model.add_punctuation_capitalization(
                texts,
                batch_size=128,
                max_seq_length=64,
                step=8,
                margin=16,
            )
            return str(processed_texts[0])
How to free this memory?
Please help to resolve it.