Text Classification
setfit
Safetensors
sentence-transformers
bert
generated_from_setfit_trainer
text-embeddings-inference
Instructions to use gsjang/ntisql_encoder_setfit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use gsjang/ntisql_encoder_setfit with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("gsjang/ntisql_encoder_setfit") - sentence-transformers
How to use gsjang/ntisql_encoder_setfit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("gsjang/ntisql_encoder_setfit") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
metadata
base_model: snunlp/KR-SBERT-V40K-klueNLI-augSTS
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: 2020년부터 2022년까지 반도체에 해당하는 중점 기술 분류 코드가 'NAT0' 인 과제의 총 연구비 현물 금액을 조회해주세요.
- text: >-
2020년부터 2022년까지 AI 관련 중점기술코드에 대한 상위 5개 지역별 연도별 민간 연구비 합계를 억 단위로 조회해주세요. 각
지역명에서 '특별시', '광역시', '특별자치시', '특별자치'는 제외하고, 연구비가 5천만 원 미만인 경우 1억 원으로 간주하여
계산한 결과를 보여주세요.
- text: >-
2018년부터 2022년까지 인공지능 중점기술코드('AI')와 관련된 연도별 연구비 현금합계금액과 총 연구비 합계금액을 조회해
주세요. 또한 각 연도별 연구비 비중을 함께 보여주세요.
- text: >-
2018년부터 2022년까지 반도체 중점기술코드에 대한 상위 5개 지역별 연도별 민간 연구비 총액을 억 단위로 조회해주세요. 각
지역명에서 '특별시', '광역시', '특별자치시', '특별자치'는 제외하고, 연구비가 5천만 원 미만인 경우 1억 원으로 간주하여
계산한 결과를 보여주세요.
- text: >-
2018년부터 2022년까지 양자컴퓨팅('QUC') 중점기술코드와 관련된 연도별 미국 자금 지원 금액을 조회해주세요. 자금 지원
총액을 백만 단위로 변환하여 보여주세요.
inference: true
SetFit with snunlp/KR-SBERT-V40K-klueNLI-augSTS
This is a SetFit model that can be used for Text Classification. This SetFit model uses snunlp/KR-SBERT-V40K-klueNLI-augSTS as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Sentence Transformer body: snunlp/KR-SBERT-V40K-klueNLI-augSTS
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 128 tokens
- Number of Classes: 29 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
| Label | Examples |
|---|---|
| 0 |
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
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("NTIS/ntisql_encoder_setfit")
# Run inference
preds = model("2020년부터 2022년까지 반도체에 해당하는 중점 기술 분류 코드가 'NAT0' 인 과제의 총 연구비 현물 금액을 조회해주세요.")
Training Details
Training Set Metrics
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 6 | 22.8862 | 66 |
| Label | Training Sample Count |
|---|---|
| 0 | 65 |
| 1 | 28 |
| 2 | 26 |
| 3 | 131 |
| 4 | 489 |
| 5 | 180 |
| 6 | 80 |
| 7 | 217 |
| 8 | 62 |
| 9 | 77 |
| 10 | 4 |
| 11 | 3 |
| 12 | 5 |
| 13 | 41 |
| 14 | 179 |
| 15 | 108 |
| 16 | 4 |
| 17 | 56 |
| 18 | 41 |
| 19 | 21 |
| 20 | 78 |
| 21 | 72 |
| 22 | 99 |
| 23 | 116 |
| 24 | 48 |
| 25 | 46 |
| 26 | 115 |
| 27 | 75 |
| 28 | 13 |
Framework Versions
- Python: 3.12.7
- SetFit: 1.0.0
- Sentence Transformers: 3.0.1
- Transformers: 4.46.3
- PyTorch: 2.5.1+cu124
- Datasets: 3.1.0
- Tokenizers: 0.20.3
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}
}