INFERENCE

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import time
import torch
import re

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = AutoModelForSequenceClassification.from_pretrained("AquilaX-AI/agent").to(device)
tokenizer = AutoTokenizer.from_pretrained("AquilaX-AI/agent")

start = time.time()
question = "show my critical vulns"
print("Question: ", question)

question = re.sub(r"[,?.'\"']", '', question)
inputs = tokenizer(question.lower(), return_tensors="pt").to(device)
with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()
print("predicted_class: ", model.config.id2label[predicted_class_id])

print("Time_taken: ", time.time() - start)
Downloads last month
226
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.