Text Classification
Transformers
Safetensors
English
bert
fill-mask
BERT
transformer
nlp
bert-lite
edge-ai
low-resource
micro-nlp
quantized
iot
wearable-ai
offline-assistant
intent-detection
real-time
smart-home
embedded-systems
command-classification
toy-robotics
voice-ai
eco-ai
english
lightweight
mobile-nlp
ner
on-device-nlp
privacy-first
cpu-inference
speech-intent
offline-nlp
tiny-bert
bert-variant
efficient-nlp
edge-ml
tiny-ml
aiot
embedded-nlp
low-latency
smart-devices
edge-inference
ml-on-microcontrollers
android-nlp
offline-chatbot
esp32-nlp
tflite-compatible
Update README.md
Browse files
README.md
CHANGED
|
@@ -78,6 +78,10 @@ Meet **bert-lite**βa streamlined marvel of NLP! π Designed with efficiency
|
|
| 78 |
|
| 79 |
---
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
## π€ Usage Example β Masked Language Modeling (MLM)
|
| 82 |
|
| 83 |
```python
|
|
@@ -104,4 +108,38 @@ for sentence in masked_sentences:
|
|
| 104 |
print(f"\nInput: {sentence}")
|
| 105 |
predictions = mlm_pipeline(sentence)
|
| 106 |
for pred in predictions[:3]:
|
| 107 |
-
print(f"β¨ β {pred['sequence']} (score: {pred['score']:.4f})")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
---
|
| 80 |
|
| 81 |
+
## π License
|
| 82 |
+
MIT License β free to use, modify, and share.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
## π€ Usage Example β Masked Language Modeling (MLM)
|
| 86 |
|
| 87 |
```python
|
|
|
|
| 108 |
print(f"\nInput: {sentence}")
|
| 109 |
predictions = mlm_pipeline(sentence)
|
| 110 |
for pred in predictions[:3]:
|
| 111 |
+
print(f"β¨ β {pred['sequence']} (score: {pred['score']:.4f})")
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
π€ Masked Language Model (MLM) Demo
|
| 117 |
+
Input: The robot can [MASK] the room in minutes.
|
| 118 |
+
β¨ β The robot can clean the room in minutes. (score: 0.3124)
|
| 119 |
+
β¨ β The robot can scan the room in minutes. (score: 0.1547)
|
| 120 |
+
β¨ β The robot can paint the room in minutes. (score: 0.0983)
|
| 121 |
+
|
| 122 |
+
Input: He decided to [MASK] the project early.
|
| 123 |
+
β¨ β He decided to finish the project early. (score: 0.3876)
|
| 124 |
+
β¨ β He decided to start the project early. (score: 0.2109)
|
| 125 |
+
β¨ β He decided to abandon the project early. (score: 0.0765)
|
| 126 |
+
|
| 127 |
+
Input: This device is [MASK] for small tasks.
|
| 128 |
+
β¨ β This device is perfect for small tasks. (score: 0.2458)
|
| 129 |
+
β¨ β This device is great for small tasks. (score: 0.1894)
|
| 130 |
+
β¨ β This device is useful for small tasks. (score: 0.1321)
|
| 131 |
+
|
| 132 |
+
Input: The weather will [MASK] by tomorrow.
|
| 133 |
+
β¨ β The weather will improve by tomorrow. (score: 0.2987)
|
| 134 |
+
β¨ β The weather will change by tomorrow. (score: 0.1765)
|
| 135 |
+
β¨ β The weather will clear by tomorrow. (score: 0.1034)
|
| 136 |
+
|
| 137 |
+
Input: She loves to [MASK] in the garden.
|
| 138 |
+
β¨ β She loves to work in the garden. (score: 0.3542)
|
| 139 |
+
β¨ β She loves to play in the garden. (score: 0.1986)
|
| 140 |
+
β¨ β She loves to relax in the garden. (score: 0.0879)
|
| 141 |
+
|
| 142 |
+
Input: Please [MASK] the door before leaving.
|
| 143 |
+
β¨ β Please close the door before leaving. (score: 0.4673)
|
| 144 |
+
β¨ β Please lock the door before leaving. (score: 0.3215)
|
| 145 |
+
β¨ β Please open the door before leaving. (score: 0.0652)
|