boltuix commited on
Commit
b685ddb
Β·
verified Β·
1 Parent(s): 5fe98b9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -1
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)