Text Generation
PEFT
Safetensors
English
cybersecurity
vulnerability-detection
secure-code
codellama
lora
qlora
code
Instructions to use Younis2003/CodeLlama_for_code_security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Younis2003/CodeLlama_for_code_security with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/CodeLlama-13b-hf") model = PeftModel.from_pretrained(base_model, "Younis2003/CodeLlama_for_code_security") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -73,18 +73,23 @@ This corresponds to approximately **96% semantic similarity** between predicted
|
|
| 73 |
The model expects prompts in the following structured format:
|
| 74 |
|
| 75 |
```
|
| 76 |
-
|
| 77 |
### System:
|
| 78 |
-
|
| 79 |
You are a secure code remediation and vulnerability analysis engine.
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
###
|
|
|
|
|
|
|
|
|
|
| 82 |
|
|
|
|
| 83 |
<language>
|
| 84 |
|
| 85 |
### Vulnerable Code:
|
|
|
|
| 86 |
|
| 87 |
-
<code>
|
| 88 |
```
|
| 89 |
|
| 90 |
The model will generate:
|
|
@@ -125,7 +130,7 @@ The model was trained using the dataset:
|
|
| 125 |
|
| 126 |
**secure_dataset_cvefixes**
|
| 127 |
|
| 128 |
-
Dataset source:
|
| 129 |
|
| 130 |
```
|
| 131 |
Younis2003/secure_dataset_cvefixes
|
|
|
|
| 73 |
The model expects prompts in the following structured format:
|
| 74 |
|
| 75 |
```
|
|
|
|
| 76 |
### System:
|
|
|
|
| 77 |
You are a secure code remediation and vulnerability analysis engine.
|
| 78 |
+
You do not provide free-form explanations.
|
| 79 |
+
You do not include external references or links.
|
| 80 |
+
You only return structured, deterministic, and security-focused outputs.
|
| 81 |
|
| 82 |
+
### Task:
|
| 83 |
+
Given vulnerable source code, perform the following steps:
|
| 84 |
+
1. Produce a secure and correct version of the code.
|
| 85 |
+
2. Explain the vulnerability using structured security metadata.
|
| 86 |
|
| 87 |
+
### Programming Language:
|
| 88 |
<language>
|
| 89 |
|
| 90 |
### Vulnerable Code:
|
| 91 |
+
<vulnerable_code>
|
| 92 |
|
|
|
|
| 93 |
```
|
| 94 |
|
| 95 |
The model will generate:
|
|
|
|
| 130 |
|
| 131 |
**secure_dataset_cvefixes**
|
| 132 |
|
| 133 |
+
# Dataset source:
|
| 134 |
|
| 135 |
```
|
| 136 |
Younis2003/secure_dataset_cvefixes
|