Text Classification
Transformers
Safetensors
French
English
modernbert
devsecops
cybersecurity
fine-tuned
Eval Results (legacy)
text-embeddings-inference
Instructions to use Medyassino/devSECV2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Medyassino/devSECV2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Medyassino/devSECV2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Medyassino/devSECV2") model = AutoModelForSequenceClassification.from_pretrained("Medyassino/devSECV2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Medyassino/devSECV2: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/Medyassino/devSECV2/resolve/main/README.md
- Command line
-
hf download hf://Medyassino/devSECV2/README.md
-
curl -L -o README.md https://huggingface.co/Medyassino/devSECV2/resolve/main/README.md
2.42 kB
metadata
language:
- fr
- en
license: apache-2.0
library_name: transformers
pipeline_tag: text-classification
base_model: Medyassino/secopv2
tags:
- modernbert
- text-classification
- devsecops
- cybersecurity
- fine-tuned
metrics:
- accuracy
- f1
model-index:
- name: devSECV2
results:
- task:
type: text-classification
name: Classification binaire (Différent / Équivalent)
metrics:
- type: accuracy
value: 0.9035
- type: f1
name: F1 macro
value: 0.9019
devSECV2
Modèle de classification binaire basé sur ModernBERT (~0,1B paramètres), obtenu par fine-tuning de Medyassino/secopv2 pour distinguer deux classes : Différent et Équivalent.
Utilisation
from transformers import pipeline
clf = pipeline("text-classification", model="Medyassino/devSECV2")
# Adapter le format d'entrée à celui utilisé à l'entraînement
print(clf("<texte A> [SEP] <texte B>"))
⚠️ Le format exact de l'entrée (paire de textes, séparateur, longueur max) doit correspondre à celui utilisé lors du fine-tuning. À compléter :
<format d'entrée>.
Données d'entraînement
- Dataset(s) :
<à compléter : noms HF / Kaggle> - Jeu d'évaluation : 2 000 exemples (1 140 « Différent », 860 « Équivalent »)
Hyperparamètres
| Paramètre | Valeur |
|---|---|
| Modèle de base | Medyassino/secopv2 (ModernBERT) |
| Epochs | 8 |
| Matériel | Google Colab (<GPU T4>) |
Résultats (jeu d'évaluation, 2 000 exemples)
| Métrique | Valeur |
|---|---|
| Accuracy | 0,9035 |
| F1 macro | 0,9019 |
| Eval loss | 0,5926 |
| Classe | Précision | Rappel | F1 | Support |
|---|---|---|---|---|
| Différent | 0,9247 | 0,9044 | 0,9144 | 1140 |
| Équivalent | 0,8768 | 0,9023 | 0,8894 | 860 |
| Accuracy | 0,9035 | 2000 | ||
| Macro avg | 0,9007 | 0,9034 | 0,9019 | 2000 |
| Weighted avg | 0,9041 | 0,9035 | 0,9037 | 2000 |
Limites et biais
- La classe « Équivalent » est légèrement moins bien prédite (précision 0,877) que « Différent » (précision 0,925).
- Les performances ne sont garanties que sur des données proches de celles d'entraînement.
- Ne pas utiliser comme seul critère de décision dans un contexte de sécurité critique : validation humaine recommandée.
Auteur
Mohamed Yassine Bouneb (@Medyassino)