Instructions to use Jesus2498/travel-intent-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jesus2498/travel-intent-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Jesus2498/travel-intent-classifier")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Jesus2498/travel-intent-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Travel Intent Classifier
Multilingual Multi-Task Intent Classifier for travel and local place recommendations.
The model is designed to classify natural language queries into travel-related intents and provide additional semantic information through multiple prediction heads.
Features
- π Multilingual (DistilBERT Multilingual)
- β‘ Optimized for Android
- π± Offline inference with ONNX Runtime
- π§ Multi-Task architecture
- π Quantized ONNX model available
Predictions
The model performs three independent predictions from a single input.
1. Intent
Examples:
- RESTAURANT
- CAFE
- FAST_FOOD
- BAR
- PUB
- SUPERMARKET
- PHARMACY
- HOSPITAL
- FUEL
- MUSEUM
- GALLERY
- PARK
- GARDEN
- VIEWPOINT
- CINEMA
- THEATRE
- MALL
- ATTRACTION
- NONE
2. Subcategory
Predicts a more specific semantic category.
Examples:
- ITALIAN
- JAPANESE
- BURGER
- SEAFOOD
- VEGAN
...
3. Restaurant Type
Additional prediction used only for restaurant-related queries.
Architecture
User text
β
βΌ
DistilBERT Multilingual
β
ββββββββββΊ Intent
β
ββββββββββΊ Subcategory
β
ββββββββββΊ Restaurant Type
Model Outputs
The exported ONNX model exposes three outputs:
label_logits
subcategory_logits
restaurant_type_logits
Each output should be converted into probabilities using Softmax.
Confidence Gate
The application using this model should apply a post-processing stage before returning the prediction.
Recommended validations include:
- Minimum confidence threshold
- Dynamic Top-1 / Top-2 gap validation
- Semantic consistency validation between the three prediction heads
If the prediction does not satisfy these conditions, the recommended output is:
NONE
ONNX
The repository also provides an ONNX version optimized for mobile inference.
Recommended files for Android:
model_quantized.onnx
tokenizer.onnx
metadata.json
Intended Use
This model is intended for:
- Travel assistants
- Tourism applications
- Offline recommendation systems
- Android applications
- Kotlin Multiplatform projects
Training
The model was trained using a custom multilingual dataset containing travel-related natural language requests.
The training pipeline automatically generates:
- PyTorch model
- ONNX model
- Quantized ONNX model
- ONNX tokenizer
- Metadata mappings
License
Apache 2.0