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
|
@@ -77,22 +77,21 @@ The model expects prompts in the following structured format:
|
|
| 77 |
|
| 78 |
```
|
| 79 |
### System:
|
| 80 |
-
You are a
|
| 81 |
-
You do not provide free-form explanations.
|
| 82 |
-
You do not include external references or links.
|
| 83 |
-
You only return structured, deterministic, and security-focused outputs.
|
| 84 |
|
| 85 |
### Task:
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
|
| 90 |
### Programming Language:
|
| 91 |
-
|
| 92 |
|
| 93 |
### Vulnerable Code:
|
| 94 |
-
|
| 95 |
|
|
|
|
|
|
|
| 96 |
```
|
| 97 |
|
| 98 |
The model will generate:
|
|
|
|
| 77 |
|
| 78 |
```
|
| 79 |
### System:
|
| 80 |
+
You are a security expert. Be concise. Analyze and fix.
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
### Task:
|
| 83 |
+
1. IDENTIFY: One sentence naming the CWE.
|
| 84 |
+
2. STRATEGY: One sentence fix strategy.
|
| 85 |
+
3. REMEDIATE: Provide the code under '### Fixed Code:'.
|
| 86 |
|
| 87 |
### Programming Language:
|
| 88 |
+
{language}
|
| 89 |
|
| 90 |
### Vulnerable Code:
|
| 91 |
+
{vuln_code}
|
| 92 |
|
| 93 |
+
### Analysis:
|
| 94 |
+
1. CWE Identification:
|
| 95 |
```
|
| 96 |
|
| 97 |
The model will generate:
|