fake-news-setfit-e5 / README.md
Anthony246346's picture
Upload folder using huggingface_hub
cc5c0c9 verified
metadata
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - generated_from_setfit_trainer
widget:
  - text: >-
      query: Flynn did not initially disclose income from Russia-linked
      companies Michael Flynn, President Donald Trump’s former national security
      adviser, failed to disclose payments from a Russian television network and
      two other firms linked to Russia in a February financial disclosure form,
      according to documents released by the White House. In a form signed by
      Flynn on March 31, the former White House official listed speaking
      engagements to Russian entities, including the Kremlin-funded RT TV,
      Volga-Dnepr Airlines and Kaspersky Government Security Solutions Inc, a
      U.S. subsidiary of Russian cybersecurity firm Kaspersky Lab. The form,
      released on Saturday, does not say how much Flynn was paid but the
      speeches are in a section titled “sources of compensation exceeding $5,000
      in a year.” The speeches were not included in a form that Flynn signed
      electronically on Feb. 11, which the White House also released. The
      discrepancy on reporting income linked to Russia could add to the scrutiny
      the retired general, who was forced to resign his White House post after
      only 24 days, is already under for his contacts with Russian officials.
      U.S. intelligence agencies have said Russia meddled in the 2016 U.S.
      presidential election in an effort to help Trump’s candidacy. Multiple
      congressional committees and the FBI are looking into Russia’s
      involvement. Flynn’s lawyer, Robert Kelner, said his client was in the
      process of submitting his financial disclosures forms in the days before
      he left the White House. “That process was suspended when he left. When
      asked this week to resume the process and finalize the form, he did,”
      Kelner said in an email. He added that it had been “far from clear” that
      Flynn was required to itemize each speech.The White House did not respond
      to a request for comment on Sunday.  Flynn was forced out on Feb. 13 for
      misrepresenting conversations he had with Russian Ambassador Sergei
      Kislyak  before Trump took office and misleading Vice President Mike Pence
      about them.  Flynn has requested immunity if he testifies before the
      intelligence committees of the U.S. Senate and the House of
      Representatives, Kelner said last week. Trump, a Republican, has said
      Democrats were pursuing investigations because they were upset about his
      Nov. 8 victory over their party’s candidate, Hillary Clinton. The Russian
      government has denied the allegations that it interfered in the U.S.
      election and released hacked emails of Democratic groups to tip the
      election toward Trump, who has called for better U.S. relations with
      Moscow.    
  - text: >-
      query: Trump says ending chain migration will be part of a DACA deal: Fox
      interview U.S. President Donald Trump said on Thursday ending so-called
      chain migration, which allows legal immigrants to apply for relatives
      abroad to come to the United States, would be part of any legislation to
      help young immigrants brought to the country illegally as children. “Yes
      it will be part of a DACA deal,” Trump said in an interview with Fox News
      Channel, referring to the Deferred Action for Childhood Arrivals program
      that benefits the young immigrants. Trump is ending the program in March
      2018. “I don’t think any Republican would vote for anything having to do
      with leaving chain migration. Chain migration is a disaster for this
      country and it’s horrible,” he said, adding that funding for a wall on the
      border with Mexico would also be part of a DACA deal. 
  - text: >-
      query:  GOP Governor Calls Blacks “Colored People” (VIDEO) Georgia s
      Republican governor Nathan Deal stirred up a hornet s nest of controversy
      when comments he made referring to black Americans as  colored people 
      surfaced on Wednesday night.Georgia Gov. Nathan Deal (R) went after
      opponents of an education ballot measure known as Amendment 1 in a speech
      last month, saying if they wanted to help  colored people,  this measure
      was a good place to start. The irony of some of the groups who are
      opposing doing something to help these minority children is beyond my
      logic. If you want to advance the state of colored people, start with
      their children,  Deal said in an Oct. 3 speech, Fox 5 in Atlanta reported
      Wednesday.Deal told a local news station that he meant to reference the
      NAACP, and didn t mean to say  colored people,  which is a dubious claim
      at best.The governor is a former member of congress who once wrote a
      formal letter to the Obama White House to formally raise questions about
      President Obama s place of birth as part of the birther conspiracy
      theory.Many have pointed out that the birther conspiracy is steeped in
      racist attitudes about the presidency and President Obama being the first
      black president, who was quickly challenged to present papers verifying
      his place of birth (it is Hawaii).Deal s comments come precisely when
      Republicans are still being forced to grapple with their presidential
      nominee Donald Trump s blatant embrace of racism. Trump s bigoted push has
      emboldened cells of white supremacists, who see their beliefs reflected in
      his words. That includes former Klansman David Duke, who is now a
      Republican candidate for the U.S. Senate in Louisiana. And on the same
      night Deal s comments were publicized, Duke took part in a debate at a
      historically black university. Within the Republican Party, Duke has
      attracted a small following, but enough to qualify him for the debate
      stage.Featured image via screen capture
  - text: >-
      query: SAY WHAT? #BlackLivesMatter TEXTBOOKS TO BE USED AS PART OF COMMON
      CORE CURRICULUM IN GRADES 6-12 [Video] When will American citizens stop
      being afraid to stand up and SPEAK OUT against the  politically correct 
      thugs of the left?A new  Black Lives Matter  textbook will soon be
      available to middle school and high school classrooms.According to the
      publisher s description,  Black Lives Matter  covers the shootings that
      touched off passionate protests, the work of activists to bring about a
      more just legal system, and the tensions in U.S. society that these events
      have brought to light. ABDO Publishing specifies that the book was written
      for sixth graders through high school students, and says the textbook is 
      aligned to Common Core Standards and correlated to state standards. Until
      now, no authoritative text designed to teach non-black children about
      historical-structural inequalities productive of anti-black violence in
      U.S. law and society has been made available for commercial consumption, 
      reads a review in The Feminist Wire. Parents as well as teachers eager to
      teach middle and/or high school students about the routine vulnerability
      and terror generative of the rejoined,  Black Lives Matter,  will find an
      invaluable resource in this special report. Conservative radio commentator
      Larry Elder weighed in on Fox and Friends over the weekend. [The textbook]
      is indoctrinating young kids, teaching them black people are victims, 
      Elder said.He argued that the movement would be better off addressing
      black-on-black crime. If the  Black Lives Matter  people are really
      concerned, they ought to say something about the fact that last year 6,000
      blacks shot other blacks, and far and away the number one cause of
      preventable death for young black men is homicide,  he added. The textbook
      was co-authored by Missouri journalist Sue Bradford Edwards and Duchess
      Harris, a professor of American Studies at Macalester College in
      Minnesota. Harris is also the author of  Black Feminist Politics from
      Kennedy to Obama  and a co-editor of  Racially Writing the Republic:
      Racists, Race Rebels, and Transformations of American Identity. Black
      Lives Matter  is part of ABDO Publishing s  Special Report  series of
      books that aim  to help readers develop an essential understanding of
      current events and encourage them to form their own opinions. There are a
      total of eight titles in the  Special Report  series, including  Ebola
      Outbreak,   ISIS,  and  Transgender Rights and Issues.  Via: Red Alert
      Politics 
  - text: >-
      query: Senator Jeff Sessions to endorse Trump White House bid: Drudge
      Report Republican Jeff Sessions will become the first sitting U.S. senator
      to endorse party front-runner Donald Trump on Sunday evening, Drudge
      Report said, marking another in a string of high-profile endorsements for
      the billionaire businessman. Sessions’ support will top the list of
      politicians who have thrown their backing to Trump in the last week,
      including Republican U.S. Representatives Chris Collins of New York and
      Duncan Hunter of California, as well as former rival for the nomination
      New Jersey Governor Chris Christie, who endorsed on Friday.  (Reporting by
      Alana Wise; Editing by Cynthia Osterman) This article was funded in part
      by SAP. It was independently created by the Reuters editorial staff. SAP
      had no editorial involvement in its creation or production.
