SetFit/amazon_massive_scenario_zh-CN
Viewer • Updated • 16.5k • 34
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.
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)
| Intent | Accuracy |
|---|---|
| News | 0.847 |
| 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 |
Base model
BAAI/bge-m3