Kevinger's picture
Add SetFit model
821b270 verified
|
raw
history blame
15.7 kB
metadata
library_name: setfit
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - generated_from_setfit_trainer
datasets:
  - Kevinger/hub-report-dataset
metrics:
  - accuracy
widget:
  - text: >-
      FOXBOROUGH — With Bill Belichick gone and no clear heir to his personnel
      throne in New England, it remains murky who will have final say on the
      roster as the offseason gets rolling.


      At Jerod Mayo’s introductory press conference, Robert Kraft said it’d be
      collaborative approach for now, but sought to debunk the idea that
      ownership will be more involved. He said his family will continue to
      delegate to the football operations staff as they have since purchasing
      the team in 1994.


      BET ANYTHING GET $250 BONUS ESPN BET CLAIM OFFER MASS 21+ and present in
      MA, NJ, PA, VA, MD, WV, TN, LA, KS, KY, CO, AZ, IL, IA, IN, OH, MI.
      Gambling problem? Call 1-800-Gambler.


      “It will be the same input that we’ve had for the last three decades: We
      try to hire the best people we can find and let them do their job and hold
      them accountable,” Kraft said. “If you get involved and tell them what to
      do or try to influence them, you can’t hold them responsible and have them
      accountable. It’ll be within the people’s discretion who are the decision
      makers to do it, and if we’ve hired the wrong people, then we’ll have to
      make a change. But we’re going to try to enjoy it as fans.”


      Kraft said there’s only one situation where ownership will get involved in
      football ops, and that’s when it comes off-the-field issues.


      “The only area that we have really weighed in is when it comes to bringing
      in people that we might think are not the right character to be here and
      they have done things in their past,” Kraft said. “That’s the only time
      we’ve really weighed in.”
  - text: >-
      WESTFIELD - The St. Mary’s High School boys basketball team may have just
      found their secret weapon or at least one of them.


      St. Mary’s guard-forward Patryk Lech scored 14 points, including three
      3-pointers to help the Saints stop a two-game slide and turn back Pioneer
      Valley Christian Academy, 55-32, Wednesday night at Westfield Intermediate
      School.
  - text: >-
      WE’VE SEEN ACROSS OUR REGION. ONE AMBULANCE WE HAVE PROBABLY SIX VICTIMS
      DOWN HERE. THE 911 CALLS COMING IN AROUND 220 THIS MORNING. BLACK SUV CAME
      UP, FIRED ROUNDS, TOOK OFF A SHOOTING ON ESSEX STREET WHERE PEOPLE WERE
      CELEBRATING. A FRIEND HEADING OFF TO COLLEGE. NOW, THIS STUFF IS
      UNFORTUNATE. I DIDN’T EXPECT IT TO HAPPEN. I NEVER THOUGHT I WOULD GET
      THAT CALL. HIS BROTHER SAYING ABRAHAM DIAZ IS ONE OF THE SEVEN PEOPLE
      SHOT. THE 25 YEAR OLD DIDN’T SURVIVE. HE’LL GO TO THINGS LIKE THIS TO SHOW
      SUPPORT AND LOVE AND THAT’S WHAT THAT’S WHAT HE’S ALL ABOUT. THE SIX
      OTHERS WERE RUSHED TO THE HOSPITAL. TWO IN CRITICAL CONDITION. THERE’S
      MULTIPLE PEOPLE THAT WE KNOW PERSONALLY THAT WE HANG OUT WITH AND LAUGH
      WITH THAT ARE RIGHT NOW IN THE HOSPITAL FIGHTING FOR THEIR LIVES. NOW
      INVESTIGATORS ARE WORKING TO TRACK DOWN WHOEVER PULLED THE TRIGGER, SAYING
      VIOLENCE LIKE THIS ISN’T UNIQUE TO. LYNN. IT’S NOT ONLY A PROBLEM IN OUR
      COMMUNITY, BUT IT’S BEEN A PROBLEM IN MANY URBAN COMMUNITIES LAST WEEKEND
      IN BOSTON, TWO LARGE BRAWLS INVOLVING TEENS AND KIDS AND A SHOOTING AT THE
      CARIBBEAN FESTIVAL THAT LEFT EIGHT HURT ENDED WITH 17 PEOPLE ARRESTED, 14
      OF WHOM ARE MINORS. NOW, AS LYNN POLICE INVESTIGATE, SOME WHO LIVE HERE
      ARE QUESTIONING HOW SAFE ARE OUR COMMUNITIES. I HAVE A TWO AND A HALF YEAR
      OLD BROTHER. I’M STARTING TO THINK LIKE AS A IS THIS A GOOD PLACE TO RAISE
      HIM HERE? YOU KNOW, IT’S GETTING A LITTLE VIOLENT. LYNN POLICE SAY THEY
      BELIEVE THIS SHOOTING WAS TARGETED. THEY SAY IT’LL TAKE THE WORK OF POLICE
      AS WELL AS THE HELP OF THE COMMUNITY TO SOLVE THI


      Advertisement 2 of 7 victims in Lynn shooting now dead, district attorney
      says Share Copy Link Copy


      Another man is dead in connection with a shooting that happened early
      Saturday morning in Lynn, Massachusetts.Authorities announced Sunday that
      21-year-old Jandriel Heredia, of Revere, died of the injuries he suffered
      in the Essex Street shooting that had already claimed the life of
      25-year-old Abraham Diaz.The shooting, which injured a total of seven
      people, was first reported to Lynn police at about 2:20 a.m. Saturday.The
      Essex County District Attorney's Office said that as of Sunday night,
      there is no new information as to the condition of the five other shooting
      victims. "This is a terrible act of violence," Essex County District
      Attorney Paul Tucker said. "We do not believe this was a random act of
      violence."Tucker said shots were fired from a vehicle."They were having
      some type of a social gathering," the district attorney said. "This
      violence was put upon them in a terrible way.""The people who did this are
      not in custody, and we want to make sure we do get them into custody,"
      Tucker added. "I just can't believe it happened," said Brian Diaz, brother
      of Abraham Diaz. "I'm still trying to process it.""My brother was a good
      kid," Brian Diaz added. "He was just like me, giving back to kids, looking
      out for kids, and ... just wanted to make sure everyone was all
      right."Brian said Abraham was from Lynn. He said his brother was with a
      group celebrating a friend who was heading off to college. "This is
      absolutely outrageous to have this level of violence happen on our streets
      and in our neighborhood," Lynn Mayor Jared Nicholson said at a news
      conference on Saturday morning. "It's horrifying.""What everyone
      experienced in this street and neighborhood, shouldn't happen," Nicholson
      said.Several multi-unit residential homes were located in the area of the
      shooting. "We believe this incident was a targeted attack," Lynn police
      Chief Christopher Reddy said. "We are committed to holding those
      accountable responsible for this senseless act of violence."On Sunday,
      Tucker and Reddy said that a man was fatally shot on Lincoln Street
      shortly after 11 p.m. Saturday. Authorities said that based on their
      initial investigation, the shooting is not believed to be a random act of
      violence.Anyone with any information about the shootings is asked to
      contact Lynn police at 781-595-2000 or by texting a tip to 847411
      (TIP411).The shootings were being investigated by the Essex County
      District Attorney’s Office State Police Detective Unit and detectives from
      the Lynn Police Department. Previous coverage:
  - text: >-
      Joan Acocella, a cultural critic whose elegant, erudite essays about dance
      and literature appeared in The New Yorker and The New York Review of Books
      for more than four decades, died on Sunday at her home in Manhattan. She
      was 78.


      Her son, Bartholomew Acocella, said the cause was cancer.


      Ms. Acocella (pronounced ack-ah-CHELL-uh) wrote deeply about dancers and
      choreographers, including Mikhail Baryshnikov, Suzanne Farrell and George
      Balanchine. She scrutinized the vicissitudes of the New York City Ballet
      as well as the feats of the ballroom-dancing pros and celebrity oafs of
      the popular TV series “Dancing With the Stars.”


      She was The New Yorker’s dance critic from 1998 to 2019 and freelanced for
      The Review for 33 years. Her final articles for The Review were a two-part
      commentary in May on the biography “Mr. B: George Balanchine’s 20th
      Century,” by Jennifer Homans, her successor as The New Yorker’s dance
      critic.


      “What she wrote for us,” Emily Greenhouse, the editor of The Review, said
      in an email, “was often mischievous and always delicious  on crotch shots
      and cuss words, on Neapolitan hand gestures and Isadora Duncan’s emphasis
      on the solar plexus.”
  - text: >-
      “That’s what will determine the winners and losers as we get through the
      rest of the holiday season,” Matthew Shay, chief executive of the National
      Retail Federation, a trade group, said on a recent conference call. The
      N.R.F. kept its forecast that holiday sales — from Nov. 1 to Dec. 31 —
      would grow 3 to 4 percent this year.


      That forecast isn’t adjusted for inflation. Neither are the early readings
      of sales over the weekend. Mastercard, for example, said sales both in
      stores and online rose 2.5 percent on Nov. 24, from a year earlier. But
      with consumer goods  excluding food and fuel  rising at an annual rate
      of around 4 percent, that suggests that retailers aren’t necessarily
      moving more merchandise.


      “We think sales were not strong; they were so-so, to the point of being
      mediocre,” said Craig Johnson, the founder of the retail consultancy
      Customer Growth Partners. His firm estimated that sales for the four-day
      period starting on Black Friday and ending on Cyber Monday was $94.2
      billion, up about 2.5 percent from last year. Like Mastercard’s estimate,
      the retail consultancy forecast that  adjusted for inflation  sales
      slipped slightly, Mr. Johnson said.


      Some large retailers seem to be prepared for the slowdown in demand.
      Companies like Target and Macy’s have reported that they’ve cut inventory
      levels in recent quarters, and that may put them in a better position to
      profit even if demand is weaker, according to Edward Yruma, an analyst at
      the investment bank Piper Sandler.




      If stores have too much inventory on hand, they may have to cut prices
      more than expected, which would erode their profits.


      “Really for the first time in four quarters, we are seeing retailers get
      inventories better aligned with sales,” Mr. Yruma said. “That’s allowing
      them to have on-plan promotions.”
