SecEmbed
Collection
Cybersecurity embeddings: SecEmbed bi-encoders, SecReranker, training pairs, and retrieval benchmark. • 9 items • Updated
How to use alirezaaminzadeh/SecEmbed-small with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("alirezaaminzadeh/SecEmbed-small")
sentences = [
"That is a happy person",
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]Cybersecurity dense embedding model continued from BAAI/bge-small-en-v1.5 on secembed-pairs using MultipleNegativesRankingLoss with hard negatives.
python from sentence_transformers import SentenceTransformer model = SentenceTransformer("alirezaaminzadeh/SecEmbed-small") emb = model.encode(["detect powershell encoded command", "T1059.001 PowerShell..."])
Use with SecReranker: retrieve top-50 with SecEmbed, rerank to top-5.
Base model
BAAI/bge-small-en-v1.5