# Fine-Tuning a Small Language Model for Secret Detection in Code

DevFeed: [Fine-Tuning a Small Language Model for Secret Detection in Code](<https://devfeed.tech/articles/lean-and-mean-how-we-fine-tuned-a-small-language-model-for-secret-detection-in-code-53981.md>)

Original publisher: [Read original article](<https://www.wiz.io/blog/small-language-model-for-secrets-detection-in-code>)

Author: Daniel Lazarev

Published: 2025-06-10T16:01:49Z

Content type: article

Language: en

Sources: [Wiz](<https://devfeed.tech/sources/wiz-blog-rss-feed.md>)

Topics: [Cybersecurity](<https://devfeed.tech/topics/cybersecurity.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Code](<https://devfeed.tech/topics/code.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [Model Development](<https://devfeed.tech/topics/model-development.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [code](<https://devfeed.tech/tags/code.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [data-privacy](<https://devfeed.tech/tags/data-privacy.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [false-positive](<https://devfeed.tech/tags/false-positive.md>), [language-model](<https://devfeed.tech/tags/language-model.md>), [precision](<https://devfeed.tech/tags/precision.md>), [research](<https://devfeed.tech/tags/research.md>), [security](<https://devfeed.tech/tags/security.md>), [wiz-code](<https://devfeed.tech/tags/wiz-code.md>)

## AI overview

Wiz describes fine-tuning a Llama 3.2 1B small language model to detect secrets in code. The model is designed to provide contextual detection with lower computational cost and fewer privacy concerns than large language models, while outperforming regex-based methods in the reported evaluation.

## Source excerpt

Building an efficient small language model for cybersecurity, from data prep to deployment