Downloads · 30 days
33
2% of all-time downloads
RichardErkhov/Vanessasml_-_cyber-risk-llama-3-8b-instruct-sft-gguf
Vanessasml_-_cyber-risk-llama-3-8b-instruct-sft-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
33
2% of all-time downloads
All-time downloads
1.9K
Public
Repo size
92.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf108 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
cyber-risk-llama-3-8b-instruct-sft - GGUF
datasets:
This model is a fine-tuned version of meta-llama/Meta-Llama-3-8B-Instruct on the vanessasml/cybersecurity_32k_instruction_input_output dataset.
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.
The model was fine-tuned on vanessasml/cybersecurity_32k_instruction_input_output, a dataset focused on cybersecurity news analysis.
No special data format was applied as recommended, although the following steps need to be applied to adjust the input:
# During training
from trl import setup_chat_format
model, tokenizer = setup_chat_format(model, tokenizer)
# During inference
messages = [
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
{"role": "user", "content": "Who are you?"},
]
prompt = pipeline.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
meta-llama/Meta-Llama-3-8B-Instruct.Model evaluation was based on qualitative assessment of generated text relevance and coherence in the context of cybersecurity.
nf4. Nested quantization is disabled.float16 to ensure efficient computation.64160.1Here is how to load and use the model using transformers:
import transformers
model_name = "vanessasml/cyber-risk-llama-3-8b-instruct-sft"
# Example of how to use the model:
pipeline = transformers.pipeline(
"text-generation",
model=model_name,
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda",
)
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "What are the main 5 cyber classes from the NIST cyber framework?"},
]
prompt = pipeline.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
terminators = [
pipeline.tokenizer.eos_token_id,
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = pipeline(
prompt,
max_new_tokens=256,
eos_token_id=terminators,
do_sample=True,
temperature=0.6,
top_p=0.9,
)
print(outputs[0]["generated_text"][len(prompt):])
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.
If you use this model, please cite it as follows:
@misc{cyber-risk-llama-3-8b-instruct-sft,
author = {Vanessa Lopes},
title = {Cyber-risk-llama-3-8B-Instruct-sft Model},
year = {2024},
publisher = {HuggingFace Hub},
journal = {HuggingFace Model Hub}
}