setfit safetensors mpnet sentence-transformers text-classification generated_from_setfit_trainer arxiv:2209.11055 base_model:sentence-transformers/paraphrase-mpnet-base-v2 base_model:finetune:sentence-transformers/paraphrase-mpnet-base-v2 model-index region:us
---
base_model: sentence-transformers/paraphrase-mpnet-base-v2
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: The monitoring and evaluation framework will track progress to deliver nutrition
    results, valuable lessons will be learnt, the cost effectiveness of prioritised
    interventions will be established, targets will be realised and the impact of
    nutrition interventions will be understood. Successful implementation of the Strategic
    Plan will therefore be dependent on the quality of data collected and reported
    in a timely manner.
- text: ncrease the production of vital local foods Improve the trade balance for
    selected commodities where import substitution is economically viable
- text: nsure effective communication of agricultural related priorities to international
    partners through formal and non-formal donor coordination meetings. Strengthen
    capacity of the donor coordinatio
- text: In the national policy space for nutrition and food security, the National
    Council for Food Security, Sovereignty and Nutrition of Timor-Leste (KONSSANTIL),
    a government-led body, is vital in coordinating multi-sectoral responses to food
    security and nutrition. While it offers a unique role in shaping the country’s
    food and nutrition security situation, it faces some operational challenges as
    the government has not formally endorsed the KONSSTANTIL statute to coordinate
    cross-sectoral nutrition and food security programs. Also, as an effort to improve
    multi- sectoral coordination and add footprints to the global nutrition agenda,
    Timor-Leste, joined the global Scaling Up Nutrition (SUN) movement. The SUN movement
    secretariate at the Prime Minister’s Office has played a significant role in multi-sectoral
    coordination for food and nutrition security, including elaboration, positioning,
    and facilitating the endorsement of the statute of KONSSANTIL and the development
    of the SDG 2 Consolidated Action Plan for Nutrition and Food Security, a common
    results framework for SUN
- text: 'Multi-hazard approach: A multi-hazard approach identifies and supports the
    implementation of solutions that address more than one hazard simultaneously.
    With this approach, it is possible to use the resources more efficiently to address
    the diverse array of climate hazards'
inference: true
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.5483870967741935
      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 [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) 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 [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 512 tokens
- **Number of Classes:** 3 classes
<!-- - **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)

