FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

bge for multi-label text classification

Open QuangTQV opened this issue 1 year ago • 2 comments

Is there any BGE model that can be used for multi-label text classification (predefined labels) by adding some dense layers for classification (similar to BERT base uncased) instead of Sentence BERT?

QuangTQV avatar Apr 20 '24 10:04 QuangTQV

You can use setfit: https://github.com/huggingface/setfit and huggingface script: https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification.

staoxiao avatar Apr 21 '24 06:04 staoxiao

You can use setfit: https://github.com/huggingface/setfit and huggingface script: https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification.

Is using "BGE en base" with "setfit" for multi-label classification better than using one BERT model and adding some fully connected layers + classification layer? @staoxiao

QuangTQV avatar Apr 21 '24 10:04 QuangTQV