It is specifically designed to enhance performance in generating and understanding cybersecurity, identifying cyber threats and classifying data under the NIST taxonomy and IT Risks based on the ITC EBA guidelines.
Model evaluation was based on qualitative assessment of generated text relevance and coherence in the context of cybersecurity.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "Vanessasml/cyber-risk-llama-2-7b"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name)
6
7# Example of how to use the model:
8prompt = """Question: What are the cyber threads present in the article?
9Article: More than one million Brits over the age of 45 have fallen victim to some form of email-related fraud, \
10as the internet supersedes the telephone as the favored channel for scammers, according to Aviva. \
11The insurer polled over 1000 adults over the age of 45 in the latest update to its long-running Real Retirement Report. \
12Further, 6% said they had actually fallen victim to such an online attack, amounting to around 1.2 million adults. \
13Some 22% more people it surveyed had been targeted by ...
14"""
15pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=2048, repetition_penalty=1.2,temperature=0)
16# To generate text:
17result = pipe(f"<s>[INST] {prompt} [/INST]")
18print(result[0]['generated_text'])
The model, while robust in cybersecurity contexts, may not generalize well to unrelated domains. Users should be cautious of biases inherent in the training data which may manifest in model predictions.
1@misc{cyber-risk-llama-2-7b-sft-lora-4bit-float16,
2 author = {Vanessa Lopes},
3 title = {Cyber-risk-llama-2-7B Model},
4 year = {2024},
5 publisher = {HuggingFace Hub},
6 journal = {HuggingFace Model Hub}
7}