### Model Labels
| Label                                                                     | Examples                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|:--------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1.1. Food Security & Nutrition                                            | <ul><li>'Improve food security and nutrition'</li><li>'The challenges stemming from the main food security problems in Armenia can be categorized as internal and external factors that may contribute to the ostensible expression of the cited issues and further deterioration. In the context of this strategic document, the specific manifestations and challenges of the above problems are reflected under the 4 main pillars of food security (food availability, accessibility, utilization and stability) classified by the Global Strategic Framework for Food Security and Nutrition6 of the Committee on World Food Security'</li><li>'The low level of food security and self-sufficiency in Armenia plays key role. Food security system is the entirety of those sectors of national economy that deal with the 17 production, storage of agricultural products, processing and sale of raw materials. Food security system incorporated the following three main areas: ▪ primary agriculture itself with production of agricultural products, however, this sub- item is not considered under the food security system, as it has been featured above as a separate problem; ▪ areas involved in storage, processing, preservation and sale; ▪ Infrastructures including road-transport, telecommunications and communication, logistics and maintenance, storage system, et'</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 6.3.3 Awareness and use of the evidence-based / agrifood systems approach | <ul><li>'The strategy is firmly grounded in global declarations and aspirations, such as the Sustainable Development Goals. It builds on the lessons learned under the Government of Armenia (GoA) Programme of 2019, the GoA Action Programme (2019-2023), and previous strategic Governmental interventions, including the Mid- term Expenditures Framework of RA (2020-2022). Furthermore, the strategy reflects major points of cooperation highlighted in existing cooperation agreements, such as points related to agriculture development, agro-tourism, and agricultural statistics in the CEPA (EU-Armenian Comprehensive and Enhanced Partnership Agreement).'</li><li>"rmenia's agricultural sector can be a core pillar of a thriving, modern, and diversified economy. It possesses the potential to contribute significantly to the nation's economic growth, to improve the population's quality of life, and to create many sustainable, high-quality jobs and entrepreneurial opportunities. The vision for the next ten years is to have sustainable, innovative, high value-added agriculture in a harmony with the environment, ensuring care of natural resources, producing organic products and ensuring the well-being of the people living in the village. The agricultural sector's transition from traditional small-scale production towards modern, technology-enabled, market-driven, and value-added agriculture is part of the Government's overall vision of widespread prosperity. Core to this vision is inclusive growth where small producers, agribusinesses, and the broader population in rural areas - including most notably Armenia's youth - have access to productive opportunities. This vision will be realised by the Ministry of the Economy through activities that are complementary and additive to on-going efforts, particularly those of other line ministries, development partners, and civil society. To realise this ten-year strategic vision (2029), the Ministry of Economy is spearheading a three-year strategy action plan to catalyse growth across the agricultural sector and to advance rural development, ultimately improving Armenia's competitiveness in the global economy"</li><li>'Economic policy for ensuring sustainable and accelerated economic growth; \uf0b7 Active social and income policy for vulnerable groups of population (including the poor); \uf0b7 Modernization of governance system, including improved effectiveness of state governance and ensuring accelerated growth of the resource envelope at the disposal of the state.'</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 6.3.4 Effectiveness of Policy Implementation                              | <ul><li>'reate a single payment institution as part of the Ministry'</li><li>'.2. Development of a guideline for elaboration of climate change adaptation plans for settle- ments and dissemination among local self-government bodies Methodological assis- tance is ensured for lo- cal self-government bodies to plan and im- plement CCA measures in settle- ments Ministry of Territorial Administration and In- frastructures of the RA Urban Development Committee of the RA Ministry of Environ- ment of the RA Ministry of Emer- gency Situations of the RA 2022, 1st trimester Sources not prohibited by legislation (international donor organizations) 8,000 2.3. Development and implementation of the action plan to improve climate projections and early warning system The quality of climate projections is enhanced, and the early warning system is regulated as inputs for public policies for adaptation Ministry of Environment of the RA - 2022, 3rd trimester Sources not prohibited by legislation (international donor organizations) 3,000 2.4. Mapping and development of a database on CC related risks A database on CC re- lated risks is created to inform decision-making and elaboration of development programs Ministry of Environment of the RA - 2022, 1st trimester Sources not prohibited by legislation (inter- national donor organizations) 15,000 2.5. Development of training modules for senior officials, decision-makers and technical staff on CCA in various sectors to drive the NAP processes and implementation of the respective trainings Knowledge and capaci- ties of senior officials, decision-makers and technical officers in sec- toral governmental insti- tutions on strategic CC leadership are increased Ministry of Environment of the RA - 2022, 4th trimester Sources not prohibited by legislation (international donor organizations) 20,000 '</li><li>'In general, the NAP process seeks to support the coordination of climate change adaptation actions at the national level, and to accelerate strategic investments in climate-resilient development. Effective adaptation requires coordinated and consistent policy drawn on expertise from multiple sources. Thus, the establishment of a coherent, national level coordination mechanism is one of the key requirements of the NAP. Such a coordination mechanism can help ensure efficient use of limited resources. 36. The national body currently charged with driving the climate related processes is the Inter-Agency Coordinating Council for the Fulfillment of Requirements and Provisions of the UN Framework Convention on Climate Change. It was established by the Decree of Prime Minister of the Republic of Armenia № 955-A from October 2, 2012, with the Minister of Environment of the RA as the Council Chairman. The Council provides a forum in which the government, private sector entities, and international development partners (the latter two as non-voting members) can jointly engage on a broad spectrum of activities to support and coordinate climate resilience efforts. Oversight of the NAP process is not currently included in the Council mandate. 37. The Government is currently reviewing the functions, structure, and competence of the Council for their suitability to also serve as the coordination mechanism for the NAP process. Among the issues under review is oversight of the NAP and its related processes to ensure integration of independent expert advice into the adaptation governance and policy processes, oversight over a coordinated approach to sustainable development and climate resilience, and enhanced participation of civil society by means of regular dialogue among sectoral and thematic forum'</li></ul> |

## Evaluation

### Metrics
| Label   | Accuracy |
|:--------|:---------|
| **all** | 0.5484   |

## 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("setfit_model_id")
# Run inference
preds = model("ncrease the production of vital local foods Improve the trade balance for selected commodities where import substitution is economically viable")
```

<!--
### 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   | 5   | 123.0  | 1014 |

| Label                                                                     | Training Sample Count |
|:--------------------------------------------------------------------------|:----------------------|
| 1.1. Food Security & Nutrition                                            | 65                    |
| 6.3.3 Awareness and use of the evidence-based / agrifood systems approach | 32                    |
| 6.3.4 Effectiveness of Policy Implementation                              | 22                    |

### Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- 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: True

### Training Results
| Epoch  | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0019 | 1    | 0.2492        | -               |
| 0.0949 | 50   | 0.206         | -               |
| 0.1898 | 100  | 0.1261        | -               |
| 0.2846 | 150  | 0.1029        | -               |
| 0.3795 | 200  | 0.0616        | -               |
| 0.4744 | 250  | 0.0567        | -               |
| 0.5693 | 300  | 0.0559        | -               |
| 0.6641 | 350  | 0.0504        | -               |
| 0.7590 | 400  | 0.0523        | -               |
| 0.8539 | 450  | 0.0476        | -               |
| 0.9488 | 500  | 0.0513        | -               |
| 1.0    | 527  | -             | 0.2939          |

### Framework Versions
- Python: 3.12.8
- SetFit: 1.1.1
- Sentence Transformers: 3.3.1
- Transformers: 4.49.0
- PyTorch: 2.6.0
- Datasets: 3.3.2
- Tokenizers: 0.21.0

## 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.*
-->