metrics:
  - accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: intfloat/e5-base

SetFit with intfloat/e5-base

This is a SetFit model that can be used for Text Classification. This SetFit model uses intfloat/e5-base as the Sentence Transformer embedding model. A LogisticRegression 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 with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

  • Model Type: SetFit
  • Sentence Transformer body: intfloat/e5-base
  • Classification head: a LogisticRegression instance
  • Maximum Sequence Length: 512 tokens
  • Number of Classes: 2 classes

Model Sources

Model Labels

Label Examples
1
  • "query: Twitter BLASTS Whole Foods For Yet Another Expensive, Unnecessary Product (TWEETS) Whole Foods is a store that many people love. They love the organic food, the appearance of cleanliness and health, and the impeccable customer service. However, lately, this popular chain has found itself under fire for creating and marketing products that are excessively expensive and completely unnecessary often at the expense of the environment due to the packaging, and at the expense of its customers budgets.Everyone remembers the absolute shitstorm caused by the asparagus water last year that the chain sold $6 a bottle for water with a couple of stalks of asparagus in it. Apparently, that did not teach the folks at Whole Foods a lesson, because they have now just had a similar reaction to another ridiculously expensive product oranges that are already peeled, which are going for a whopping $6 a pound.Needless to say, the public has not taken kindly to this move, and many people have taken to Twitter to blast the chain. Here are just a few choice critical tweets:Firstly, it was pointed out how environmentally irresponsible this is:If only nature would find a way to cover these oranges so we didn't need to waste so much plastic on them. pic.twitter.com/00YECaHB4D Nathalie Gordon (@awlilnatty) March 3, 2016 @awlilnatty Fucking hell. That makes me unbelievably angry actually. Talk about necessarily contributing to plastic taking over the planet. Swiftie Be (@StephanieBe) March 3, 2016Others pointed out how ironic the chain s antics are, given its name:@ajdomanico @awlilnatty the irony of this being Whole Foods too Mollie Goodfellow (@hansmollman) March 3, 2016Others made fun of the obviously lazy nature of the people who would purchase this:@ConorS @awlilnatty @MisterVivian next logical step: half eaten. (@Jemppu) March 4, 2016It was pointed out that it could be ableist to assume that everyone can peel an orange; however, that point was quickly followed by the obvious fact that such people are not who Whole Foods is targeting. In fact, due to the fact that most disabled people are not exactly well-to-do, they likely could never even afford to shop at Whole Foods, making that particular point moot:@otherbecky @awlilnatty You know, as well as i do, that that is NOT who that is marketed towards. Also, the packaging is still superfluous. Swiftie Be (@StephanieBe) March 4, 2016All of this and more is true here. This is simply outrageous. Shame on you, Whole Foods. You market to organic food-eating, hippieish, health conscious liberals, and you expect us to put up with this, to not notice? Well, for the second time in their price-gouging attempt, Whole Foods was forced to backtrack, calling the marketing and selling of these pre-peeled oranges a mistake. @awlilnatty Definitely our mistake. These have been pulled. We hear you, and we will leave them in their natural packaging: the peel. Whole Foods Market (@WholeFoods) March 3, 2016You re damn right it was a mistake. Hopefully you people have learned your lesson this time.Featured image via Flickr"
  • 'query: WATCH: DIAMOND AND SILK Rip On John Kerry Over Israel Comments (VIDEO) .@DiamondandSilk have something to say about Kerry and Obama stance on Israel. pic.twitter.com/d3xsU7hMHl Diamond and Silk (@DiamondandSilk) December 29, 2016'
  • 'query: What Facebook Just Did About Guns Is Going To Drive The NRA Insane Facebook announced that it will be banning its users from arranging private gun sales over both the main Facebook site and its photo-sharing site Instagram.While these new rules do not apply to licensed gun dealers, who can still post with the stipulation that they do not conduct purchases on the site, it does apply to private one-on-one sales that do not require background checks in many states.What is very important is that the move covers gun parts and ammunition as well. The banning of ammunition sales is obviously effective since without massive amounts of bullets you can t have massive amounts of gun violence. The fact it applies to gun parts is significant as well. Federal law doesn t currently cover some gun parts, like an unfinished lower receiver. They are treated as not a gun if they are 80 percent or less complete. This allows them to be sold without serial numbers or background checks. If you provide the parts to someone who is experienced enough to complete them, you basically have what will make an untraceable gun. Afterward, they can be assembled with other parts into a fully functional firearm. Some websites even sell the machines to complete receivers and boast about the fact you can build unserialized firearms legally in your own home.Facebook s status as a non-governmental entity gives it more control over what it can allow on its network. It simply doesn t matter if a person s slightly unfinished gun parts are legal to sell to anyone without background checks. Facebook can restrict whatever they want, just like they do with marijuana, pharmaceuticals or other illegal material. This helps tremendously in curbing the ways federal law has failed us.Facebook s head of product policy, Monika Bickert, said Over the last two years, more and more people have been using Facebook to discover products and to buy and sell things to one another. We are continuing to develop, test and launch new products to make this experience even better for people and are updating our regulated goods policies to reflect this evolution. Do you think that any Republicans will be boycotting Facebook now? What will their alternative be?featured image via wikicommons'
