42.1 kB
13 files
Updated about 1 month ago
Name
Size
.gitattributes1.52 kB
xet
.gitignore48 Bytes
xet
Gpt1.65 kB
xet
README.md1.78 kB
xet
__init__.py1 Bytes
xet
hf_utils.py572 Bytes
xet
mamba_block.py13.6 kB
xet
mamba_config.py2.77 kB
xet
mamba_model.py7.33 kB
xet
mlp.py1.62 kB
xet
setup.py5.79 kB
xet
switch_mlp.py3.3 kB
xet
utils.py2.14 kB
xet
README.md

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)
Total size
42.1 kB
Files
13
Last updated
Jun 26
Pre-warmed CDN
US EU US EU

Contributors