Zerx966 commited on
Commit
344a068
1 Parent(s): 3ef28b3

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md CHANGED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - text-generation
5
+ - malware
6
+ - malicious-content
7
+ license: apache-2.0
8
+ datasets:
9
+ - malware-dataset
10
+ ---
11
+ # WormGPT
12
+
13
+ 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.
14
+
15
+ ## Model Details
16
+ - Model Name: WormGPT
17
+ - Architecture: GPT-2
18
+ - Dataset: Malware Dataset
19
+ - Training Procedure:
20
+ - Fine-tuned the pre-trained GPT-2 model on the malware dataset using transfer learning.
21
+ - Trained for a specific number of epochs to improve the model's ability to generate malicious code.
22
+ - Evaluation Metrics:
23
+ - Accuracy: Measures the model's ability to generate code that is similar to the training data.
24
+ - Precision: Measures the model's ability to generate code that is not malicious.
25
+ - Recall: Measures the model's ability to generate code that is malicious.
26
+
27
+ ## Usage
28
+ 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.
29
+
30
+ ```python
31
+ from transformers import GPT2LMHeadModel, GPT2Tokenizer
32
+
33
+ # Load the pre-trained WormGPT model and tokenizer
34
+ model = GPT2LMHeadModel.from_pretrained("wormgpt")
35
+ tokenizer = GPT2Tokenizer.from_pretrained("wormgpt")
36
+
37
+ def generate_text(prompt, max_length=50):
38
+ input_ids = tokenizer.encode(prompt, return_tensors="pt")
39
+ output = model.generate(input_ids, max_length=max_length, num_return_sequences=1)
40
+ generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
41
+ return generated_text
42
+
43
+ # Example usage
44
+ prompt = "Generate malicious code for a virus."
45
+ malicious_code = generate_text(prompt)
46
+ print(malicious_code)