File size: 5,741 Bytes
5156927 d599947 5156927 d599947 66ed2eb d599947 66ed2eb d599947 66ed2eb d599947 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
---
base_model: unsloth/deepseek-r1-distill-qwen-14b-unsloth-bnb-4bit
tags:
- text-generation-inference
- transformers
- unsloth
- qwen2
- trl
- ai
- finetune
license: apache-2.0
language:
- en
---
# CyberBrain_Model
<p align="center">
<img src="https://capsule-render.vercel.app/api?type=waving&height=120&color=244b6c&text=Cyper%20Brain§ion=header&textBg=false&animation=twinkling&fontColor=a5241b&strokeWidth=0&rotate=0&reversal=false" style="width:100%;">
</p>
**[GitHub_Project_link](https://github.com/YourUsername/CyberBrain_Model.git)**
CyberBrain_Model is an advanced AI project designed for fine-tuning the model `unsloth/DeepSeek-R1-Distill-Qwen-14B` specifically for cyber security tasks. This repository provides tools and scripts for training and fine-tuning large language models efficiently using minimal hardware resources. The goal is to adapt the model for ethical cyber security applications, making it efficient even on devices with limited computational power, whether you have a low-end CPU or a GPU with limited VRAM.
In this project, we use technical content extracted from various cyber security sources as our primary training data. The raw text is processed into instruction-response pairs tailored for fine-tuning the model on cyber security scenarios. You can access the training data [here](./DataSet).

## 📦 Project Structure
```
assest/ # Assets, images, and other media files
Configure_Training_Arguments.py # Script for configuring training arguments
DataSet/ # Directory containing dataset files
Load_DataSet.py # Script to load the dataset
LoRA_Configuration.py # Script for LoRA configuration
map.md # Documentation about mapping
Model_Loading_with_Unsloth.py # Script to load the model using Unsloth
README.md # This file
requirements.txt # Required dependencies for the project
Table-Ways.md # Documentation about table ways
Train_Start.py # Script to start training the model
```
## 🚀 Installation
### 1. Clone the Repository
```bash
git clone https://github.com/YourUsername/CyberBrain_Model.git
cd CyberBrain_Model
```
### 2. Set Up the Environment
Create a new virtual environment (Python 3.11 is recommended):
```bash
python -m venv .env
# Activate the environment:
# On Linux/Mac:
source .env/bin/activate
# On Windows:
.env\Scripts\activate
```
### 3. Install Required Dependencies
```bash
pip install --upgrade pip
pip install -r requirements.txt
pip install torch==2.5.1+cu118 --index-url https://download.pytorch.org/whl/cu118
pip install torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```
## 🤖 Running the Project
- **Model Loading:** Run `Model_Loading_with_Unsloth.py` to load the model.
- **Training:** Run `Train_Start.py` to start the fine-tuning process.
- **Configurations:** Review `LoRA_Configuration.py` and `Configure_Training_Arguments.py` for training settings.
## 📄 Additional Documentation
Refer to the following files for more details:
- `map.md`
- `Table-Ways.md`
---
## 🚀 Quick Start on Google Colab
To quickly run CyberBrain_Model on Google Colab, follow these steps:
1. **Open a New Colab Notebook**
Click [here](https://colab.new/) to open a new Colab notebook in your browser.
2. **Clone the Repository**
In your Colab notebook, run:
```bash
!git clone https://github.com/YourUsername/CyberBrain_Model.git
%cd CyberBrain_Model
```
3. **Install Dependencies**
Install the required packages by running:
```bash
!pip install --upgrade pip
!pip install -r requirements.txt
!pip install torch==2.5.1+cu118 --index-url https://download.pytorch.org/whl/cu118
!pip install torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```
4. **Open and Run `main.ipynb`**
Open the `main.ipynb` notebook in Colab. This notebook provides a step-by-step guide to:
- Load the dataset from the `DataSet` directory.
- Load the model using `Model_Loading_with_Unsloth.py`.
- Configure training arguments via `Configure_Training_Arguments.py`.
- Start training using `Train_Start.py`.
- Evaluate the model and monitor training progress.
---
## License
This project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.
## Contact
For questions or contributions, feel free to open an issue or contact us directly through GitHub.
- Portfolio: [peteradel.netlify.app](https://peteradel.netlify.app)
- LinkedIn: [linkedin.com/in/1peteradel](https://linkedin.com/in/1peteradel)
## ⭐ Give a Star
If you find this project useful or interesting, please give it a star! Your support helps improve the project and motivates further development.

---
🤍 Thank you for checking out **CyberBrain_Model**! Happy training!
<p align="center">
<img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=65§ion=footer"/>
</p>
---
# Uploaded model
- **Developed by:** PeterAdel
- **License:** apache-2.0
- **Finetuned from model :** unsloth/deepseek-r1-distill-qwen-14b-unsloth-bnb-4bit
This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth) |