Edit model card

WormGPT

WormGPT is a GPT-2 model trained on a large dataset of malicious code to generate code that can be used for malicious purposes. It can be used to generate code for various types of malware, including viruses, worms, Trojans, and other malicious software.

Model Details

  • Model Name: WormGPT
  • Architecture: GPT-2
  • Dataset: Malware Dataset
  • Training Procedure:
    • Fine-tuned the pre-trained GPT-2 model on the malware dataset using transfer learning.
    • Trained for a specific number of epochs to improve the model's ability to generate malicious code.
  • Evaluation Metrics:
    • Accuracy: Measures the model's ability to generate code that is similar to the training data.
    • Precision: Measures the model's ability to generate code that is not malicious.
    • Recall: Measures the model's ability to generate code that is malicious.

Usage

To use WormGPT, you can simply call the generate_text function with a prompt as input. The model will generate a response based on the provided prompt.

from transformers import GPT2LMHeadModel, GPT2Tokenizer

# Load the pre-trained WormGPT model and tokenizer
model = GPT2LMHeadModel.from_pretrained("wormgpt")
tokenizer = GPT2Tokenizer.from_pretrained("wormgpt")

def generate_text(prompt, max_length=50):
    input_ids = tokenizer.encode(prompt, return_tensors="pt")
    output = model.generate(input_ids, max_length=max_length, num_return_sequences=1)
    generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
    return generated_text

# Example usage
prompt = "Generate malicious code for a virus."
malicious_code = generate_text(prompt)
print(malicious_code)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Unable to determine this model's library. Check the docs .