Chinese
File size: 1,638 Bytes
4044d2f
 
 
 
 
 
 
 
 
 
5dcc09f
bf6b5cf
5dcc09f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
license: mit
datasets:
- SetFit/amazon_massive_scenario_zh-CN
language:
- zh
metrics:
- accuracy
base_model:
- BAAI/bge-m3
---
# BBCIM: BGE-Embedding Based Chinese Intent Model

<!-- Provide a quick summary of what the model is/does. -->


## Model Details

### Model Description

A lightweight intent classification model for chinese. It is designed to be modular, easy to integrate, and optimized for both performance and inference speed.

You can easily influence the model on CPU.

- **Developed by:** [ken000666@outlook.com]

### Model Sources 

<!-- Provide the basic links for the model. -->

- **Repository:** [Gihub Repo](https://github.com/kitman0000/BBCIM)

## Uses
```python
from inference import EmbeddingBasedIntentModelWrapper

device = "cpu"
embedding_path = 'YOUR_PATH_TO_BGE_EMBEDDING'
model_checkpoint = "YOUR_PATH_TO_THE_MODEL"

model = EmbeddingBasedIntentModelWrapper(embedding_path, model_checkpoint, device)

while True:
    input_text = input("Enter input: ")
    result = model.classify(input_text)
    print(result)
```


## Results

| Intent         | Accuracy |
|----------------|-------|
| News           | 0.847 |
| Email          | 0.963 |
| IOT            | 0.968 |
| Play           | 0.946 |
| General        | 0.608 |
| Calendar       | 0.925 |
| Weather        | 0.936 |
| QA             | 0.878 |
| Takeway        | 0.895 |
| Lists          | 0.852 |
| Transports     | 0.919 |
| Social         | 0.877 |
| Datetime       | 0.951 |
| Music          | 0.840 |
| Cooking        | 0.847 |
| Alram          | 0.990 |
| Recommendation | 0.830 |
| Audio          | 0.935 |
| Average          | 0.889 |