Instructions to use NecroMOnk/safety-ds-malicious-coding-clf-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NecroMOnk/safety-ds-malicious-coding-clf-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NecroMOnk/safety-ds-malicious-coding-clf-v2") 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/safety-ds-malicious-coding-clf-v2 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("NecroMOnk/safety-ds-malicious-coding-clf-v2", "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
| { | |
| "threshold": 0.004477, | |
| "default": 0.5, | |
| "calibrated_on": "hf:yatin-superintelligence/White-Hat-Security-Agent-Prompts-600K", | |
| "constraints": { | |
| "max_white_hat_fpr": 0.05, | |
| "min_obfuscated_recall": 0.85 | |
| }, | |
| "metrics_at_threshold": { | |
| "threshold": 0.004477, | |
| "white_hat_fpr": 0.0494, | |
| "benign_hf_fpr": 0.0741, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9728 | |
| }, | |
| "candidates": [ | |
| { | |
| "threshold": 0.012771, | |
| "white_hat_fpr": 0.0098, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9137, | |
| "max_fpr_target": 0.01, | |
| "min_obf_recall_target": 0.9 | |
| }, | |
| { | |
| "threshold": 0.012771, | |
| "white_hat_fpr": 0.0098, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9137, | |
| "max_fpr_target": 0.01, | |
| "min_obf_recall_target": 0.85 | |
| }, | |
| { | |
| "threshold": 0.012771, | |
| "white_hat_fpr": 0.0098, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9137, | |
| "max_fpr_target": 0.01, | |
| "min_obf_recall_target": 0.8 | |
| }, | |
| { | |
| "threshold": 0.012771, | |
| "white_hat_fpr": 0.0098, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9137, | |
| "max_fpr_target": 0.01, | |
| "min_obf_recall_target": 0.75 | |
| }, | |
| { | |
| "threshold": 0.004477, | |
| "white_hat_fpr": 0.0494, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9728, | |
| "max_fpr_target": 0.05, | |
| "min_obf_recall_target": 0.9 | |
| }, | |
| { | |
| "threshold": 0.004477, | |
| "white_hat_fpr": 0.0494, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9728, | |
| "max_fpr_target": 0.05, | |
| "min_obf_recall_target": 0.85 | |
| }, | |
| { | |
| "threshold": 0.004477, | |
| "white_hat_fpr": 0.0494, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9728, | |
| "max_fpr_target": 0.05, | |
| "min_obf_recall_target": 0.8 | |
| }, | |
| { | |
| "threshold": 0.004477, | |
| "white_hat_fpr": 0.0494, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9728, | |
| "max_fpr_target": 0.05, | |
| "min_obf_recall_target": 0.75 | |
| }, | |
| { | |
| "threshold": 0.002472, | |
| "white_hat_fpr": 0.0985, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9785, | |
| "max_fpr_target": 0.1, | |
| "min_obf_recall_target": 0.9 | |
| }, | |
| { | |
| "threshold": 0.002472, | |
| "white_hat_fpr": 0.0985, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9785, | |
| "max_fpr_target": 0.1, | |
| "min_obf_recall_target": 0.85 | |
| }, | |
| { | |
| "threshold": 0.002472, | |
| "white_hat_fpr": 0.0985, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9785, | |
| "max_fpr_target": 0.1, | |
| "min_obf_recall_target": 0.8 | |
| }, | |
| { | |
| "threshold": 0.002472, | |
| "white_hat_fpr": 0.0985, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9785, | |
| "max_fpr_target": 0.1, | |
| "min_obf_recall_target": 0.75 | |
| }, | |
| { | |
| "threshold": 0.001649, | |
| "white_hat_fpr": 0.1498, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9845, | |
| "max_fpr_target": 0.15, | |
| "min_obf_recall_target": 0.9 | |
| }, | |
| { | |
| "threshold": 0.001649, | |
| "white_hat_fpr": 0.1498, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9845, | |
| "max_fpr_target": 0.15, | |
| "min_obf_recall_target": 0.85 | |
| }, | |
| { | |
| "threshold": 0.001649, | |
| "white_hat_fpr": 0.1498, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9845, | |
| "max_fpr_target": 0.15, | |
| "min_obf_recall_target": 0.8 | |
| }, | |
| { | |
| "threshold": 0.001649, | |
| "white_hat_fpr": 0.1498, | |
| "obfuscated_recall": 1.0, | |
| "malware_code_recall": 0.9845, | |
| "max_fpr_target": 0.15, | |
| "min_obf_recall_target": 0.75 | |
| } | |
| ] | |
| } |