Downloads · 30 days
31
7% of all-time downloads
EryriLabs/Llama-3.2-SARA-3b
Llama-3.2-SARA-3b is a machine learning model from EryriLabs. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama3.2.
<figure <img src="SARA.png" alt="SARA" width="300" </figure
Downloads · 30 days
31
7% of all-time downloads
All-time downloads
425
Public
Parameters
3.6B
7.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.2 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of the unsloth/Llama-3.2-3B-bnb-4bit, developed to act as SARA—the Security Awareness and Resilience Assistant. SARA is optimized to be a lightweight, offline-friendly AI assistant capable of running on low-spec laptops, designed to provide practical cybersecurity advice in a conversational style.
This model is fine-tuned for conversational question-answering focused on basic cybersecurity topics. It was trained as part of an ongoing blog series (https://www.eryrilabs.co.uk/post/building-sara-a-lightweight-cybersecurity-assistant-for-everyday-laptops) to deliver short, actionable responses suitable for users who want quick guidance on digital safety without needing advanced technical knowledge.
This model is intended for providing cybersecurity information and guidance to general users in an accessible, offline-friendly way.
This model can be used as an offline assistant for basic cybersecurity questions, answering common queries in a conversational format. It is ideal for use cases where an internet connection is not available or where low-spec hardware constraints apply.
This model should not be used for professional or critical cybersecurity advice, as it is designed for general guidance and may lack the specificity required for advanced technical issues. It is also not suitable for providing nuanced advice in areas outside basic cybersecurity practices.
While SARA is optimized for basic cybersecurity education, it has limitations in depth and may lack the ability to answer highly technical questions. Additionally, it may be limited in handling complex, nuanced queries due to its lightweight design and quantized 4-bit structure.
Users should consider SARA as an educational tool rather than a replacement for professional cybersecurity advice. Further fine-tuning could help improve the model's handling of diverse inputs and conversational depth, making it more robust for varied user needs.
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("EryriLabs/Llama-3.2-SARA-3b", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("EryriLabs/Llama-3.2-SARA-3b")
# Sample question
input_text = "What make a strong password?"
# Tokenize and generate response
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(inputs["input_ids"], max_length=50)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model was fine-tuned on a custom Q&A-style dataset centered on cybersecurity fundamentals, such as creating a strong password, using 2-Step Verification etc.
The fine-tuning was conducted on a system with an Intel i9 12900k CPU, an NVIDIA GeForce RTX 4090 GPU, and 32GB RAM. Unsloth’s 4-bit quantization (bnb-4bit) was applied to keep the model compact and efficient for low-spec laptop deployment.
Training took approximately 10 minutes, with additional fine-tuning recommended for improved performance, especially for handling varied text inputs and enhancing conversational depth.
Testing was conducted on a dataset of common cybersecurity questions to evaluate the model’s responsiveness and accuracy for general use cases.
The model was evaluated based on its ability to provide clear, direct answers to basic cybersecurity questions.
The main evaluation metric was response accuracy for typical cybersecurity queries.
The model performs adequately for its intended purpose, with room for improvement in response handling and input variability.
SARA functions well for basic cybersecurity guidance but requires additional fine-tuning to better handle diverse inputs and enhance conversational flow.
Carbon emissions for this project can be estimated using the Machine Learning Impact calculator.
The fine-tuning process was conducted on a high-spec machine, with final deployment optimized for low-spec hardware.
Intel i9 12900k CPU, NVIDIA GeForce RTX 4090 GPU, 32GB RAM
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
For questions or issues, please contact EryriLabs.