boltuix commited on
Commit
7051496
Β·
verified Β·
1 Parent(s): 2aafe14

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +163 -3
README.md CHANGED
@@ -1,3 +1,163 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - wikimedia/wikipedia
5
+ - bookcorpus/bookcorpus
6
+ - SetFit/mnli
7
+ - sentence-transformers/all-nli
8
+ language:
9
+ - en
10
+ new_version: v1.1
11
+ base_model:
12
+ - google-bert/bert-base-uncased
13
+ pipeline_tag: text-classification
14
+ tags:
15
+ - BERT
16
+ - MNLI
17
+ - NLI
18
+ - transformer
19
+ - pre-training
20
+ - nlp
21
+ - tiny-bert
22
+ - edge-ai
23
+ - transformers
24
+ - low-resource
25
+ - micro-nlp
26
+ - quantized
27
+ - iot
28
+ - wearable-ai
29
+ - offline-assistant
30
+ - intent-detection
31
+ - real-time
32
+ - smart-home
33
+ - embedded-systems
34
+ - command-classification
35
+ - toy-robotics
36
+ - voice-ai
37
+ - eco-ai
38
+ - english
39
+ - lightweight
40
+ - mobile-nlp
41
+ metrics:
42
+ - accuracy
43
+ - f1
44
+ - inference
45
+ - recall
46
+ library_name: transformers
47
+ ---
48
+
49
+ ![bert-mini-banner](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWsG0Nmwt7QDnCpZuNrWGRaDGURIV9QWifhhaDbBDaCb0wPEeGQidUl-jgE-GC21QDa-3WXgpM6y9OTWjvhnpho9nDmDNf3MiHqhs-sfhwn-Rphj3FtASbbQMxyPx9agHSib-GPj18nAxkYonB6hOqCDAj0zGis2qICirmYI8waqxTo7xNtZ6Ju3yLQM8/s1920/bert-%20lite.png)
50
+
51
+ # 🧠 boltuix/bert-mini β€” Ultra Lightweight BERT for Real-Time NLP πŸš€
52
+
53
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
54
+ [![Model Size](https://img.shields.io/badge/Size-~44MB-blue)](#)
55
+ [![Tasks](https://img.shields.io/badge/Tasks-NLI%20%7C%20Intent--Detection%20%7C%20Sentiment%20Analysis-orange)](#)
56
+ [![Inference Speed](https://img.shields.io/badge/Optimized%20For-Edge%20Devices-green)](#)
57
+
58
+ `bert-mini` is a compact, real-time NLP model derived from BERT but streamlined for blazing-fast inference on constrained hardware β€” think IoT, wearables, and mobile apps. πŸ›°οΈ
59
+
60
+ ---
61
+
62
+ ## πŸš€ Key Features
63
+
64
+ | Feature | Description |
65
+ |------------------------|-------------------------------------------------------|
66
+ | πŸ” **Architecture** | Lightweight BERT (β‰ˆ4 layers, hidden size 256) |
67
+ | βš™οΈ **Parameters** | ~11M (vs. 110M in BERT-base) |
68
+ | πŸ’Ύ **Model Size** | ~44MB (quantized) |
69
+ | ⚑ **Speed** | Real-time inference on mobile and edge devices |
70
+ | 🌍 **Use Cases** | NLI, intent detection, voice assistants, offline chat |
71
+ | πŸ“š **Datasets** | Wikipedia, BookCorpus, MNLI, All-NLI |
72
+ | πŸ§ͺ **Training Tasks** | Masked LM, NLI classification |
73
+ | πŸ“œ **License** | MIT β€” free to use, modify, and distribute |
74
+
75
+ ---
76
+
77
+ ## πŸ“¦ Installation
78
+
79
+ Install dependencies:
80
+
81
+ ```bash
82
+ pip install transformers torch
83
+ ```
84
+
85
+ ---
86
+
87
+ ## πŸ”€ Quickstart: Masked Language Prediction
88
+
89
+ ```python
90
+ from transformers import pipeline
91
+
92
+ # Load the pipeline
93
+ mlm_pipeline = pipeline("fill-mask", model="boltuix/bert-mini")
94
+
95
+ # Try a sentence
96
+ result = mlm_pipeline("The robot can [MASK] the room in minutes.")
97
+ print(result[0]["sequence"])
98
+ ```
99
+
100
+ ---
101
+
102
+ ## πŸ’‘ Sample Outputs
103
+
104
+ ```python
105
+ Input: The device can [MASK] quickly.
106
+ ✨ β†’ the device can operate quickly.
107
+ ✨ β†’ the device can function quickly.
108
+
109
+ Input: Please [MASK] the door before leaving.
110
+ ✨ β†’ please open the door before leaving.
111
+ ✨ β†’ please shut the door before leaving.
112
+ ```
113
+
114
+ ---
115
+
116
+ ## πŸ”¬ Evaluation Metrics
117
+
118
+ | Metric | Value (Approx.) |
119
+ |------------|-----------------------|
120
+ | βœ… Accuracy | ~90–97% of BERT-base |
121
+ | 🎯 F1 Score | Balanced performance |
122
+ | ⚑ Latency | Fast on Raspberry Pi / Android |
123
+
124
+ ---
125
+
126
+ ## 🌐 Use Cases
127
+
128
+ - πŸ”Š **Voice Assistants**: Smart speaker command disambiguation
129
+ - 🏠 **Smart Homes**: On-device NLP for offline automation
130
+ - πŸ€– **Toy & Robotics**: Lightweight command understanding
131
+ - ⌚ **Wearables**: Real-time sentiment & intent detection
132
+ - πŸ§ͺ **AI on Budget**: NLP on minimal compute resources
133
+
134
+ ---
135
+
136
+ ## πŸ“š Trained On
137
+
138
+ - **Wikipedia**
139
+ - **BookCorpus**
140
+ - **MNLI** (MultiNLI)
141
+ - **All-NLI** from `sentence-transformers`
142
+
143
+ ---
144
+
145
+ ## 🏷️ Tags
146
+
147
+ `#tiny-bert` `#edge-ai` `#intent-detection` `#nlp` `#smart-home` `#wearable-ai` `#offline-assistant` `#transformers` `#real-time`
148
+
149
+ ---
150
+
151
+ ## πŸ“œ License
152
+
153
+ MIT License β€” free for commercial and personal use.
154
+
155
+ ---
156
+
157
+ ## πŸ™Œ Credits
158
+
159
+ Developed by [Hari Shankar S (boltuix)](https://huggingface.co/boltuix)
160
+ Base Model: [`google-bert/bert-base-uncased`](https://huggingface.co/google-bert/bert-base-uncased)
161
+ Optimized and Quantized for edge AI scenarios.
162
+
163
+ ---