| --- |
| 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 | |
|
|
|
|