--- language: en license: apache-2.0 library_name: setfit tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer metrics: - accuracy - precision - recall - f1 widget: - text: not so jolly dolly so, last weekend my wife and i watched the oppen part of the "barbenheimer" 2023 box-office two-headed monster and this week it was barbie's turn. from the little i'd incidentally read in advance about the day-glo billion dollar blockbuster, i was expecting some kind of retro-cool, existentialist, post-modernist satire on the battle of the sexes, consumerism and childhood buffed up with a little diversity along the way, but somehow with all these ducks lined up in a row, i felt the film missed the mark.it starts brightly with eye-candy sets in fifty shades of pink as we're introduced to margot robbie's barbie in her barbie-world of alternative barbies, see through doll's houses and their various incomplete consumer goods, for example our girl has her daily dry-shower and drinks non-existent tea. everything appears to be perfect in her / their perfect world, unless you're the boyfriend ken, here also in a variety of forms, all doomed to exist only in barbie's slipstream and so experience recurring frustration at getting precisely nowhere, all the time, with the object of his / their, i hesitate to call it, desire.then things start to go wrong for robbie's "stereotypical" barbie. she thinks of death and starts to malfunction and after a visit to kate mckinnon's weird barbie, a concept i have to say i didn't get at all, she determines to go to the real world to connect with the disillusioned mattel employee, played by america ferrera, whose negativity, channelled through her disinterested daughter ariana greenblatt, is upsetting the living doll's equilibrium. ryan gosling's wheedling ken is also along for the ride and stows away in her penelope pitstop-mobile and together they head for l. a., where ferrera lives, the headquarters of the manufacturer mattel.for me, the film went downhill fast from there with ken's head getting messed-up with perceptions of patriarchy while barbie has a meltdown over her identity-crisis. there are unfunny, over-played scenes where barbie experiences humiliation at the hands of greenblatt and her school chums, traipses down to mattel hq to confront the all-male board of directors headed by a mis-cast will ferrell as the company ceo, before returning to barbie-world with ferrera and greenblatt in tow to take down ken's new-model kendom where outdated male-superiority is literally back in the saddle.i have to admit, i got very bored, very soon with this empty, supposedly satirical high-concept, fantasy-comedy. a world box-office of 1.5 billion dollars and eight oscar nominations actually makes me wonder if i've not switched places too with barbie-world as i'm afraid nothing about the movie, including the soundtrack and unsuccessful attempts at either comedy or pathos (especially when they wheel in rhea perlman as the doll's now-enlightened creator) all missing me by miles.when at one point, all her namesakes shout "go barbie!', i must admit i was with them 100% but for completely different reasons. - text: way better than expected i was amongst the people who thought they saw a majority of this film based on all of the filming stills posted on the bird app in 2022. i still wanted to see it. something about their perfect neon rollerblading outfits. i saw one preview and wasn't sure what the plot was going to be, i didn't care, i still wanted to see it. i wasn't expecting it to be amazing, but amazing it was. well done!! margot really knocked it out of the dollhouse. ryan i'll never look at the same way way again. this 1980s barbie superman is very pleased. it won't be long until the opening dance scene is all over the clock app. i haven't felt so compelled to learn choreography since michael jackson's thriller. also, girls rule. sorry, ken. 12 out of 24 found this helpful. was this review helpful? sign in to vote. permalink - text: 'anyone remember the film "life size"? from a far, i can see why people would absolutely hate this movie. just the concept of "barbie: the movie" is enough to make people feel like the art of cinema has been compromised by corporate america. but, as a whole, this movie was very well received. it made over a billion dollars at the box-office and was nominated for 8 oscars including "best picture", so clearly it some people really liked it.there is a lot to enjoy in this film. the movie does a good job with poking fun at the barbie brand without it feeling too much like a spoof. this is a comedy, so the fact that the film is really funny is kind of an important element. understandably comedy is a subjective thing, so all i can say is for me, i laughed out loud several times through the movie. the movie is clever in how it treats its "worldbuilding" and nicely avoids any firm answers about how this world works. because, yeah, if you think about that sort of stuff in the film there is a lot that doesn''t add up.it is nice that they don''t spend too much time in "the real world" and focus on the creative fun of "barbie world". the movie is more visually unique and can do more gags when that is the case.when the movie is focusing on being a bizarre comedy, that is when some of the best and most memorable things happen. when it tries to have a more serious message, that is where it loses some momentum. don''t misunderstand me, the movie needs some serious stuff in order to make the comedy work. and the stuff with ugly betty and her daughter is good emotional stuff. but towards the end, they realize that barbie needs to have a character arc and feel like they tack one on last second. there are some very funny jokes towards the end, but it does become a little repetitive and the message feels heavy handed by the 5th time it''s brought up. side note: i wanted a cameo from the voice actress of barbie, kelly sheridan, but she wasn''t there.i will emphasize this because hollywood will learn all the wrong lessons from this movie''s success. we do not want a "polly pocket" movie or an "uno" movie. what made this film a success, beyond its brand or its marketing campaign, is that it was uniquely greta gerwig''s vision. the movie wasn''t concerned with mass audience appeal, it would tell jokes that they thought were funny and hoped others would enjoy as well. if you want to duplicate barbie''s success, give creative people control to make some out there stuff.wrapped in plastic, it''s fantastic.' - text: great expectations this film exceeded all of my expectations a n d i was looking forward to seeing it. i wonder about any parents who might bring their children to see it expecting something quite different from what this film is. one hour fifty four minutes of fun from beginning to end. satire, sarcasm , humor at every turn. production values and acting off the charts good. i can't believe mattel let them make the movie with complete artistic freedom. think of nicole kidman in the amc promo before a movie starts and says, " somehow heartbreak feels good in a place like this ". well somehow watching a silly spoof like this movie feels great all the way through and even afterwards. i loved it and i am not surprised at the huge box office , this movie rocks. 4 out of 11 found this helpful. was this review helpful? sign in to vote. permalink - text: decent i like what they did with this movie and the characters with its combining the barbie world and the real world. barbie starts getting "vibes" and has to go into the real world to find the girl who played with her to set things right and winds up in the mattel headquarters. something resembling chaos ensues. ken joins her and winds up causing further damage. i like what they do in various stages of the story and with the characters. it was overall a very pleasant surprise snd a good movie with a good cast. margot robbie, ryan gosling, america ferrera, and will ferrell were all good in their roles. if you are a movie and/or a barbie fan, you will love this movie.*** out of **** 2 out of 7 found this helpful. was this review helpful? sign in to vote. permalink pipeline_tag: text-classification inference: true model-index: - name: SetFit results: - task: type: text-classification name: Text Classification dataset: name: data/raw/barbie.jsonl type: unknown split: test metrics: - type: accuracy value: 0.8811688311688312 name: Accuracy - type: precision value: 0.9952114924181963 name: Precision - type: recall value: 0.8757022471910112 name: Recall - type: f1 value: 0.9316398954053045 name: F1 --- # SetFit This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. 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. ## Model Details ### Model Description - **Model Type:** SetFit - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 2 classes - **Language:** en - **License:** apache-2.0 ### 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 | |:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | negative | | | positive | | ## Evaluation ### Metrics | Label | Accuracy | Precision | Recall | F1 | |:--------|:---------|:----------|:-------|:-------| | **all** | 0.8812 | 0.9952 | 0.8757 | 0.9316 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("carlesoctav/SentimentClassifierBarbieDune-8shot") # Run inference preds = model("decent i like what they did with this movie and the characters with its combining the barbie world and the real world. barbie starts getting \"vibes\" and has to go into the real world to find the girl who played with her to set things right and winds up in the mattel headquarters. something resembling chaos ensues. ken joins her and winds up causing further damage. i like what they do in various stages of the story and with the characters. it was overall a very pleasant surprise snd a good movie with a good cast. margot robbie, ryan gosling, america ferrera, and will ferrell were all good in their roles. if you are a movie and/or a barbie fan, you will love this movie.*** out of **** 2 out of 7 found this helpful. was this review helpful? sign in to vote. permalink") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:-----| | Word count | 112 | 234.1953 | 1424 | | Label | Training Sample Count | |:---------|:----------------------| | negative | 64 | | positive | 64 | ### Training Hyperparameters - batch_size: (16, 16) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: True ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:-------:|:-------:|:-------------:|:---------------:| | 0.0019 | 1 | 0.3627 | - | | 0.0962 | 50 | 0.0007 | - | | 0.1923 | 100 | 0.1003 | - | | 0.2885 | 150 | 0.0001 | - | | 0.3846 | 200 | 0.0001 | - | | 0.4808 | 250 | 0.0001 | - | | 0.5769 | 300 | 0.0001 | - | | 0.6731 | 350 | 0.0 | - | | 0.7692 | 400 | 0.0001 | - | | 0.8654 | 450 | 0.0 | - | | 0.9615 | 500 | 0.0 | - | | **1.0** | **520** | **-** | **0.2312** | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.10.11 - SetFit: 1.0.3 - Sentence Transformers: 2.5.1 - Transformers: 4.38.2 - PyTorch: 2.0.1 - Datasets: 2.18.0 - Tokenizers: 0.15.2 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```