Text Classification
Transformers
Safetensors
English

Model Card for Model ID

Prompt classification (malicious vs benign)

Model Details

Model Description

This is a fine-tuned model on the dataset of prompts to classify whether a prompt is malicious or benign. It is designed to be used in safety filters and moderation tools.

  • Developed by: Amina Akhtar
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]
  • Finetuned from model [optional]: [More Information Needed]

Model Sources [optional]

  • Repository: [More Information Needed]
  • Paper [optional]: [More Information Needed]
  • Demo [optional]: [More Information Needed]

Uses

Direct Use

[More Information Needed]

Downstream Use [optional]

[More Information Needed]

Out-of-Scope Use

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id ="AminaAkhtar/Llama-3.2-1B-prompt-classifier"
model = AutoModelForSequenceClassification.from_pretrained(
    model_id
)
tokenizer = AutoTokenizer.from_pretrained(
    model_id
)
inputs = tokenizer("<user_input>", return_tensors="pt")
logits = model(**inputs).logits
probs = torch.nn.functional.softmax(logits, dim=-1)

probs = probs * 100
class_label = "MALICIOUS" if probs[0,1] > probs[0,0] else "BENIGN"
print(class_label)
print(f"BENIGN: {probs[0,0]:.2f}%")
print(f"MALICIOUS: {probs[0,1]:.2f}%")

Training Details

Training Data

[More Information Needed]

Training Procedure

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AminaAkhtar/Llama-3.2-1B-prompt-classifier

Finetuned
(834)
this model

Dataset used to train AminaAkhtar/Llama-3.2-1B-prompt-classifier