Kevinger's picture
Add SetFit model
06d935b verified
|
raw
history blame
26 kB
---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
datasets:
- Kevinger/hub-report-dataset
metrics:
- accuracy
widget:
- text: 'A 16-acre property once home to the long-shuttered Foxborough State Hospital
will soon provide housing for 141 low-income senior households.
Walnut Street, an affordable housing project being developed by the Affordable
Housing Services Collaborative and Onyx, will turn land that has been vacant for
decades into much-needed affordable housing.
“Housing is empowering. No matter our age, it is a comfort not to worry about
whether we can afford a place,” Onyx CEO Chanda Smart said at a press conference
Thursday. “Senior housing for the town of Foxborough means that seniors who worked
and raised their families here in Foxborough still have the opportunity to remain
here.”
Foxborough State Hospital opened in 1889 as the Massachusetts Hospital for Dipsomaniacs
and Inebriates for treatment of alcoholism, according to the National Park Service,
and was later converted to a standard psychiatric hospital. It closed in 1975,
and parts of the property have already been redeveloped over the years.
The Foxborough Housing Authority first began working on the project back in 2011.
The land was transferred to the agency from the state in 2017 to be used for affordable
housing.
Acting Town Manager Paige Duncan told MassLive that the town held a number of
community meetings to decide what to build on the property.
“It was controversial, but what came out was a clear support for senior housing,”
she said. “We really tried to address the needs of the community and we came up
with a project that was sensitive to the area. We didn’t want a big block of buildings
that towered over the neighborhood.”
After that, she said, there was overwhelming support for the project. The permits
were filed in February and approved by April, an almost unheard-of timeline.
The finished project will provide 141 new apartments for residents age 55 and
over. Of those, 35 will be reserved for people making 30% or less of the area
median income, and 85 will be for those making 60% AMI. Foxborough residents will
be given preference for 70% of the units.
A second phase of the project once this one is complete will add approximately
60 more units.
Greg Spiers, chairman of the Housing Authority, said the new senior housing was
badly needed, noting there are about 5,500 elderly and disabled people on public
housing waiting lists in Massachusetts.
“With 195 of those on that list Foxborough residents, that 70% local preference
for first-time rentals is one of our goals,” he said. “The need is so great for
affordable housing in our area and the entire state.”
Housing and Livable Communities Secretary Ed Augustus praised the town for its
dedication to creating more affordable housing, even though more than 10% of its
total housing units qualify as affordable. The 10% threshold is the state requirement
to stop projects being filed under Chapter 40B, a law which allows affordable
housing developments to bypass certain local permitting requirements.
“You know that that is just an arbitrary number, but the real needs are significantly
more than that,” Augustus said. “We need more communities to take note of what
Foxborough is doing.”
Lt. Gov. Kim Driscoll said the project is a good example of the use of surplus
state land for housing. Gov. Maura Healey’s housing bond bill filed in October
included a proposed $30 million that would support similar projects to use underutilized
state property for housing. Healey also issued an executive order requesting state
agencies to conduct an audit of their property to find land any surplus land suitable
for this purpose.
“Converting state-owned land to another entity can be a little bit of a torturous
pathway. We know that building all the resources you need takes time,” Driscoll
said Thursday. “How do we leverage the cost of land, which is one of the reasons
housing is so expensive, to build the type of housing we need, but do it in a
shorter timetable? That’s what this (project) is all about.”
The project has received more than $25 million in state and federal funding, including
through American Rescue Plan Act rental funds and state and federal Low Income
Housing Tax Credits. Work on the site has not yet started.'
- 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: 'Winter solstice greetings! The shortest day and longest night of year celebrates
the return of the light. Unfortunately, winter viruses are rampant during this
month of many celebrations. As predicted, COVID-19 cases are increasing along
with influenza, RSV, strep and many other respiratory illnesses.
The newest coronavirus subvariant, JN.1, is rapidly spreading and becoming the
most dominant variant. The World Health Organization has classified it as a “variant
of interest.” To be a variant of interest it must have genetic changes that impact
its characteristics and growing in a way that makes it a risk to global public
health.
To date there is no evidence of it causing more serious illness. The updated vaccine
appears to be active against JN.1. Symptoms are similar to previous strains. Worse
symptoms and outcomes are more dependent on a person’s immunity and overall health.
The CDC reports emergency room visits, hospitalizations and death rates for COVID-19
cases are elevated nationally. In the Midwest emergency visits are increasing
to last year’s surge numbers.'
- text: 'In a culture with an unquenchable urge to trend-hunt and categorize, the
calendar might be the most arbitrary measure of all. So, I ’ m taking a pass on
writing a year-end best-of list. Instead, let’s call it things that stick. What
follows are five experiences still smouldering away in the back of my mind — good,
best, neither — months after I first saw them.
LESSONS OF THE HOUR, Wadsworth Atheneum
The great American abolitionist Frederick Douglass was the most photographed person
of his era, and not by coincidence. Douglass, a proto-scholar of image theory,
knew that the rapid rise of photography in postbellum America could be a powerful
tool to contend with American racism, and that if white Americans were to be moved
to hold their Black counterparts as equal, they would first need to see them as
such. “Lessons of the Hour” began that story by dramatic and affecting means:
Isaac Julien’s stirring “Lessons of the Hour,” 2019, a lush, five-channel video
portrayed the intensity and drama of Douglass’s oratory gifts, and his hunger
for equality. Then, it moved from tell to show, with scores of 19th-century photo
portraits of Black Americans, decked out in their best finery, who had taken Douglass’s
exhortations to heart. In the constant deluge of imagery, both moving and still,
that we live in today, Douglass appears eerily prescient. He urged Black Americans
to take active authorship of how they were perceived — an agency that’s now a
second-to-second strategy of a large chunk of the planet (under 40, at least)
through the frame of social media, a self-curation machine he could never have
conceived. The strategy he imagined in the service of high virtue — what else
to call the quest for equality? — has been coopted by every manner of vice. There’s
a metaphor here I don’t care to explore more deeply; it’s Wednesday night, I just
watched 5 minutes of the Republican debate, and that’s as depressed as I want
to get. More than anything, I wish Douglass were here — not to see how badly we’ve
gone wrong, but to help us find a way out.
Storage jar (detail), 1857. Dave (later recorded as David Drake), American, ca.
1801–1870s. Stony Bluff Manufactory (ca. 1848-67), Old Edgefield District, South
Carolina. Collection of Greenville County Museum of Art. Eileen Travell/© Metropolitan
Museum of Art/Collection of Greenville County Museum of Art
HEAR ME NOW: THE BLACK POTTERS OF OLD EDGEFIELD, SOUTH CAROLINA, Museum of Fine
Arts Boston
Advertisement
David Drake, or Dave the Potter, has become a posthumous art star in recent years
for the masterful works he made — outsize ceramic food storage jars that none
could match — and the story they embody. Born into enslavement, Drake worked at
one of the ceramic factories in antebellum Old Edgefield, South Carolina, where
jars were mass-produced and exported all over the South for household use. Drake,
who could read and write despite its prohibition among enslaved people, emblazoned
his works with aphoristic verse – unique transmissions of the enslaved experience
that traveled along with the workaday objects he inscribed. As documents, the
jars are remarkable primary-source accounts of a life lived in bondage; as art,
they embody the spirit and soul of a man whose cruel circumstances couldn’t snuff
his creativity and longing for human connection. “Hear Me Now” stays with me in
its clear-eyed intent to craft lineage across generations broken by bondage, and
to make that shattered story whole. Alongside Drake, and the countless anonymous
makers in the exhibition, were renowned contemporary artists Simone Leigh and
Theaster Gates, for whom ceramics, a medium forced on generations of Black makers
for profit they would never share, is their chosen medium — one with the imprint
of Black American cultural DNA. In many ways, their work is an extension of Drake’s
— reclaiming a material and process from the depravity of enslavement, and wholly
owning it for themselves.
Advertisement
A work by Henry Darger from the 2004 movie "In the Realms of the Unreal," directed
by Jessica Yu.
AMERICAN PERSPECTIVES, Portland Museum of Art
Advertisement
This show bothered me, but in the best way. Folk art, a catch-all of misfit otherness
— things that make art museums uncomfortable — has been the subject of much reconsideration
in recent years, making any show that dares to use the term as fascinating as
it is haphazard. “American Perspectives” put those dynamics in high relief, a
key art world debate unfolding in real time. It lumped artists like Henry Darger,
the Chicago hospital custodian who crafted his epic pictorial saga of the Vivian
Girls, heroes of an imagined child slave rebellion, alongside 19th-century handpainted
pharmacy signs and carousel horses. Let’s be clear: The product of a deeply examined
inner life is not equivalent to workaday craft, however masterful the latter.
Herein lies the evolving debate: Darger, who died in 1973, is now collected by
the Museum of Modern Art, among other tier-one institutions. So what was he —
and others like him — doing in this show? “American Perspectives” put folk art’s
work-in-progress definition right in front of our eyes.
Advertisement
Installation view, "Painted: Our Bodies, Hearts, and Village," Colby College Museum
of Art. Works shown, left to right: Ernest Blumenschein, "Untitled (Mountain Wood
Gatherers)," c. 1926; Virgil Ortiz, "Omtua," 2023; Tony Abeyta, "Citadel," 2021.
Stephen Davis Phillips
PAINTED: OUR BODIES, HEARTS, AND VILLAGE, Colby College Museum of Art
I remain awestruck by this exhibition, not only for the specific conversations
it provokes, but for the museum’s willingness to interrogate itself, and to find
its own answers lacking. In a field where “landmark” gets tossed around too easily,
this is the real deal. Colby had for years in its vaults a collection of paintings
by Taos Society of Artists, a group of white painters from the urban east who,
in the early part of the 20th century, relocated to New Mexico to cash in on the
growing fad for western Native American images. Their pictures were accomplished,
but tilt towards uncomfortable clichés of Indigenous people as a primitive, dying
race. The past century has affirmed the opposite: Pueblo and Diné communities
in the region have both preserved their artistic traditions and produced increasingly
vital contemporary art. Artists like Virgil Ortiz and Michael Namingha are among
many here to confront the mythmaking of white artists, a century ago, and speak
for themselves. Colby could have left the TSA paintings gathering dust in storage.
It did the opposite, and invited Indigenous curators to help it reconfigure a
clear-eyed re-telling of its own history in the context of the future the museum
intends to build. Note: The show continues until July 28.
THE EMBRACE, Hank Willis Thomas
Advertisement
I walked alongside “The Embrace,” by now the city’s most prominent public work
of art, from its beginnings; the day it was chosen from a field of five to memorialize
Coretta Scott King and Martin Luther King Jr. in 2019, I wrote that it was jarring,
in the best possible way. We’re used to memorials that ache with overwrought sincerity
— figures with hands to hearts, stoic gazes fixed on a faraway horizon. The Embrace’s
confounding tangle of arms and hands – an extraction of a moment between the couple
when Martin was awarded the Nobel Peace Prize in 1964— rejects all convention.
Instead, it emanates the complexity of mystery and, yes, confrontation. It invites
viewers into their own contemplation, rather than spoon-feeding them what to think
and feel. Looking back to when it arrived on Boston Common in January, you could
have guessed some reactions would shade towards ridicule (a bit by Leslie Jones
on The Daily Show, suggesting an intimate act, might have been the apex). And
social media, which by its nature divorces an object from its scale, material,
and context, reduces real experience to a snippet-sized meme. But for those of
us who have been there – who have walked into those arms, who have navigated that
knot of emotion, a relic of a tragic, complex time – know the experience itself
is irreducible. Being with it, literally, is the only way to understand it, which
to me makes all the sense in the world. “The Embrace,” in all its glory, is only
and forever for Boston, as it should be.
Murray Whyte can be reached at murray.whyte@globe.com. Follow him @TheMurrayWhyte.'
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.6273946360153256
name: Accuracy
---
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
This is a [SetFit](https://github.com/huggingface/setfit) model trained on the [Kevinger/hub-report-dataset](https://huggingface.co/datasets/Kevinger/hub-report-dataset) dataset that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/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](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
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
- **Classification head:** a OneVsRestClassifier instance
- **Maximum Sequence Length:** 512 tokens
<!-- - **Number of Classes:** Unknown -->
- **Training Dataset:** [Kevinger/hub-report-dataset](https://huggingface.co/datasets/Kevinger/hub-report-dataset)
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### 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)
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.6274 |
## 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("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.")
```
<!--
### Downstream Use
*List how someone could finetune this model on their own dataset.*
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Set Metrics
| Training set | Min | Median | Max |
|:-------------|:----|:---------|:-----|
| Word count | 53 | 387.1406 | 1237 |
### Training Hyperparameters
- batch_size: (8, 8)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 50
- 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.0013 | 1 | 0.1576 | - |
| 0.0625 | 50 | 0.1332 | - |
| 0.125 | 100 | 0.0118 | - |
| 0.1875 | 150 | 0.0009 | - |
| 0.25 | 200 | 0.0008 | - |
| 0.3125 | 250 | 0.0002 | - |
| 0.375 | 300 | 0.0003 | - |
| 0.4375 | 350 | 0.0002 | - |
| 0.5 | 400 | 0.0005 | - |
| 0.5625 | 450 | 0.0001 | - |
| 0.625 | 500 | 0.0001 | - |
| 0.6875 | 550 | 0.0001 | - |
| 0.75 | 600 | 0.0002 | - |
| 0.8125 | 650 | 0.0004 | - |
| 0.875 | 700 | 0.0002 | - |
| 0.9375 | 750 | 0.0001 | - |
| 1.0 | 800 | 0.0001 | - |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- Sentence Transformers: 2.3.1
- Transformers: 4.35.2
- PyTorch: 2.1.0+cu121
- Datasets: 2.16.1
- Tokenizers: 0.15.1
## 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}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->