Update README.md
Browse files
README.md
CHANGED
|
@@ -8,4 +8,66 @@ metrics:
|
|
| 8 |
- accuracy
|
| 9 |
base_model:
|
| 10 |
- BAAI/bge-m3
|
| 11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- accuracy
|
| 9 |
base_model:
|
| 10 |
- BAAI/bge-m3
|
| 11 |
+
---
|
| 12 |
+
# Model Card for Model ID
|
| 13 |
+
|
| 14 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
## Model Details
|
| 18 |
+
|
| 19 |
+
### Model Description
|
| 20 |
+
|
| 21 |
+
A lightweight intent classification model for chinese. It is designed to be modular, easy to integrate, and optimized for both performance and inference speed.
|
| 22 |
+
|
| 23 |
+
You can easily influence the model on CPU.
|
| 24 |
+
|
| 25 |
+
- **Developed by:** [ken000666@outlook.com]
|
| 26 |
+
|
| 27 |
+
### Model Sources
|
| 28 |
+
|
| 29 |
+
<!-- Provide the basic links for the model. -->
|
| 30 |
+
|
| 31 |
+
- **Repository:** [Gihub Repo](https://github.com/kitman0000/BBCIM)
|
| 32 |
+
|
| 33 |
+
## Uses
|
| 34 |
+
```python
|
| 35 |
+
from inference import EmbeddingBasedIntentModelWrapper
|
| 36 |
+
|
| 37 |
+
device = "cpu"
|
| 38 |
+
embedding_path = 'YOUR_PATH_TO_BGE_EMBEDDING'
|
| 39 |
+
model_checkpoint = "YOUR_PATH_TO_THE_MODEL"
|
| 40 |
+
|
| 41 |
+
model = EmbeddingBasedIntentModelWrapper(embedding_path, model_checkpoint, device)
|
| 42 |
+
|
| 43 |
+
while True:
|
| 44 |
+
input_text = input("Enter input: ")
|
| 45 |
+
result = model.classify(input_text)
|
| 46 |
+
print(result)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
## Results
|
| 51 |
+
|
| 52 |
+
| Intent | Accuracy |
|
| 53 |
+
|----------------|-------|
|
| 54 |
+
| News | 0.847 |
|
| 55 |
+
| Email | 0.963 |
|
| 56 |
+
| IOT | 0.968 |
|
| 57 |
+
| Play | 0.946 |
|
| 58 |
+
| General | 0.608 |
|
| 59 |
+
| Calendar | 0.925 |
|
| 60 |
+
| Weather | 0.936 |
|
| 61 |
+
| QA | 0.878 |
|
| 62 |
+
| Takeway | 0.895 |
|
| 63 |
+
| Lists | 0.852 |
|
| 64 |
+
| Transports | 0.919 |
|
| 65 |
+
| Social | 0.877 |
|
| 66 |
+
| Datetime | 0.951 |
|
| 67 |
+
| Music | 0.840 |
|
| 68 |
+
| Cooking | 0.847 |
|
| 69 |
+
| Alram | 0.990 |
|
| 70 |
+
| Recommendation | 0.830 |
|
| 71 |
+
| Audio | 0.935 |
|
| 72 |
+
| Average | 0.889 |
|
| 73 |
+
|