nuclear_trained_harrier_end-end-true
text classification model
2 min read
A new model built on SetFit (an efficient approach for few-shot learning without prompts) and the base model microsoft/harrier-oss-v1-0.6b (0.6B parameters) with a LogisticRegression classifier. It solves text classification by sorting news and messages into two categories (positive and negative in the context of nuclear safety and arms). The model supports sequence lengths up to 32768 tokens and is well suited for fast filtering or thematic text analysis. Developers and researchers can use it for automated document labeling.
Key features
- Based on the efficient SetFit architecture with support for long contexts up to 32768 tokens.
- High classification quality with an F1-Macro score of 0.9027 on validation.
- Uses a Sentence Transformer as an embedder and logistic regression for the final prediction.
- Trained using an end-to-end approach on short texts up to 45 words long.
What you can do
- Integrate the model into news pipelines to automatically determine the sentiment or topics of texts.
- Apply it in a Telegram bot for fast filtering of incoming messages by specified classes.
- Use it as a ready-to-use classifier for analyzing texts related to international relations and security.
Example
Example code for running inference using the setfit library:
from setfit import SetFitModel
# Загрузка модели с Hugging Face Hub
model = SetFitModel.from_pretrained("fefofico/nuclear_trained_harrier_end-end-true")
# Запуск инференса
preds = model("Meanwhile, Israel has repeatedly said it will not allow Iran to develop a nuclear weapon.")
print(preds)
Read more
DetailsMetrics: F1-Macro 0.9027, F1-Binary 0.9021.
Training: 303 steps, batch size 16, loss CosineSimilarityLoss.
Libraries: SetFit 1.2.0, Sentence Transformers 6.3.0, PyTorch.










Comments