0
  • 'query: House Speaker Ryan says contested Republican convention more likely House Speaker Paul Ryan said on Thursday it is increasingly likely that the Republican Party’s presidential nominating convention will be a contested one this summer. If no candidate can assemble 1,237 Republican delegates by July, the party’s presidential nominee for the November election will be chosen by convention delegates in Cleveland, Ohio, in what could be four days of political drama, carried live on national television. Republican front-runner Donald Trump warned on Wednesday of “riots” if he is denied the party’s presidential nomination, after he scored big wins in primaries in Florida, Illinois and North Carolina on Tuesday. It is uncertain whether Trump can get the 1,237 convention delegates he needs before July. Ryan denounced Trump’s “riots” comment, saying it was unacceptable to even hint at violence. He said he had to study up on the convention process, since he would be chairing the event and wanted to be sure the rule of law prevails. “Nothing has changed other than the perception that this is more likely to become an open convention than we thought before. So, we’re getting our minds around the idea that this could very well become a reality,” Ryan said. As chairman, Ryan will be charged with opening and closing the event, and overseeing the presidential nomination roll call - possibly more than one, if the first is not decisive. He would also be expected to deal with any floor fights on controversial motions that arise. “I will have to obviously bone up on all the rules and all of those things,” Ryan told reporters. “My goal is ... to be neutral and dispassionate, and to make sure that the rule of law prevails, and to make sure that the delegates make their decision however the rules require them to do that,” he said. The last time delegates arrived at a Republican convention without a clear nominee, in Kansas City in 1976, then-President Gerald Ford edged out challenger Ronald Reagan on the first ballot. The last time it took multiple ballots to get a Republican nominee was in 1948, when Thomas Dewey was nominated. Ryan has been touted as a possible dark-horse candidate for president this year, but the speaker repeated Thursday that he is not running. He said he told former House Speaker John Boehner, who had suggested Ryan be a candidate in case of a deadlocked convention, to “knock it off.” '
  • 'query: China will stick to supply side structural reform, overcapacity reduction efforts Chinese President Xi Jinping said China will stick to supply side structural reform and maintain overcapacity reduction and deleveraging efforts. Xi made the comments in a speech at the beginning of a Communist Party congress. '
  • 'query: Colombia urgently crafting law to allow crime gangs to surrender Colombia s government is urgently working with Congress on a law that would lay out terms of surrender for crime gangs such as the Gulf Clan, President Juan Manuel Santos said on Thursday, after the gang declared a unilateral ceasefire. The Gulf Clan, also known as the Usuga Clan and the Autodefensas Gaitanistas, has been accused of operating drug trafficking routes in partnership with Mexican cartels and taking part in illegal gold mining. It announced a ceasefire on Wednesday and has said its members were willing to turn themselves in. Santos, speaking at a event about the eradication of coca crops in Antioquia province, hailed the ceasefire and said a surrender of the group would be welcome, but added that security forces will not halt actions against the group. If this organization wants to surrender to justice it s very welcome and we re working with the justice minister to put together some decrees and there s a law in Congress to facilitate the collective surrender of the Gulf Clan that we are classing as urgent, Santos said. The president has said the government will not negotiate with the group because members are criminals and not politically motivated rebels like the now-demobilized Revolutionary Armed Forces of Colombia (FARC) or National Liberation Army (ELN). Defense Minister Luis Carlos Villegas, speaking at the same event, said operations against the Clan will continue. The fact that they won t shoot is good news but if they continue to commit crimes they will be targeted, he said. We are not going to suspend operations or lower our guard. '

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

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("query: Senator Jeff Sessions to endorse Trump White House bid: Drudge Report Republican Jeff Sessions will become the first sitting U.S. senator to endorse party front-runner Donald Trump on Sunday evening, Drudge Report said, marking another in a string of high-profile endorsements for the billionaire businessman. Sessions’ support will top the list of politicians who have thrown their backing to Trump in the last week, including Republican U.S. Representatives Chris Collins of New York and Duncan Hunter of California, as well as former rival for the nomination New Jersey Governor Chris Christie, who endorsed on Friday.  (Reporting by Alana Wise; Editing by Cynthia Osterman) This article was funded in part by SAP. It was independently created by the Reuters editorial staff. SAP had no editorial involvement in its creation or production.")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 13 422.6963 2249
Label Training Sample Count
0 395
1 405

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 7
  • body_learning_rate: (2e-05, 2e-05)
  • head_learning_rate: 2e-05
  • 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.0014 1 0.1801 -
0.0714 50 0.2696 -
0.1429 100 0.0767 -
0.2143 150 0.0091 -
0.2857 200 0.0057 -
0.3571 250 0.0015 -
0.4286 300 0.0014 -
0.5 350 0.0001 -
0.5714 400 0.0001 -
0.6429 450 0.0001 -
0.7143 500 0.0001 -
0.7857 550 0.0001 -
0.8571 600 0.0001 -
0.9286 650 0.0001 -
1.0 700 0.0001 -

Framework Versions

  • Python: 3.12.12
  • SetFit: 1.1.3
  • Sentence Transformers: 5.2.0
  • Transformers: 4.57.3
  • PyTorch: 2.9.0+cu126
  • Datasets: 4.0.0
  • Tokenizers: 0.22.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}
}