SkillAgentSearch skills...

SecBERT

pretrained BERT model for cyber security text, learned CyberSecurity Knowledge

Install / Use

/learn @jackaduma/SecBERT

README

<!-- * @Author: Kun * @Date: 2020-11-24 22:58:24 * @LastEditTime: 2023-04-29 06:12:28 * @LastEditors: Kun * @Description: * @FilePath: /my_open_projects/SecBERT/README.md -->

<p align=center>SecBERT</p>

standard-readme compliant Donate

中文说明 | English

SecBERT is a BERT model trained on cyber security text, learned CyberSecurity Knowledge.

Table of Contents

Downloading Trained Models

SecBERT models now installable directly within Huggingface's framework:

from transformers import AutoTokenizer, AutoModelForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("jackaduma/SecBERT")

model = AutoModelForMaskedLM.from_pretrained("jackaduma/SecBERT")


tokenizer = AutoTokenizer.from_pretrained("jackaduma/SecRoBERTa")

model = AutoModelForMaskedLM.from_pretrained("jackaduma/SecRoBERTa")


Pretrained-Weights

We release the the pytorch version of the trained models. The pytorch version is created using the Hugging Face library, and this repo shows how to use it.

Huggingface Modelhub

Using SecBERT in your own model

SecBERT models include all necessary files to be plugged in your own model and are in same format as BERT.

If you use PyTorch, refer to Hugging Face's repo where detailed instructions on using BERT models are provided.

Fill Mask

We proposed to build language model which work on cyber security text, as result, it can improve downstream tasks (NER, Text Classification, Semantic Understand, Q&A) in Cyber Security Domain.

First, as below shows Fill-Mask pipeline in Google Bert, AllenAI SciBert and our SecBERT .

cd lm
python eval_fillmask_lm.py
<img src="./fill-mask-result.png" width="150%" height="150%">

Downstream-tasks

TODO


Star-History

star-history


Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

AliPay(支付宝)

<div align="center"> <img src="./misc/ali_pay.png" alt="ali_pay" width="400" /> </div>

WechatPay(微信)

<div align="center"> <img src="./misc/wechat_pay.png" alt="wechat_pay" width="400" /> </div>

License

MIT © Kun

View on GitHub
GitHub Stars208
CategoryEducation
Updated23d ago
Forks35

Languages

Python

Security Score

100/100

Audited on Feb 26, 2026

No findings