pipeline_tag: text-classification
inference: false
base_model: sentence-transformers/paraphrase-mpnet-base-v2
model-index:
  - name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
    results:
      - task:
          type: text-classification
          name: Text Classification
        dataset:
          name: Kevinger/hub-report-dataset
          type: Kevinger/hub-report-dataset
          split: test
        metrics:
          - type: accuracy
            value: 0.5138755980861244
            name: Accuracy

SetFit with sentence-transformers/paraphrase-mpnet-base-v2

This is a SetFit model trained on the Kevinger/hub-report-dataset dataset that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-mpnet-base-v2 as the Sentence Transformer embedding model. A OneVsRestClassifier 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 Sources

Evaluation

Metrics

Label Accuracy
all 0.5139

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("Kevinger/setfit-hub-multilabel-example")
# Run inference
preds = model("WESTFIELD - The St. Mary’s High School boys basketball team may have just found their secret weapon or at least one of them.

St. Mary’s guard-forward Patryk Lech scored 14 points, including three 3-pointers to help the Saints stop a two-game slide and turn back Pioneer Valley Christian Academy, 55-32, Wednesday night at Westfield Intermediate School.")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 22 396.7188 2161

Training Hyperparameters

  • batch_size: (8, 8)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • 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
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0031 1 0.1242 -
0.1562 50 0.1143 -
0.3125 100 0.1023 -
0.4688 150 0.0108 -
0.625 200 0.0021 -
0.7812 250 0.0005 -
0.9375 300 0.001 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.3.0
  • Transformers: 4.35.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.16.1
  • Tokenizers: 0.15.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}
}