Text Generation
PEFT
Safetensors
code
English
security
cybersecurity
secure-coding
ai-security
owasp
code-generation
lora
fine-tuned
securecode
conversational
Run this model with HF Jobs
Run scthornton/granite-20b-code-securecode on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/scthornton/granite-20b-code-securecode. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/scthornton/granite-20b-code-securecode on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/scthornton/granite-20b-code-securecode. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/scthornton/granite-20b-code-securecode. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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 filesFiles changed (3)
- README.md+14-14
- adapter_config.json+5-5
- adapter_model.safetensors+2-2
2 unmodified lines345678910111213141516171819202122232425262 unmodified linespipeline_tag: text-generationlicense: apache-2.0language:- codebase_model:- ibm-granite/granite-20b-code-instruct-8ktags:- securecode- security- owasp- code-generation- secure-coding- lora- qlora- vulnerability-detection- cybersecuritydatasets:- scthornton/securecodemodel-index:- name: granite-20b-code-securecoderesults: []---# Granite 20B Code SecureCode2 unmodified lines345678910111213141516171819202122232425262 unmodified linespipeline_tag: text-generationlicense: apache-2.0language:- codebase_model:- ibm-granite/granite-20b-code-instruct-8ktags:- securecode- security- owasp- code-generation- secure-coding- lora- qlora- vulnerability-detection- cybersecuritydatasets:- scthornton/securecodemodel-index:- name: granite-20b-code-securecoderesults: []---# Granite 20B Code SecureCode
15 unmodified lines161718192021222 unmodified lines252627282930313233343536373815 unmodified lines"layers_pattern": null,"layers_to_transform": null,"loftq_config": {},"lora_alpha": 16,"lora_bias": false,"lora_dropout": 0.05,"megatron_config": null,2 unmodified lines"peft_type": "LORA","peft_version": "0.18.1","qalora_group_size": 16,"r": 8,"rank_pattern": {},"revision": null,"target_modules": ["attn.c_attn","attn.c_proj","mlp.c_proj","mlp.c_fc"],"target_parameters": null,"task_type": "CAUSAL_LM",15 unmodified lines161718192021222 unmodified lines252627282930313233343536373815 unmodified lines"layers_pattern": null,"layers_to_transform": null,"loftq_config": {},"lora_alpha": 32,"lora_bias": false,"lora_dropout": 0.05,"megatron_config": null,2 unmodified lines"peft_type": "LORA","peft_version": "0.18.1","qalora_group_size": 16,"r": 16,"rank_pattern": {},"revision": null,"target_modules": ["mlp.c_fc","mlp.c_proj","attn.c_attn","attn.c_proj"],"target_parameters": null,"task_type": "CAUSAL_LM",
123version https://git-lfs.github.com/spec/v1oid sha256:175a33b8d7dd300f52b5b53a7236da3f7969479353f36a84bbfe75b8e97894f6size 143610512123version https://git-lfs.github.com/spec/v1oid sha256:9c2ba75c66234694064aa7e226faf3cd16da954232124c1bff9aa05b0f2d9c0dsize 287167864
README.md+14-14
adapter_config.json+5-5
adapter_model.safetensors+2-2