license: apache-2.0 base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 library_name: peft pipeline_tag: text-classification language:
This model is a seven-category text classifier developed for our INFO 642 Modular AI Travel Planner project.
The model identifies the user's travel request and helps the n8n workflow select the appropriate module.
It predicts one of seven labels:
In our workflow, this model is intended to replace the original Groq-based placeholder classifier. The other modules handle itinerary generation, data lookup, budget calculations, and itinerary modifications.
The classifier does not make reservations or payments.
We followed the Lesson 16 TinyLlama training approach and added a new seven-class classification head.
LoRA allows us to train a small number of parameters instead of updating the entire base model.
Training configuration:
| Parameter | Value |
|---|---|
| LoRA rank | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Epochs | 3 |
| Batch size | 8 |
| Learning rate | 0.0002 |
| Trainable parameters | 2,267,136 |
Only approximately 0.22% of the model's parameters were trainable.
We created a synthetic English dataset of 280 travel-related user requests for this course project.
The dataset includes seven balanced categories, with 40 examples per category.
Data split:
| Dataset | Samples |
|---|---|
| Training set | 224 |
| Held-out test set | 56 |
| Total | 280 |
Each category contains 32 training examples and 8 held-out test examples.
The training data covers requests such as creating trips, changing flights, finding cheaper hotels, replacing attractions, modifying restaurants, and changing multiple itinerary components.
Some examples also include unclear requests and unsupported booking or payment requests.
The test data was not used for model training.
All examples are synthetic and do not represent real customer conversations.
We evaluated the fine-tuned model using 56 held-out test requests.
Held-out test accuracy: 98.2% (55/56 correct)
Additional model comparisons:
| Model | Accuracy |
|---|---|
| BART Zero-shot | 46.4% |
| TinyLlama with untrained classification head | 14.3% |
| TinyLlama + LoRA | 98.2% |
The fine-tuned model performed substantially better on our synthetic test set.
| Epoch | Loss |
|---|---|
| 1 | 1.944 |
| 2 | 0.461 |
| 3 | 0.091 |
The training loss decreased across all three epochs.
The fine-tuned model correctly classified 55 out of 56 test examples.
Six categories achieved perfect recall.
The only classification error occurred when a MULTI_CHANGE request was predicted as CHANGE_ATTRACTION.
The relevant category metrics were:
| Category | Precision | Recall | F1-score |
|---|---|---|---|
| CHANGE_ATTRACTION | 0.89 | 1.00 | 0.94 |
| MULTI_CHANGE | 1.00 | 0.88 | 0.93 |
The macro-average F1-score was 0.98.
This indicates that requests involving multiple changes may sometimes be confused with requests involving only one attraction change.
The complete confusion matrix and classification report are included in the training notebook.
Although the model achieved high accuracy on the held-out dataset, several limitations remain.
Synthetic training data: The dataset contains only 280 synthetic examples. Real user requests may be more complex or expressed differently.
Multi-change confusion: Requests involving multiple itinerary components may sometimes be classified as a single-category change.
Ambiguous language: Short or unclear requests may not provide enough information for reliable classification.
Limited task coverage: The model only supports the seven predefined categories. It cannot independently create itineraries, verify live availability, make reservations, or process payments.
Generalization: The 98.2% accuracy was measured on a small synthetic held-out dataset. Performance on real travel conversations has not been established.
The model is intended for educational workflow routing and should not be used as an independent booking or payment system.
After training, we uploaded the LoRA adapter, classification head, tokenizer, and label configuration to this public Hugging Face repository.
We then opened a fresh Google Colab notebook and loaded the model directly from Hugging Face.
Test input:
Please update the afternoon sightseeing activity to the science center.
Expected prediction from the original training notebook:
CHANGE_ATTRACTION
Prediction after loading from Hugging Face:
CHANGE_ATTRACTION
Result: PASS - The fresh-session prediction matched the original notebook.
This verifies that the uploaded model can be loaded in a separate session and reproduce the prediction for this test example.
Course: INFO 642
Project: Modular AI Travel Planner
Model repository: Shell2334/info642-travel-classifier-lora
Purpose: Educational research and demonstration.
TinyLlama/TinyLlama-1.1B-Chat-v1.0