Downloads · 30 days
16
36% of all-time downloads
kaiwei123/modernbert_par_2_jaur_1
modernbert_par_2_jaur_1 is a text classification model from kaiwei123. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model classifies terminal commands for the MANTIS terminal simulator. It assigns each command to one of three routing categories:
Downloads · 30 days
16
36% of all-time downloads
All-time downloads
44
Public
Parameters
150M
598 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors598 MB · 99%
From the Hugging Face model README
This model classifies terminal commands for the MANTIS terminal simulator. It assigns each command to one of three routing categories:
| Model output | MANTIS label | Intended meaning |
|---|---|---|
LABEL_0 | read | Primarily observes or retrieves system state |
LABEL_1 | write | May modify system state |
LABEL_2 | rejection | Should not be handled as an accepted command |
The semantic label mapping is implemented by MANTIS because the model configuration retains the generic LABEL_0–LABEL_2 names.
ModernBertForSequenceClassificationThe model is intended to route terminal commands inside the MANTIS simulated Ubuntu environment. MANTIS uses the prediction to choose between read-only handling, state-changing handling, and command rejection.
It is not intended to:
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "kaiwei123/modernbert_par_2_jaur_1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
labels = {
0: "read",
1: "write",
2: "rejection",
}
command = "find /tmp -type f -delete"
inputs = tokenizer(
command,
truncation=True,
max_length=256,
padding="max_length",
return_tensors="pt",
)
with torch.no_grad():
logits = model(**inputs).logits
prediction = int(logits.argmax(dim=-1).item())
print(labels[prediction])
To download the model locally:
hf download kaiwei123/modernbert_par_2_jaur_1 \
--local-dir model/modernbert_par_2_jaur_1
The associated routing dataset is available at:
read prediction must not be treated as proof that execution is safe.This classifier is a routing component, not a security boundary. Applications should validate commands independently and execute untrusted input only inside an appropriately isolated environment.
Particular attention should be given to false read predictions because apparently read-only commands can invoke subprocesses or cause side effects through options, shell expansion, redirection, or command substitution.