Text Classification
Transformers
ONNX
Safetensors
Transformers.js
English
modernbert
mitre-attack
cyber-threat-intelligence
cti
multi-label
security
ttp
threat-intelligence
soc
detection-engineering
attack
Eval Results (legacy)
text-embeddings-inference
Instructions to use Project-Bastion/attack-technique-tagger with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Project-Bastion/attack-technique-tagger with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Project-Bastion/attack-technique-tagger")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Project-Bastion/attack-technique-tagger") model = AutoModelForSequenceClassification.from_pretrained("Project-Bastion/attack-technique-tagger", device_map="auto") - Transformers.js
How to use Project-Bastion/attack-technique-tagger with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'Project-Bastion/attack-technique-tagger'); - Notebooks
- Google Colab
- Kaggle
card: weight-only int8 ONNX (151 MB) with agreement numbers
Browse files
README.md
CHANGED
|
@@ -71,8 +71,8 @@ Code: GitHub `Project-Bastion/models`, `scripts/ttp/`.
|
|
| 71 |
|
| 72 |
## ONNX / browser
|
| 73 |
|
| 74 |
-
`onnx/model.onnx` (fp32, **599 MB**)
|
| 75 |
-
**int8
|
| 76 |
|
| 77 |
## Known limits
|
| 78 |
|
|
|
|
| 71 |
|
| 72 |
## ONNX / browser
|
| 73 |
|
| 74 |
+
`onnx/model.onnx` (fp32, **599 MB**) and `onnx/model_quantized.onnx` (weight-only int8, 151 MB) are published for transformers.js / onnxruntime. Checked against PyTorch on 200 validation sentences: onnxruntime fp32 differs by <1e-5 in probability; the in-browser code path (run in Node with transformers.js) gives identical decisions at the 0.2 threshold on all 200 sentences, with probabilities identical for 197 of them and within 0.014 on 3 long inputs (the demo works around a transformers.js quirk that drops the closing `[SEP]` when it truncates; a small residual on very long inputs remains, cause not fully isolated).
|
| 75 |
+
**Weight-only int8** (`onnx/model_quantized.onnx`, **151 MB**, the demo default): int8 weights with per-channel scales are dequantized at load while activations stay fp32. On 200 validation sentences it gives the same thresholded decisions as PyTorch for 198 (browser stack) / 197 (onnxruntime) of 200, mean probability change 0.0001, max 0.16; an int8 run can add or drop a low-confidence tag near the 0.2 threshold (for example the demo's last sample sentence gets an extra T1070.004 at 0.28 in int8 only). Standard dynamic int8 (91-94% of decisions kept) and static int8 with calibration (0% kept; ModernBERT activation outliers get clipped) do **not** work for this model, which is why the recipe quantizes weights only. Use the 599 MB fp32 file for exact agreement with the Python reference.
|
| 76 |
|
| 77 |
## Known limits
|
| 78 |
|