ardi555's picture
Push model using huggingface_hub.
d318911 verified
---
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: "Deputy Finance Ministers from the Group\nof 10 leading western industrialised\
\ countries met here to\ndiscuss the world debt crisis, trade imbalances and currency\n\
stability today following last month's Paris monetary accord,\nsources close to\
\ the talks said.\n The officials met at the offices of the International\n\
Monetary Fund (IMF) to discuss broad aspects of world monetary\npolicy in preparation\
\ for the IMF's interim committee meeting\nin Washington in April.\n The talks\
\ were the first high-level international review of\nthe monetary situation since\
\ the accord last month reached by\nthe U.S., West Germany, France, Britain, Japan\
\ and Canada to\nstabilise world currency markets at around present levels\nfollowing\
\ the 40 pct slide in the dollar since mid-1985.\n Other countries represented\
\ at today's talks were Italy,\nwhich refused to attend last month's meeting on\
\ the grounds\nthat it was being excluded from the real discussions, the\nNetherlands,\
\ Belgium and Switzerland.\n Many of the officials had met earlier today and\
\ yesterday\nwithin the framework of the Organisation for Economic\nCooperation\
\ and Development (OECD) to review the slow progress\nbeing made in cutting the\
\ record 170 billion dlr U.S. Trade\ndeficit and persuading West Germany and Japan\
\ to open their\neconomies to more foreign imports.\n Reuter\n"
- text: "Oper shr 69 cts vs 83 cts\n Oper net 35.9 mln vs 42.4 mln\n Revs 798.9\
\ mln vs 659.2 mln\n Avg shrs 52.0 mln vs 50.9 mln\n Nine mths\n Oper\
\ shr 2.38 dlrs vs 2.75 dlrs\n Oper net 123.3 mln vs 135.6 mln\n Revs 2.31\
\ billion vs 1.86 billion\n Avg shrs 51.8 mln vs 49.3 mln\n NOTE: Net excludes\
\ losses from discontinued operations of\nnil vs 16.1 mln dlrs in quarter and\
\ 227.5 mln dlrs vs 42.7 mln\ndlrs in nine mths.\n Quarter net includes gains\
\ from sale of aircraft of two mln\ndlrs vs 6,200,000 dlrs.\n Reuter\n"
- text: "The National Association of Wheat\nGrowers, NAWG, board of directors is scheduled\
\ to meet\nSecretary of State George Schultz and Undersecretary of State\nAllen\
\ Wallis to discuss the Department's current role in farm\ntrade policy, the association\
\ said.\n NAWG President Jim Miller said in a statement that the\norganization\
\ wanted to convey to Secretary Schultz the\nimportance that exports hold for\
\ U.S. agriculture and the\ndegree to which farmers are dependent upon favorable\
\ State\nDepartment trade policies to remain profitable.\n \"Foreign policy\
\ decisions of the U.S. State Department have\nin the past severely hampered our\
\ efforts to move our product\nto overseas markets,\" he said.\n Miller noted\
\ Secretary Schultz is scheduled to meet next\nmonth with representatives of the\
\ Soviet Union, and the NAWG\n\"wanted to be certain the secretary was aware of\
\ our concerns\nregarding the reopening of wheat trade with the Soviet Union.\"\
\n The annual spring NAWG board of directors meeting is held\nin Washington\
\ to allow grower-leaders from around the country\nto meet with their state congressional\
\ delegations and members\nof the executive branch.\n The purpose is to discuss\
\ the current situation for\nproducing and marketing wheat and help set the legislative\
\ and\nregulatory agenda for the coming year, the NAWG statement said.\n Reuter\n"
- text: "The Bank of France is likely to cut its\nmoney market intervention rate by\
\ up to a quarter point at the\nstart of next week. This follows a steady decline\
\ in the call\nmoney rate over the past 10 days and signals from the Finance\n\
Ministry that the time is ripe for a fall, dealers said.\n The call money rate\
\ peaked at just above nine pct ahead of\nthe meeting of finance ministers from\
\ the Group of Five\nindustrial countries and Canada on February 22, which restored\n\
considerable stability to foreign exchanges after several weeks\nof turbulence.\n\
\ The call money rate dropped to around 8-3/8 pct on February\n23, the day\
\ after the Paris accord, and then edged steadily\ndown to eight pct on February\
\ 27 and 7-3/4 pct on March 3,\nwhere it has now stabilised.\n Dealers said\
\ the Bank of France intervened to absorb\nliquidity to hold the rate at 7-3/4\
\ pct.\n While call money has dropped by well over a percentage\npoint, the\
\ Bank of France's money market intervention rate has\nremained unchanged since\
\ January 2, when it was raised to eight\npct from 7-1/4 pct in a bid to stop\
\ a franc slide.\n The seven-day repurchase rate has also been unchanged at\n\
8-3/4 since it was raised by a half-point on January 5.\n The Bank of France\
\ has begun using the seven-day repurchase\nrate to set an upper indicator for\
\ money market rates, while\nusing the intervention rate to set the floor.\n \
\ Sources close to Finance Minister Edouard Balladur said\nthat he would be\
\ happy to see an interest rate cut, and dealers\nsaid any fall in the intervention\
\ rate was most likely to come\nwhen the Bank of France buys first category paper\
\ next Monday,\nalthough an earlier cut could not be excluded.\n A cut in the\
\ seven-day repurchase rate could come as early\nas tomorrow morning, banking\
\ sources said.\n They said recent high interest rates have encouraged an\n\
acceleration in foreign funds returning to France, discouraging\nthe authorities\
\ from making a hasty rate cut. But they also\npointed out that money supply is\
\ broadly back on target, giving\nscope for a small fall in rates.\n M-3 money\
\ supply, the government's key aggregate, finished\n1986 within the government's\
\ three to five pct growth target,\nrising 4.6 pct compared with seven pct in\
\ 1985.\n REUTER\n"
- text: "The French 1986 current account balance\nof payments surplus has been revised\
\ slightly upwards to 25.8\nbillion francs from the 25.4 billion franc figure\
\ announced\nlast month, the Finance Ministry said.\n This compares with a\
\ 1.5 billion deficit in 1985, and while\nit is the first surplus since 1979,\
\ is substantially lower than\nthe 50 billion surplus forecast by the previous\
\ socialist\ngovernment before they lost office in March last year.\n Net long-term\
\ capital outflows rose sharply to 70.5 billion\nfrancs last year from 8.8 billion\
\ in 1985, largely due to a\nmajor program of foreign debt repayment, the ministry\
\ said.\n In the fourth quarter alone the unadjusted surplus rose to\n14.1\
\ billion francs from 6.6 billion the previous quarter, but\nthe adjusted surplus\
\ fell to 7.4 billion from 9.1 billion.\n Fourth quarter medium and long-term\
\ foreign debt repayments\nexceeded new credits by 11 billion francs.\n REUTER\n"
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
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: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.785234899328859
name: Accuracy
---
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
This is a [SetFit](https://github.com/huggingface/setfit) model 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:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **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.7852 |
## 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("ardi555/setfit_reuters21578_reducedto15")
# Run inference
preds = model("Oper shr 69 cts vs 83 cts
Oper net 35.9 mln vs 42.4 mln
Revs 798.9 mln vs 659.2 mln
Avg shrs 52.0 mln vs 50.9 mln
Nine mths
Oper shr 2.38 dlrs vs 2.75 dlrs
Oper net 123.3 mln vs 135.6 mln
Revs 2.31 billion vs 1.86 billion
Avg shrs 51.8 mln vs 49.3 mln
NOTE: Net excludes losses from discontinued operations of
nil vs 16.1 mln dlrs in quarter and 227.5 mln dlrs vs 42.7 mln
dlrs in nine mths.
Quarter net includes gains from sale of aircraft of two mln
dlrs vs 6,200,000 dlrs.
Reuter
")
```
<!--
### 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 | 1 | 181.1067 | 788 |
### 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
- 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.0013 | 1 | 0.4971 | - |
| 0.0667 | 50 | 0.1826 | - |
| 0.1333 | 100 | 0.1223 | - |
| 0.2 | 150 | 0.0699 | - |
| 0.2667 | 200 | 0.0712 | - |
| 0.3333 | 250 | 0.0646 | - |
| 0.4 | 300 | 0.055 | - |
| 0.4667 | 350 | 0.0611 | - |
| 0.5333 | 400 | 0.053 | - |
| 0.6 | 450 | 0.0555 | - |
| 0.6667 | 500 | 0.0475 | - |
| 0.7333 | 550 | 0.0716 | - |
| 0.8 | 600 | 0.0587 | - |
| 0.8667 | 650 | 0.0571 | - |
| 0.9333 | 700 | 0.0436 | - |
| 1.0 | 750 | 0.0505 | - |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.1.0
- Sentence Transformers: 3.2.1
- Transformers: 4.42.2
- PyTorch: 2.5.1+cu121
- Datasets: 3.1.0
- Tokenizers: 0.19.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.*
-->