SetFit
This is a SetFit model that can be used for Text Classification. A LogisticRegression instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 512 tokens
- Number of Classes: 2 classes
Model Sources
Model Labels
Label |
Examples |
negative |
- 'I saw this film opening weekend in Australia, anticipating with an excellent cast of Ledger, Edgerton, Bloom, Watts and Rush that the definitive story of Ned Kelly would unfold before me. Unfortunately, despite an outstanding performance by Heath Ledger in the lead role, the plot was paper thin....which doesn't inspire me to read "Our Sunshine". There were some other plus points, the support acting from Edgerton in particular, assured direction from Jordan (confirming his talent on show in Buffalo Soldiers as well), and production design that gave a real feel of harshness to the Australian bush, much as the Irish immigrants of the early 19th century must have seen it. But I can't help feeling that another opportunity has been missed to tell the real story of an Australian folk hero (or was he?)....in what I suspect is a concession to Hollywood and selling the picture in the US. Oh well, at least Jordan and the producers didn't agree to lose the beards just to please Universal...
Guess I will just have to content myself with Peter Carey's excellent "Secret History of the Kelly Gang". 4/10' - "I think I will make a movie next weekend. Oh wait, I'm working..oh I'm sure I can fit it in. It looks like whoever made this film fit it in. I hope the makers of this crap have day jobs because this film sucked!!! It looks like someones home movie and I don't think more than $100 was spent making it!!! Total crap!!! Who let's this stuff be released?!?!?!"
- "Ned aKelly is such an important story to Australians but this movie is awful. It's an Australian story yet it seems like it was set in America. Also Ned was an Australian yet he has an Irish accent...it is the worst film I have seen in a long time"
|
positive |
- 'Today I found "They All Laughed" on VHS on sale in a rental. It was a really old and very used VHS, I had no information about this movie, but I liked the references listed on its cover: the names of Peter Bogdanovich, Audrey Hepburn, John Ritter and specially Dorothy Stratten attracted me, the price was very low and I decided to risk and buy it. I searched IMDb, and the User Rating of 6.0 was an excellent reference. I looked in "Mick Martin & Marsha Porter Video & DVD Guide 2003" and \x96 wow \x96 four stars! So, I decided that I could not waste more time and immediately see it. Indeed, I have just finished watching "They All Laughed" and I found it a very boring overrated movie. The characters are badly developed, and I spent lots of minutes to understand their roles in the story. The plot is supposed to be funny (private eyes who fall in love for the women they are chasing), but I have not laughed along the whole story. The coincidences, in a huge city like New York, are ridiculous. Ben Gazarra as an attractive and very seductive man, with the women falling for him as if her were a Brad Pitt, Antonio Banderas or George Clooney, is quite ridiculous. In the end, the greater attractions certainly are the presence of the Playboy centerfold and playmate of the year Dorothy Stratten, murdered by her husband pretty after the release of this movie, and whose life was showed in "Star 80" and "Death of a Centerfold: The Dorothy Stratten Story"; the amazing beauty of the sexy Patti Hansen, the future Mrs. Keith Richards; the always wonderful, even being fifty-two years old, Audrey Hepburn; and the song "Amigo", from Roberto Carlos. Although I do not like him, Roberto Carlos has been the most popular Brazilian singer since the end of the 60's and is called by his fans as "The King". I will keep this movie in my collection only because of these attractions (manly Dorothy Stratten). My vote is four.
Title (Brazil): "Muito Riso e Muita Alegria" ("Many Laughs and Lots of Happiness")' - 'This video nasty was initially banned in Britain, and allowed in last November without cuts.
It features the Playboy Playmate of the Month October 1979, Ursula Buchfellner. The opening cuts back and forth between Buchfellner and foggy jungle pictures. I am not sure what the purpose of that was. It would have been much better to focus on the bathtub scene.
Laura (Buchfellner) is kidnapped and held in the jungle for ransom. Peter (Al Cliver - The Beyond, Zombie) is sent to find her and the ransom. Of course, one of the kidnappers (Antonio de Cabo) manages to pass the time productively, while another (Werner Pochath) whines incessantly.
The ransom exchange goes to hell, and Laura runs into the jungle. Will Peter save her before the cannibals have a meal? Oh, yes, there are cannibals in this jungle. Why do you think it was a video nasty! Muriel Montossรฉ is found by Peter and his partner (Antonio Mayans - Angel of Death) on the kidnapper's boat. Montossรฉ is very comfortably undressed. Peter leaves them and goes off alone to find Laura, who has been captured by now. They pass the time having sex, and don't see the danger approaching. Guts, anyone? Great fight between Peter and the naked devil (Burt Altman).
Blood, decapitation, guts, lots of full frontal, some great writhing by the cannibal priestess (Aline Mess), and the line, "They tore her heart out," which is hilarious if you see the film.' - "or anyone who was praying for the sight of Al Cliver wrestling a naked, 7ft tall black guy into a full nelson, your film has arrived! Film starlet Laura Crawford (Ursula Buchfellner) is kidnapped by a group who demand the ransom of $6 million to be delivered to their island hideaway. What they don't count on is rugged Vietnam vet Peter Weston (Cliver) being hired by a film producer to save the girl. And what they really didn't count on was a local tribe that likes to offer up young women to their monster cannibal god with bloodshot bug eyes.
Pretty much the same filming set up as CANNIBALS, this one fares a bit better when it comes to entertainment value, thanks mostly a hilarious dub track and the impossibly goofy monster with the bulging eyes (Franco confirms they were split ping pong balls on the disc's interview). Franco gets a strong EuroCult supporting cast including Gisela Hahn (CONTAMINATION) and Werner Pochath (whose death is one of the most head-scratching things I ever seen as a guy who is totally not him is shown - in close up - trying to be him). The film features tons of nudity and the gore (Tempra paint variety) is there. The highlight for me was the world's slowly fistfight between Cliver and Antonio de Cabo in the splashing waves. Sadly, ol' Jess pads this one out to an astonishing (and, at times, agonizing) 1 hour and 40 minutes when it should have run 80 minutes tops.
For the most part, the Severin DVD looks pretty nice but there are some odd ghosting images going on during some of the darker scenes. Also, one long section of dialog is in Spanish with no subs (they are an option, but only when you listen to the French track). Franco gives a nice 16- minute interview about the film and has much more pleasant things to say about Buchfellner than his CANNIBALS star Sabrina Siani."
|
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
from setfit import SetFitModel
model = SetFitModel.from_pretrained("mahitha-t/text_classification_model")
preds = model("I guess I was attracted to this film both because of the sound of the story and the leading actor, so I gave it a chance, from director Gregor Jordan (Buffalo Soldiers). Basically Ned Kelly (Heath Ledger) is set up by the police, especially Superintendent Francis Hare (Geoffrey Rush), he is forced to go on the run forming a gang and go against them to clear his own and his family's names. That's really all I can say about the story, as I wasn't paying the fullest attention to be honest. Also starring Orlando Bloom as Joseph Byrne, Naomi Watts as Julia Cook, Laurence Kinlan as Dan Kelly, Philip Barantini as Steve Hart, Joel Edgerton as Aaron Sherritt, Kiri Paramore as Constable Fitzpatrick, Kerry Condon as Kate Kelly, Emily Browning as Grace Kelly and Rachel Griffiths as Susan Scott. Ledger makes a pretty good performance, for what it's worth, and the film does have it's eye-catching moments, particularly with a gun battle towards the end, but I can't say I enjoyed it as I didn't look at it all. Okay!")
Training Details
Training Set Metrics
Training set |
Min |
Median |
Max |
Word count |
49 |
233.3125 |
837 |
Label |
Training Sample Count |
positive |
8 |
negative |
8 |
Training Hyperparameters
- batch_size: (16, 2)
- num_epochs: (1, 16)
- 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
- l2_weight: 0.01
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
Training Results
Epoch |
Step |
Training Loss |
Validation Loss |
0.1111 |
1 |
0.1572 |
- |
Framework Versions
- Python: 3.11.13
- SetFit: 1.1.2
- Sentence Transformers: 4.1.0
- Transformers: 4.52.4
- PyTorch: 2.6.0+cu124
- Datasets: 3.6.0
- Tokenizers: 0.21.1
Citation
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}
}