| --- |
| license: mit |
| language: |
| - en |
| base_model: |
| - meta-llama/Llama-3.2-3B-Instruct |
| --- |
| --- |
| license: llama3 |
| tags: |
| - hotel-review-triage |
| - hospitality |
| - structured-output |
| - json-generation |
| - complaint-routing |
| - llama |
| - sft |
| - lora |
| - transformers |
| - bitsandbytes |
| model_name: llama32-hotel-review-triage |
| base_model: meta-llama/Llama-3.2-1B-Instruct |
| datasets: |
| - public-hotel-reviews |
| language: en |
| pipeline_tag: text-generation |
| inference: true |
| --- |
| |
| # 🏨 LLaMA‑3.2 Hotel Review Triage Model |
| ### **Structured JSON Extraction for Hospitality Operations** |
| |
| --- |
| |
| ## 🔹 Model Overview |
| |
| **Model Name:** `llama32-hotel-review-triage` |
| **Base Model:** `meta-llama/Llama-3.2-1B-Instruct` |
| **Domain:** Hospitality / Hotel Operations |
| **Task:** Hotel review triage → structured JSON output |
| **Fine‑tuning Method:** SFT + LoRA (merged) |
| **Language:** English |
| **Validation Perplexity:** **3.02** |
| |
| This model converts unstructured hotel guest reviews into **clean, machine‑readable JSON**, enabling automated complaint routing, severity detection, and service analytics. |
| |
| This model is designed to bridge the gap between unstructured guest feedback and actionable hotel operations by converting free-text reviews into structured JSON. While raw sentiment alone offers limited operational value, structured outputs enable hotels to systematically understand what went wrong, how severe the issue is, and which department is responsible. By transforming subjective guest language into consistent machine-readable signals, the model allows reviews to be automatically routed, aggregated, and analyzed at scale. This structure makes it possible to power downstream systems such as issue-tracking workflows, operational dashboards, AI hotel agents, and real-time escalation logic. In practice, the model enables hotels to move from passive review monitoring to proactive service recovery, where guest feedback directly informs decisions, prioritization, and automated responses across housekeeping, engineering, and front-office teams. |
| --- |
| |
| ## 🎯 Intended Use |
| |
| ### **Primary Use Cases** |
| - Hotel guest review analysis |
| - Complaint triage & categorization |
| - Department routing (housekeeping, engineering, front desk) |
| - Severity & priority detection |
| - Input preprocessing for dashboards & ticketing systems |
| |
| ### **Typical Applications** |
| - Review ingestion pipelines (Google Reviews, TripAdvisor, surveys) |
| - Hospitality analytics platforms |
| - AI‑powered hotel service agents |
| - Internal customer experience tools |
| |
| --- |
| |
| ## 🧾 Input & Output Format |
| |
| ### **Input** |
| Plain‑text hotel guest review. |
| |
| ### **Output** |
| - Strict JSON |
| - No explanations |
| - No natural language outside JSON |
| |
| ### **Example Output** |
| ```json |
| { |
| "issues": [ |
| { |
| "category": "maintenance", |
| "description": "Air conditioning stopped working during the night", |
| "severity": "high", |
| "department": "engineering" |
| }, |
| { |
| "category": "service", |
| "description": "Front desk response was delayed", |
| "severity": "medium", |
| "department": "front_desk" |
| } |
| ], |
| "overall_sentiment": "negative", |
| "priority": "high" |
| } |
| ``` |
| |
| --- |
|
|
| ## 🏗 Model Architecture |
|
|
| - **Architecture:** Decoder‑only causal language model |
| - **Parameters:** ~1B |
| - **Backbone:** LLaMA 3.2 |
| - **Tokenizer:** LLaMA 3.2 tokenizer (chat template preserved) |
| - **Precision:** BF16 / FP16 |
|
|
| ### **LoRA Fine‑Tuning Details** |
| Adapters applied to: |
| - Attention projections |
| - MLP layers |
|
|
| Adapters merged post‑training for standalone deployment. |
|
|
| --- |
|
|
| ## 📊 Training Details |
|
|
| ### **Dataset** |
| - Source: Public hotel review datasets |
| - Domain: Real‑world guest feedback |
| - Language: English |
| - Training Examples: **120,000** |
| - Validation: Held‑out split |
|
|
| ### **Preprocessing** |
| - Removed hotel names & dates |
| - Converted reviews into instruction‑style chat format |
| - Supervised training toward structured JSON outputs |
|
|
| ### **Training Configuration** |
| - Epochs: **3** |
| - Max Sequence Length: **512** |
| - Optimizer: **AdamW** |
| - Hardware: **NVIDIA A100 GPU** |
| - Training Time: ~10 hours |
| - Strategy: QLoRA‑style training, merged after completion |
|
|
| --- |
|
|
| ## 📈 Evaluation |
|
|
| ### **Quantitative** |
| - **Validation Perplexity:** 3.02 |
|
|
| ### **Qualitative** |
| Evaluated on: |
| - Multi‑issue complaints |
| - Mixed sentiment reviews |
| - Policy‑related feedback |
| - Hygiene & safety‑critical cases |
|
|
| **Observed Strengths** |
| - Consistent JSON formatting |
| - Accurate department routing |
| - Appropriate severity assignment |
| - Robust handling of noisy real‑world text |
|
|
| --- |
|
|
| ## ⚠️ Limitations |
|
|
| - Trained only on English hotel reviews |
| - Not suitable for legal, medical, or safety‑critical decisions |
| - JSON schema is prompt‑dependent |
| - May struggle with: |
| - Very short or sarcastic reviews |
| - Highly ambiguous feedback |
| - Non‑hotel domains (airlines, cruises, etc.) |
|
|
| Use as a **decision‑support tool**, not a final authority. |
|
|
| --- |
|
|
| ## ⚖️ Ethical Considerations |
|
|
| - May reflect biases present in user‑generated reviews |
| - Should not be used for profiling individuals |
| - Avoid passing personal or sensitive data into the model |
|
|
| --- |
|
|
| ## 🚀 How to Use |
|
|
| ```python |
| from transformers import AutoTokenizer, AutoModelForCausalLM |
| |
| model_id = "Amey9766/llama32-hotel-review-triage" |
| |
| tokenizer = AutoTokenizer.from_pretrained(model_id) |
| model = AutoModelForCausalLM.from_pretrained( |
| model_id, |
| device_map="auto" |
| ) |
| |
| prompt = tokenizer.apply_chat_template( |
| [ |
| {"role": "system", "content": "You are a hospitality review triage assistant. Output ONLY valid JSON."}, |
| {"role": "user", "content": "The room was dirty and the AC didn’t work."} |
| ], |
| tokenize=False |
| ) |
| |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) |
| output = model.generate(**inputs, max_new_tokens=256) |
| |
| print(tokenizer.decode(output[0], skip_special_tokens=True)) |
| ``` |
|
|
| --- |
|
|
| ## 📚 Citation |
|
|
| ``` |
| @misc{tillu2026llama32hoteltriage, |
| title = {LLaMA-3.2 Hotel Review Triage Model}, |
| author = {Amey Tillu}, |
| year = {2026}, |
| howpublished = {\url{https://huggingface.co/Amey9766/llama32-hotel-review-triage}}, |
| note = {Fine-tuned on hospitality reviews for structured JSON triage} |
| } |
| ``` |
|
|
| --- |
|
|
| ## 📜 License |
|
|
| This model inherits the license of its base model: |
|
|
| **LLaMA 3.2 License (Meta)** |
| Please ensure compliance when using or redistributing this model. |
|
|
| --- |
|
|
| ## 🙏 Acknowledgements |
|
|
| - Meta AI for the LLaMA‑3.2 base model |
| - Hugging Face ecosystem (Transformers, PEFT, TRL) |
| - Public hospitality review datasets used for training |
|
|
| --- |
|
|
| ## ⭐ When to Use This Model |
|
|
| Use this model when you need: |
| - Reliable structured outputs |
| - Fast review triage |
| - Integration into hotel operations pipelines |
| - A foundation for AI hospitality agents |