26 3 months ago

A CodeLlama-based model fine-tuned to detect security vulnerabilities and suggest secure code improvements

3 months ago

59fd8c1b12b1 · 3.9GB

llama
·
6.74B
·
Q4_0
LLAMA 2 COMMUNITY LICENSE AGREEMENT Llama 2 Version Release Date: July 18, 2023 "Agreement" means th
# Llama Code Acceptable Use Policy Meta is committed to promoting safe and fair use of its tools and
[INST] <<SYS>>{{ .System }}<</SYS>> {{ .Prompt }} [/INST]
llama
·
40M
·
F16
{ "rope_frequency_base": 1000000, "stop": [ "[INST]", "[/INST]", "<<

Readme

This model is a fine-tuned version of CodeLlama-7B (4-bit quantized) trained on the CyberNative dataset. The dataset contains secure and insecure coding samples with detailed vulnerability annotations. The model is fine-tuned using LoRA with Unsloth and merged with the base model to produce a performant .gguf model ready for local inference via Ollama.

  • Base Model: CodeLlama-7B
  • Dataset: CyberNative Dataset
  • Fine-tuning Type: Supervised fine-tuning (SFT)
  • Task: Code review with a focus on security vulnerabilities and suggestions for secure alternatives
  • Training Framework: Unsloth (LoRA fine-tuning)
  • Quantization: Q8_0
  • Architecture: LLaMA 2 family
  • Format: GGUF (compatible with Ollama, llama.cpp)

🧑‍💻 Intended Use

  • Detect security flaws in code snippets
  • Suggest secure refactored code alternatives
  • Educational tool for secure coding practices

🚫 Limitations

  • May not detect complex zero-day vulnerabilities
  • Might hallucinate when provided with ambiguous inputs
  • Only supports languages in the training dataset (mostly Python/C/C++)