Text Classification
sentence-transformers
Joblib
Scikit-learn
safety
malware
code
multilingual
red-team
Instructions to use NecroMOnk/malicious-coding-intent-v6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NecroMOnk/malicious-coding-intent-v6 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NecroMOnk/malicious-coding-intent-v6") 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] - Scikit-learn
How to use NecroMOnk/malicious-coding-intent-v6 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("NecroMOnk/malicious-coding-intent-v6", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
| { | |
| "embedder": "BAAI/bge-m3", | |
| "device": "cuda", | |
| "embedding_dim": 1024, | |
| "max_length": 128, | |
| "clf_dir": "data\\clf\\v6_code_aware_50k_oss_clean_benign_code", | |
| "counts": { | |
| "train": 222950, | |
| "test": 27736, | |
| "obfuscated_test": 4000, | |
| "malware_code_test": 2000 | |
| }, | |
| "binary": { | |
| "precision": 0.9996, | |
| "recall": 0.9964, | |
| "f1": 0.998, | |
| "roc_auc": 0.9997, | |
| "false_positive_rate": 0.004, | |
| "obfuscated_recall": 0.9935, | |
| "obfuscated_count": 4000, | |
| "malware_code_recall": 0.989, | |
| "malware_code_count": 2000 | |
| }, | |
| "multilabel": { | |
| "micro_f1": 0.6146, | |
| "macro_f1": 0.514, | |
| "macro_f1_positives_only": 0.5141, | |
| "obfuscated_macro_f1": 0.3011, | |
| "malware_code_macro_f1": 0.1235 | |
| } | |
| } |