Feature Extraction
Transformers
Safetensors
English
mpnet
cybersecurity
embeddings
classification
text-embeddings-inference
Instructions to use selfconstruct3d/mpnet-classification-finetuned-cyber-groups with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use selfconstruct3d/mpnet-classification-finetuned-cyber-groups with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="selfconstruct3d/mpnet-classification-finetuned-cyber-groups")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("selfconstruct3d/mpnet-classification-finetuned-cyber-groups") model = AutoModel.from_pretrained("selfconstruct3d/mpnet-classification-finetuned-cyber-groups") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -81,6 +81,17 @@ outputs = model(**inputs)
|
|
| 81 |
embeddings = outputs.last_hidden_state.mean(dim=1)
|
| 82 |
```
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
## Training Details
|
| 85 |
|
| 86 |
### Training Data
|
|
|
|
| 81 |
embeddings = outputs.last_hidden_state.mean(dim=1)
|
| 82 |
```
|
| 83 |
|
| 84 |
+
or
|
| 85 |
+
|
| 86 |
+
```python
|
| 87 |
+
from sentence_transformers import SentenceTransformer
|
| 88 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
| 89 |
+
|
| 90 |
+
model = SentenceTransformer('selfconstruct3d/mpnet-classification-finetuned-cyber-groups')
|
| 91 |
+
embeddings = model.encode(sentences)
|
| 92 |
+
print(embeddings)
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
## Training Details
|
| 96 |
|
| 97 |
### Training Data
|