Wiz Fine-Tunes a Small Language Model to Detect Secrets in Code

· Original article ↗

Summary

Wiz describes fine-tuning Llama 3.2 1B for code secret detection. The model achieved 82% recall and 85.7% precision in the reported evaluation, and the company says it is in private preview.

Key points

  • Wiz trained Llama 3.2 1B to identify secrets in code, including examples in comments, string literals, and logging statements.
  • The training data was drawn from public GitHub repositories and labeled with help from larger language models, followed by expert validation and filtering for quality and diversity.
  • The fine-tuning used LoRA; post-training quantization reduced model size by 75% versus FP32 and reportedly made CPU processing 2.3 times faster, with less than a 1% drop in precision and recall.
  • Wiz reports 82% recall and 85.7% precision for its model, compared with about 60% recall for regex approaches; its table lists Qwen Code 2.5 0.5B at 71% recall and 87.5% precision.
  • A prediction funnel uses file attributes and regex checks to select files for model processing, and extracts relevant sections from large files.
  • The model is designed to run on standard CPU hardware and is currently in private preview, where it is intended to augment existing secret-scanning methods.

Article Details

Topic
Fine-tuning a small language model for code-secret detection

Vendors

Products

Tools

Related Articles