Text Classification
Transformers
Safetensors
roberta
Generated from Trainer
classification
nlp
vulnerability
text-embeddings-inference
Instructions to use CIRCL/vulnerability-severity-classification-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIRCL/vulnerability-severity-classification-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CIRCL/vulnerability-severity-classification-roberta-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base") model = AutoModelForSequenceClassification.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base") - Inference
- Notebooks
- Google Colab
- Kaggle
Dropout
#1
by stevugnin - opened
- README.md +1 -1
- config.json +1 -1
README.md
CHANGED
|
@@ -57,8 +57,8 @@ inputs = tokenizer(test_description, return_tensors="pt", truncation=True, paddi
|
|
| 57 |
# Run inference
|
| 58 |
with torch.no_grad():
|
| 59 |
outputs = model(**inputs)
|
| 60 |
-
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
| 61 |
|
|
|
|
| 62 |
# Print results
|
| 63 |
print("Predictions:", predictions)
|
| 64 |
predicted_class = torch.argmax(predictions, dim=-1).item()
|
|
|
|
| 57 |
# Run inference
|
| 58 |
with torch.no_grad():
|
| 59 |
outputs = model(**inputs)
|
|
|
|
| 60 |
|
| 61 |
+
predictions = outputs.logits
|
| 62 |
# Print results
|
| 63 |
print("Predictions:", predictions)
|
| 64 |
predicted_class = torch.argmax(predictions, dim=-1).item()
|
config.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"bos_token_id": 0,
|
| 8 |
-
"classifier_dropout":
|
| 9 |
"dtype": "float32",
|
| 10 |
"eos_token_id": 2,
|
| 11 |
"hidden_act": "gelu",
|
|
|
|
| 5 |
],
|
| 6 |
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": "softmax",
|
| 9 |
"dtype": "float32",
|
| 10 |
"eos_token_id": 2,
|
| 11 |
"hidden_act": "gelu",
|