Prompt
<|system|>
You are a cybersecurity expert.
<|user|>
Explain the difference between symmetric and asymmetric encryption.
<|assistant|>
Output
Symmetric encryption uses a single shared key for both encryption and decryption, making it computationally efficient and suitable for encrypting large amounts of data. Asymmetric encryption uses a public/private key pair, enabling secure key exchange and digital signatures but at a higher computational cost.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "Aravindan/smol-lm2-360-instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
prompt = """
<|system|>
You are a cybersecurity assistant.
<|user|>
Explain SQL Injection.
<|assistant|>
"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Limitations
This model:
- is intended for educational and research purposes
- may generate incorrect or outdated cybersecurity advice
- has not undergone safety alignment comparable to production LLMs
- should not be used as the sole source for security decisions
Always verify security recommendations with authoritative sources.
Future Improvements
- Larger instruction datasets
- Multi-turn conversation training
- Preference Optimization (DPO/ORPO)
- Retrieval-Augmented Generation (RAG)
- LoRA and QLoRA fine-tuning
- Evaluation on cybersecurity benchmarks
Acknowledgements
- Hugging Face
- SmolLM2 Team
- Transformers
- Datasets
- PyTorch
Citation
If you use this model in your work, please cite this repository.