Downloads · 30 days
7
21% of all-time downloads
barha/granite-cti-technique-mapping-lora
granite-cti-technique-mapping-lora is a text generation model from barha. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter for ibm-granite/granite-4.1-3b that maps a Cyber Threat Intelligence (CTI) procedure sentence to its corresponding MITRE ATT&CK technique ID (e.g. T1547.001).
Downloads · 30 days
7
21% of all-time downloads
All-time downloads
34
Public
Repo size
125 MB
Likes
0
Public
Click a slice to open those files.
.safetensors125 MB · 95%
From the Hugging Face model README
A LoRA adapter for ibm-granite/granite-4.1-3b that maps a
Cyber Threat Intelligence (CTI) procedure sentence to its corresponding MITRE ATT&CK technique ID
(e.g. T1547.001).
Given a CTI procedure sentence, the model returns a single ATT&CK technique identifier. Prompt format:
What ATT&CK technique does the following CTI procedure sentence describe?
<cti>
{procedure sentence}
</cti>
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained('ibm-granite/granite-4.1-3b', device_map='cuda')
model = PeftModel.from_pretrained(base, 'barha/granite-cti-technique-mapping-lora')
tok = AutoTokenizer.from_pretrained('barha/granite-cti-technique-mapping-lora')
prompt = 'What ATT&CK technique does the following CTI procedure sentence describe?\n\n<cti>\nGazer can establish persistence by creating a .lnk file in the Start menu.\n</cti>'
msgs = [{'role': 'user', 'content': prompt}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors='pt').to('cuda')
out = model.generate(inputs, max_new_tokens=16)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True)) # -> T1547.001
LoRA adapter only (~124 MB); load on top of the base model as shown above.