--- base_model: BAAI/bge-small-en-v1.5 library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - absa - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: material:Clearly Guterson has done his research down to the last stray bullet, but there's a second-hand feeling to the material, which seems less a token of Ben's detachment than the author's - text: everyone:I reccommend this book for anyone, and everyone!!! - text: children:The children's novel "keys of the Kingdom Mister Monday" is a hardcore mix beetween mystery and science fiction - text: Jack:The lawyer says he tracked Jack from his book and would like Jack to investigate the brutal murders of thirty-seven year old Gina Anderson and her son Joshua in their Seattle home; the house was trashed and the husband a lecturer at the nearby community college vanished - text: novel:The children's novel "keys of the Kingdom Mister Monday" is a hardcore mix beetween mystery and science fiction inference: false --- # SetFit Aspect Model with BAAI/bge-small-en-v1.5 This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Aspect Based Sentiment Analysis (ABSA). This SetFit model uses [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. In particular, this model is in charge of filtering aspect span candidates. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. This model was trained within the context of a larger system for ABSA, which looks like so: 1. Use a spaCy model to select possible aspect span candidates. 2. **Use this SetFit model to filter these possible aspect span candidates.** 3. Use a SetFit model to classify the filtered aspect span candidates. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **spaCy Model:** en_core_web_lg - **SetFitABSA Aspect Model:** [omymble/books-bge-small-aspect](https://huggingface.co/omymble/books-bge-small-aspect) - **SetFitABSA Polarity Model:** [omymble/books-bge-small-polarity](https://huggingface.co/omymble/books-bge-small-polarity) - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 2 classes ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | aspect |