ardi555's picture
Push model using huggingface_hub.
9ef8326 verified
metadata
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - generated_from_setfit_trainer
widget:
  - text: |
      Japan told the General Agreement on
      Tariffs and Trade that South Korea's five-year import
      diversification plan violated the spirit of the world trade
      governing body, a Foreign Ministry spokesman said.
          The notification came in Japan's answer to a recent GATT
      questionnaire on unfair trade practices, the spokesman said.
          In the five-year plan, which starts this year, South Korea
      aims to reduce its dependency on Japan as a source of imported
      goods and to increase imports from the U.S. And Europe.
          Japan's move came after several unsuccessful bilateral
      negotiations on the plan, the spokesman said. "The notification
      does not represent anything resembling a formal complaint, nor
      is it intended to pressure South Korea. It is a routine
      procedure followed by all other GATT member states."
       Reuter
  - text: |
      Japan cannot bear a further rise of the
      yen, Foreign Minister Tadashi Kuranari said.
          "A further stronger yen would be a misfortune for Japan and
      the Japanese people would not be able to bear such a burden," he
      told reporters.
          The minister said he wants to tell U.S. Political leaders
      of the sacrifices Japan is making to cut its trade surplus.
          Kuranari was widely expected to fly to Washington tomorrow
      for talks focussing on trade. But departure remains uncertain
      because of the continuing parliamentary boycott by opposition
      parties protesting plans for a new sales tax.
          If the boycott is lifted tomorrow, Kuranari would probably
      have to remain in Japan to attend parliamentary discussions on
      the government's 1987/88 budget, Japanese officials said.
          Kuranari said both the U.S. And Japan should approach the
      trade imbalance in a calm, unemotional manner.
          But, he added, "If the issue of rice is to be raised...I
      would mention the feelings of the Japanese people."
          Japanese politicians have said repeatedly the country
      cannot bow to U.S. Pressure to liberalize rice imports because
      the issue is too sensitive.
       REUTER
  - text: |
      The European Community Commission
      confirmed it granted export licences for 59,000 tonnes of
      current series white sugar at a maximum export rebate of 45.678
      European Currency Units (ECUs) per 100 kilos.
          Out of this, traders in West Germany received 34,750
      tonnes, in the U.K. 13,000, in Denmark 7,250 tonnes and in
      France 4,000 tonnes.
       REUTER
  - text: |
      Chancellor of the Exchequer Nigel
      Lawson's Budget speech was described as sound and well balanced
      by analysts, if slightly lacking in excitement.
          A cut in bank base lending rates is now widely expected
      tomorrow, with most forecasts predicting a half-point fall. A
      follow-up half-point cut is anticipated next week.
          "Worthy but boring would probably sum it up," Peter Fellner,
      U.K. Economist at stockbrokers James Capel and Co, said. "It was
      a very, very prudent fiscal budget."
          Richard Jeffrey of brokers Hoare Govett said it was a
      well-balanced budget within the confines of the government's
      philosophy of keeping expenditure levels flat.
          Most analysts said the Budget was very sound on the fiscal
      side, but offered nothing new on monetary policy.
          As was widely expected, Lawson split his "fiscal adjustment"
      between trimming the 1987/88 PSBR target to 4.0 billion stg
      from 7.1 billion and cutting basic rate income tax from 29 to
      27 pct.
          The target for the narrow measure of money supply, M0, was
      kept unchangd at two to six pct, while the target for the broad
      Sterling M3 aggregate was dropped.
          Both Jeffrey and Fellner said the budget clears the way for
      a half-point fall in U.K. Base rates tomorrow, but the
      authorities are unlikely to sanction a larger cut immediately.
      Many analysts and currency dealers have forecast a full
      one-point cut tomorrow.
          "The Bank of England will be loathe to take any action which
      it will have to reverse later," Jeffrey said, though he added a
      further half-point cut was quite possible in the near future.
          The main worry from today's speech is the outlook for
      inflation, given the signs of relaxed monetary policy contained
      in it, Scrimgeour Vickers economist Richard Holt said.
          Holt noted the "rather loose" inflation forecast of 4.0 pct
      at end-1987, and said the lower interest rates likely to result
      from the tough fiscal stance could cause longer term concern.
          "A higher PSBR target could be preferable in the long term,"
      he said, although lower mortgage interest rates on the back of
      falling base rates would have an offsetting impact on
      inflation.
          The Budget will inspire a lot of short-term confidence but
      it was "not a good budget for inflation," he said
          Jeffrey said he would have liked Lawson to say more about
      the dangers of excessive liquidity build-up but overall was not
      too concerned about a revival of inflation.
          Fellner noted that the exchange rate was to remain the
      "leading edge" of monetary policy, but said the authorities were
      likely to be extremely cautious on this front.
          He said they were unlikely to hesitate in holding interest
      rates steady or even raising them again if sterling showed any
      signs of excessive weakness.
          Most analysts agreed Lawson had bolstered the credibility
      of the Budget by adopting realistic forecasts.
          Raising the forecast for the current account deficit from
      1.5 to 2.5 billion stg for 1987 would not unsettle the markets,
      which are already discounting that amount, Jeffrey said.
      that the 4.0 billion stg PSBR target was given credibility by
      the favourable outturn for 1986/87, which is now also forecast
      to be 4.0 billion stg.
          But analysts said the Budget speech did not give any
      clear-cut indication about the timing of the general election,
      which has to be held before June, 1988.
          Some believe it signals a poll this June, noting that the
      benefits, such as income tax cuts and the decision not to raise
      duties on alcohol and tobacco, become available immediately.
          But others said it kept several options open and it was not
      possible to deduce too much from it.
          James Capel's Fellner noted that by being fiscally prudent,
      Lawson had kept open the possibility of an autumn election in
      that there would be no "chickens coming home to roost."
          Richard Jeffrey, who favours the likelihood of a June
      election, said it was important the Chancellor had not gone for
      a Budget aimed overtly at buying an election victory.
          Nevertheless, he said, it was likely to result in a boost
      to the Conservative Party's pre-election popularity.
       REUTER
  - text: |
      Booker Plc <BOKL.L> said 1987 had
      started well and the group had the resources to invest in its
      growth business both organically and by acquisition.
          It was commenting on figures for 1986 which showed pretax
      profits rising to 54.6 mln from 46.5 mln previously. Profits
      from the U.S. Accounted for 39 pct of the total. The results
      were broadly in line with analysts' forecasts and the company's
      shares firmed in morning trading to 421p from 413p at Friday's
      close.
          The group ended the year with a cash surplus higher at 54
      mln stg, compared to 26 mln previously, after capital
      expenditure which rose to 54 mln from 43 mln.
          In a statement, the company said the U.K. Agribusiness
      group reported excellent profits growth while health products
      profits rose to 6.5 mln from 5.4 mln.
       REUTER
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.916083916083916
            name: Accuracy

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

This is a SetFit model 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.9161

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("ardi555/setfit_mpnet_reuters21578_reducedto15")
# Run inference
preds = model("The European Community Commission
confirmed it granted export licences for 59,000 tonnes of
current series white sugar at a maximum export rebate of 45.678
European Currency Units (ECUs) per 100 kilos.
    Out of this, traders in West Germany received 34,750
tonnes, in the U.K. 13,000, in Denmark 7,250 tonnes and in
France 4,000 tonnes.
 REUTER
")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 20 204.4467 1075

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.2676 -
0.0667 50 0.1617 -
0.1333 100 0.0869 -
0.2 150 0.0583 -
0.2667 200 0.0766 -
0.3333 250 0.0578 -
0.4 300 0.0483 -
0.4667 350 0.0374 -
0.5333 400 0.0372 -
0.6 450 0.039 -
0.6667 500 0.0367 -
0.7333 550 0.0378 -
0.8 600 0.0299 -
0.8667 650 0.0317 -
0.9333 700 0.0308 -
1.0 750 0.0293 -

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

@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}
}