Pannuru commited on
Commit
38b2d8a
·
verified ·
1 Parent(s): 6b2f7f0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +48 -40
README.md CHANGED
@@ -1,47 +1,55 @@
 
 
 
1
 
2
- # Spam Detection Small Language Model (SLM)
3
-
4
- A lightweight, custom Qwen-inspired Transformer for classifying
5
- text messages as Spam or Ham.
6
-
7
- ## Architecture
8
- - Custom Transformer architecture
9
- - RMSNorm
10
- - Rotary Positional Embeddings (RoPE)
11
- - Grouped Query Attention (GQA)
12
- - SwiGLU FeedForward
13
- - Classification head with 2 output classes
14
-
15
- ## Model Configuration
16
- | Parameter | Value |
17
- |---|---:|
18
- | Vocabulary size | 151,669 |
19
- | Embedding dimension | 128 |
20
- | Attention heads | 4 |
21
- | KV groups | 2 |
22
- | Transformer layers | 2 |
23
- | Feed-forward dimension | 256 |
24
- | Output classes | 2 |
25
 
26
  ## Labels
27
- - 0: Ham
28
- - 1: Spam
29
 
30
- ## Tokenizer
31
- Qwen3 tokenizer: `Qwen/Qwen3-0.6B`
 
 
 
32
 
33
- The tokenizer files are included in this repository.
34
 
35
  ## Files
36
- - `spam_slm_model.pth` - PyTorch model weights
37
- - `config.json` - Model configuration
38
- - `tokenizer/` - Tokenizer files
39
-
40
- ## Important
41
- This is a custom text-classification model, not a generative
42
- chat model. To run predictions, the matching model architecture
43
- implementation and preprocessing code are also required.
44
-
45
- ## License
46
- Check the licenses of the base tokenizer and dataset before
47
- redistributing or using this project.
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
 
5
+ # Spam Detection SLM
6
+
7
+ A custom Small Language Model project for detecting spam and ham messages.
8
+
9
+ ## Project Overview
10
+ This project uses a custom Transformer-based classifier to classify text messages as Spam or Ham.
11
+
12
+ ## Model Architecture
13
+ - Custom Qwen-inspired Transformer
14
+ - Vocabulary size: 151669
15
+ - Embedding dimension: 128
16
+ - Attention heads: 4
17
+ - KV groups: 2
18
+ - Transformer layers: 2
19
+ - Feed-forward dimension: 256
20
+ - Output classes: 2
 
 
 
 
 
 
 
21
 
22
  ## Labels
23
+ - 0 = Ham
24
+ - 1 = Spam
25
 
26
+ ## Dataset
27
+ Training dataset contains 28,544 records.
28
+ - Ham: 13,998
29
+ - Spam: 14,546
30
+ - Columns: text, label
31
 
32
+ Dataset: https://huggingface.co/datasets/Pannuru/Spam-Detection-Dataset
33
 
34
  ## Files
35
+ - spam_slm_model.pth
36
+ - config.json
37
+ - dataset_info.json
38
+ - tokenizer/
39
+ - requirements.txt
40
+
41
+ ## Usage
42
+ Load the matching tokenizer and custom model architecture,
43
+ then load spam_slm_model.pth using PyTorch.
44
+
45
+ ## Ollama Demo
46
+ Ollama Qwen2.5 0.5B is used as an explanation assistant
47
+ alongside the custom PyTorch spam classifier.
48
+ The classifier performs the Spam/Ham prediction.
49
+
50
+ ## GitHub
51
+ Add your GitHub repository URL here.
52
+
53
+ ## Note
54
+ This checkpoint is a binary text classifier, not a standalone
55
+ generative language model.