Text Generation
PEFT
Safetensors
code
English
security
cybersecurity
secure-coding
ai-security
owasp
code-generation
lora
fine-tuned
securecode
conversational
Instructions to use scthornton/granite-20b-code-securecode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use scthornton/granite-20b-code-securecode with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ibm-granite/granite-20b-code-instruct-8k") model = PeftModel.from_pretrained(base_model, "scthornton/granite-20b-code-securecode") - Notebooks
- Google Colab
- Kaggle
Upload model
Browse files- README.md +14 -14
- adapter_config.json +5 -5
- adapter_model.safetensors +2 -2
README.md
CHANGED
|
@@ -3,24 +3,24 @@ library_name: peft
|
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
license: apache-2.0
|
| 5 |
language:
|
| 6 |
-
|
| 7 |
base_model:
|
| 8 |
-
|
| 9 |
tags:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
datasets:
|
| 20 |
-
|
| 21 |
model-index:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
---
|
| 25 |
|
| 26 |
# Granite 20B Code SecureCode
|
|
|
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
license: apache-2.0
|
| 5 |
language:
|
| 6 |
+
- code
|
| 7 |
base_model:
|
| 8 |
+
- ibm-granite/granite-20b-code-instruct-8k
|
| 9 |
tags:
|
| 10 |
+
- securecode
|
| 11 |
+
- security
|
| 12 |
+
- owasp
|
| 13 |
+
- code-generation
|
| 14 |
+
- secure-coding
|
| 15 |
+
- lora
|
| 16 |
+
- qlora
|
| 17 |
+
- vulnerability-detection
|
| 18 |
+
- cybersecurity
|
| 19 |
datasets:
|
| 20 |
+
- scthornton/securecode
|
| 21 |
model-index:
|
| 22 |
+
- name: granite-20b-code-securecode
|
| 23 |
+
results: []
|
| 24 |
---
|
| 25 |
|
| 26 |
# Granite 20B Code SecureCode
|
adapter_config.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
| 18 |
"loftq_config": {},
|
| 19 |
-
"lora_alpha":
|
| 20 |
"lora_bias": false,
|
| 21 |
"lora_dropout": 0.05,
|
| 22 |
"megatron_config": null,
|
|
@@ -25,14 +25,14 @@
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
-
"r":
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"
|
| 33 |
-
"attn.c_proj",
|
| 34 |
"mlp.c_proj",
|
| 35 |
-
"
|
|
|
|
| 36 |
],
|
| 37 |
"target_parameters": null,
|
| 38 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 16 |
"layers_pattern": null,
|
| 17 |
"layers_to_transform": null,
|
| 18 |
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 32,
|
| 20 |
"lora_bias": false,
|
| 21 |
"lora_dropout": 0.05,
|
| 22 |
"megatron_config": null,
|
|
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
+
"r": 16,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
+
"mlp.c_fc",
|
|
|
|
| 33 |
"mlp.c_proj",
|
| 34 |
+
"attn.c_attn",
|
| 35 |
+
"attn.c_proj"
|
| 36 |
],
|
| 37 |
"target_parameters": null,
|
| 38 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c2ba75c66234694064aa7e226faf3cd16da954232124c1bff9aa05b0f2d9c0d
|
| 3 |
+
size 287167864
|