Amey9766 commited on
Commit
846c90c
·
verified ·
1 Parent(s): 5a24a4b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +166 -326
README.md CHANGED
@@ -1,56 +1,80 @@
1
- 🏨 LLaMA-3.2 Hotel Review Triage Model
2
- 🔹 Model Overview
3
-
4
- Model Name: llama32-hotel-review-triage
5
-
6
- Base Model: meta-llama/Llama-3.2-1B-Instruct
7
-
8
- Domain: Hospitality / Hotel Operations
9
-
10
- Task: Hotel review triage → structured JSON output
11
-
12
- Fine-tuning Method: Supervised Fine-Tuning (SFT) with LoRA, merged into base
13
-
14
- Language: English
15
-
16
- This model converts unstructured hotel guest reviews into structured, machine-readable JSON, enabling automated complaint routing, severity detection, and service analytics.
17
-
18
- 🎯 Intended Use
19
- Primary Use Cases
20
-
21
- Hotel guest review analysis
22
-
23
- Complaint triage and categorization
24
-
25
- Department routing (housekeeping, engineering, front desk)
26
-
27
- Severity and priority detection
28
-
29
- Input preprocessing for dashboards and ticketing systems
30
-
31
- 🧠 Typical Applications
32
-
33
- Review ingestion pipelines (Google Reviews, TripAdvisor, surveys)
34
-
35
- Hospitality analytics platforms
36
-
37
- AI-powered hotel service agents
38
-
39
- Internal customer experience tools
40
-
41
- 🧾 Input & Output Format
42
- Input
43
-
44
- Plain-text hotel guest review
45
-
46
- Output
47
-
48
- Strict JSON only
49
-
50
- No explanations, no natural language
51
-
52
- Example Output
53
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  {
55
  "issues": [
56
  {
@@ -69,238 +93,96 @@ Example Output
69
  "overall_sentiment": "negative",
70
  "priority": "high"
71
  }
 
72
 
73
- 🏗 Model Architecture
74
-
75
- Architecture: Decoder-only causal language model
76
-
77
- Parameters: ~1B
78
-
79
- Backbone: LLaMA 3.2
80
-
81
- Tokenizer: LLaMA 3.2 tokenizer with preserved chat template
82
-
83
- Precision: BF16 / FP16
84
-
85
- Fine-Tuning Details
86
-
87
- LoRA adapters applied to:
88
-
89
- Attention projections
90
-
91
- MLP layers
92
-
93
- Adapters merged post-training for standalone deployment
94
-
95
- 📊 Training Details
96
- Dataset
97
-
98
- Source: Public hotel review dataset
99
-
100
- Domain: Real-world hotel guest feedback
101
-
102
- Language: English
103
-
104
- Total Training Examples: 120,000
105
-
106
- Validation Set: Held-out split used during training
107
-
108
- Preprocessing
109
-
110
- Removed hotel names and dates to reduce memorization
111
-
112
- Converted reviews into instruction-style chat format
113
-
114
- Supervised training toward structured JSON outputs
115
-
116
- ⚙️ Training Configuration
117
-
118
- Epochs: 3
119
-
120
- Max Sequence Length: 512
121
-
122
- Optimizer: AdamW
123
-
124
- Hardware: NVIDIA A100 GPU
125
-
126
- Training Time: ~10 hours
127
-
128
- Fine-Tuning Strategy: QLoRA-style training, merged after completion
129
-
130
- 📈 Evaluation
131
- Quantitative Metrics
132
-
133
- Validation Perplexity: 3.02
134
-
135
- A perplexity of 3.02 indicates strong domain adaptation and fluent generation within hospitality review data.
136
-
137
- Qualitative Evaluation
138
-
139
- The model was evaluated on:
140
-
141
- Multi-issue complaints
142
-
143
- Mixed positive and negative reviews
144
-
145
- Policy-related feedback
146
-
147
- Hygiene and safety-critical cases
148
-
149
- Observed Strengths
150
-
151
- Consistent JSON formatting
152
-
153
- Accurate department routing
154
-
155
- Appropriate severity assignment
156
-
157
- Robust handling of noisy real-world text
158
-
159
- ⚠️ Limitations
160
-
161
- Trained only on English hotel reviews
162
-
163
- Not suitable for legal, medical, or safety-critical decisions
164
-
165
- JSON schema is not formally enforced (prompt-dependent)
166
-
167
- May struggle with:
168
-
169
- Very short or sarcastic reviews
170
-
171
- Highly ambiguous feedback
172
-
173
- Non-hotel hospitality domains (e.g., airlines, cruises)
174
-
175
- This model should be used as a decision-support system, not as a final authority.
176
-
177
- ���️ Ethical Considerations
178
-
179
- May reflect biases present in user-generated reviews
180
-
181
- Should not be used for profiling individuals
182
-
183
- No personal or sensitive data should be passed into the model
184
-
185
- 🚀 How to Use
186
- from transformers import AutoTokenizer, AutoModelForCausalLM
187
-
188
- model_id = "Amey9766/llama32-hotel-review-triage"
189
-
190
- tokenizer = AutoTokenizer.from_pretrained(model_id)
191
- model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
192
-
193
- prompt = tokenizer.apply_chat_template(
194
- [
195
- {"role": "system", "content": "You are a hospitality review triage assistant. Output ONLY valid JSON."},
196
- {"role": "user", "content": "The room was dirty and the AC didn’t work."}
197
- ],
198
- tokenize=False
199
- )
200
-
201
- inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
202
- output = model.generate(**inputs, max_new_tokens=256)
203
-
204
- print(tokenizer.decode(output[0], skip_special_tokens=True))
205
-
206
- 📚 Citation
207
-
208
- If you use this model in research or applied systems, please cite:
209
-
210
- @misc{tillu2026llama32hoteltriage,
211
- title = {LLaMA-3.2 Hotel Review Triage Model},
212
- author = {Amey Tillu},
213
- year = {2026},
214
- howpublished = {\url{https://huggingface.co/Amey9766/llama32-hotel-review-triage}},
215
- note = {Fine-tuned on hospitality reviews for structured JSON triage}
216
- }
217
-
218
- 📜 License
219
-
220
- This model inherits the license of its base model:
221
-
222
- LLaMA 3.2 License (Meta)
223
-
224
- Please ensure compliance with the base model’s license when using this model.
225
-
226
- 🙏 Acknowledgements
227
-
228
- Meta AI for the LLaMA 3.2 base model
229
-
230
- Hugging Face ecosystem (Transformers, PEFT, TRL)
231
 
232
- Public hotel review datasets used for training
233
 
234
- If you want next-level polish, I can:
 
 
 
 
235
 
236
- optimize tags + metadata for Hugging Face search
 
 
 
237
 
238
- add visual badges (perplexity, domain, task)
239
 
240
- write a short launch post for LinkedIn / X
241
 
242
- Just tell me 👍
243
 
244
- it is still looking weird
 
 
 
 
 
245
 
246
- You’re right — what you have works, but Hugging Face renders Markdown very literally.
247
- Right now your card looks like a wall of text because it’s missing clear hierarchy, spacing, bullets, and visual anchors.
 
 
248
 
249
- Below is a clean, well-structured, Hugging Face–optimized model card that you can copy-paste directly into README.md.
250
- It will render nicely with bold headings, bullets, code blocks, and emojis (used sparingly).
 
 
 
 
 
251
 
252
- 🚀 LLaMA-3.2 Hotel Review Triage Model
253
 
254
- Model ID: Amey9766/llama32-hotel-review-triage
255
- Base Model: meta-llama/Llama-3.2-1B-Instruct
256
- Author: Amey Tillu
257
- Task: Hospitality Review Triage → Structured JSON Output
258
- Perplexity (validation): 3.02
259
 
260
- 🧠 What This Model Does
 
261
 
262
- This model is fine-tuned to analyze hotel guest reviews and convert unstructured feedback into clean, machine-readable JSON suitable for:
 
 
 
 
 
263
 
264
- Complaint routing
 
 
 
 
265
 
266
- Guest experience analytics
267
 
268
- Operational alerting
269
 
270
- AI hotel agents
 
 
 
 
 
 
271
 
272
- It is designed to behave as a deterministic triage system, not a conversational chatbot.
273
 
274
- 📌 Core Capabilities
275
 
276
- Identifies complaint category (e.g. cleanliness, staff, facilities)
277
 
278
- Estimates severity level (low / medium / high)
 
 
279
 
280
- Infers department ownership (housekeeping, front desk, maintenance)
281
 
282
- Produces strict, valid JSON output
283
 
284
- Handles both negative complaints and positive feedback
285
-
286
- 🏨 Example Use Case
287
-
288
- Input
289
-
290
- The room was dirty and the AC didn’t work.
291
-
292
-
293
- Output
294
-
295
- {
296
- "category": "room_maintenance",
297
- "severity": "high",
298
- "department": "engineering",
299
- "sentiment": "negative",
300
- "summary": "Guest reports cleanliness issues and malfunctioning air conditioning."
301
- }
302
-
303
- 🧪 How to Use
304
  from transformers import AutoTokenizer, AutoModelForCausalLM
305
 
306
  model_id = "Amey9766/llama32-hotel-review-triage"
@@ -313,14 +195,8 @@ model = AutoModelForCausalLM.from_pretrained(
313
 
314
  prompt = tokenizer.apply_chat_template(
315
  [
316
- {
317
- "role": "system",
318
- "content": "You are a hospitality review triage assistant. Output ONLY valid JSON."
319
- },
320
- {
321
- "role": "user",
322
- "content": "The room was dirty and the AC didn’t work."
323
- }
324
  ],
325
  tokenize=False
326
  )
@@ -329,57 +205,13 @@ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
329
  output = model.generate(**inputs, max_new_tokens=256)
330
 
331
  print(tokenizer.decode(output[0], skip_special_tokens=True))
 
332
 
333
- 📊 Training Details
334
-
335
- Dataset: Public hotel review datasets (Hugging Face)
336
-
337
- Total examples used: ~120,000
338
-
339
- Train / Validation split: 90% / 10%
340
-
341
- Sequence length: 512 tokens
342
-
343
- Fine-tuning method: LoRA (PEFT)
344
-
345
- Training hardware: NVIDIA A100
346
-
347
- Training time: ~10 hours
348
-
349
- Epochs: 3
350
 
351
- 📈 Evaluation
352
-
353
- Validation Perplexity: 3.02
354
-
355
- Stable loss convergence
356
-
357
- No observed mode collapse
358
-
359
- Minor variance expected due to diverse review lengths and tone
360
-
361
- ⚠️ Limitations
362
-
363
- Not trained on live hotel policies or property-specific rules
364
-
365
- Does not replace human judgment for legal or compensation decisions
366
-
367
- Assumes English-language reviews
368
-
369
- Output schema is opinionated and may require adaptation
370
-
371
- 🔐 License
372
-
373
- This model inherits the license of its base model:
374
-
375
- LLaMA 3.2 License (Meta)
376
-
377
- Please ensure compliance with the base model’s license when using or redistributing this model.
378
-
379
- 📚 Citation
380
-
381
- If you use this model in research or production systems, please cite:
382
 
 
383
  @misc{tillu2026llama32hoteltriage,
384
  title = {LLaMA-3.2 Hotel Review Triage Model},
385
  author = {Amey Tillu},
@@ -387,23 +219,31 @@ If you use this model in research or production systems, please cite:
387
  howpublished = {\url{https://huggingface.co/Amey9766/llama32-hotel-review-triage}},
388
  note = {Fine-tuned on hospitality reviews for structured JSON triage}
389
  }
 
390
 
391
- 🙏 Acknowledgements
392
 
393
- Meta AI for the LLaMA-3.2 base model
394
 
395
- Hugging Face ecosystem (Transformers, PEFT, TRL)
396
 
397
- Public hospitality review datasets used for training
 
398
 
399
- ⭐ When to Use This Model
400
 
401
- Use this model when you need:
402
 
403
- Reliable structured outputs
 
 
404
 
405
- Fast review triage
406
 
407
- Integration into hotel operations pipelines
408
 
409
- A foundation for AI hospitality agents
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - meta-llama/Llama-3.2-3B-Instruct
7
+ ---
8
+ ---
9
+ license: llama3
10
+ tags:
11
+ - hotel-review-triage
12
+ - hospitality
13
+ - structured-output
14
+ - json-generation
15
+ - complaint-routing
16
+ - llama
17
+ - sft
18
+ - lora
19
+ - transformers
20
+ - bitsandbytes
21
+ model_name: llama32-hotel-review-triage
22
+ base_model: meta-llama/Llama-3.2-1B-Instruct
23
+ datasets:
24
+ - public-hotel-reviews
25
+ language: en
26
+ pipeline_tag: text-generation
27
+ inference: true
28
+ ---
29
+
30
+ # 🏨 LLaMA‑3.2 Hotel Review Triage Model
31
+ ### **Structured JSON Extraction for Hospitality Operations**
32
+
33
+ ---
34
+
35
+ ## 🔹 Model Overview
36
+
37
+ **Model Name:** `llama32-hotel-review-triage`
38
+ **Base Model:** `meta-llama/Llama-3.2-1B-Instruct`
39
+ **Domain:** Hospitality / Hotel Operations
40
+ **Task:** Hotel review triage → structured JSON output
41
+ **Fine‑tuning Method:** SFT + LoRA (merged)
42
+ **Language:** English
43
+ **Validation Perplexity:** **3.02**
44
+
45
+ This model converts unstructured hotel guest reviews into **clean, machine‑readable JSON**, enabling automated complaint routing, severity detection, and service analytics.
46
+
47
+ ---
48
+
49
+ ## 🎯 Intended Use
50
+
51
+ ### **Primary Use Cases**
52
+ - Hotel guest review analysis
53
+ - Complaint triage & categorization
54
+ - Department routing (housekeeping, engineering, front desk)
55
+ - Severity & priority detection
56
+ - Input preprocessing for dashboards & ticketing systems
57
+
58
+ ### **Typical Applications**
59
+ - Review ingestion pipelines (Google Reviews, TripAdvisor, surveys)
60
+ - Hospitality analytics platforms
61
+ - AI‑powered hotel service agents
62
+ - Internal customer experience tools
63
+
64
+ ---
65
+
66
+ ## 🧾 Input & Output Format
67
+
68
+ ### **Input**
69
+ Plain‑text hotel guest review.
70
+
71
+ ### **Output**
72
+ - Strict JSON
73
+ - No explanations
74
+ - No natural language outside JSON
75
+
76
+ ### **Example Output**
77
+ ```json
78
  {
79
  "issues": [
80
  {
 
93
  "overall_sentiment": "negative",
94
  "priority": "high"
95
  }
96
+ ```
97
 
98
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
+ ## 🏗 Model Architecture
101
 
102
+ - **Architecture:** Decoder‑only causal language model
103
+ - **Parameters:** ~1B
104
+ - **Backbone:** LLaMA 3.2
105
+ - **Tokenizer:** LLaMA 3.2 tokenizer (chat template preserved)
106
+ - **Precision:** BF16 / FP16
107
 
108
+ ### **LoRA Fine‑Tuning Details**
109
+ Adapters applied to:
110
+ - Attention projections
111
+ - MLP layers
112
 
113
+ Adapters merged post‑training for standalone deployment.
114
 
115
+ ---
116
 
117
+ ## 📊 Training Details
118
 
119
+ ### **Dataset**
120
+ - Source: Public hotel review datasets
121
+ - Domain: Real‑world guest feedback
122
+ - Language: English
123
+ - Training Examples: **120,000**
124
+ - Validation: Held‑out split
125
 
126
+ ### **Preprocessing**
127
+ - Removed hotel names & dates
128
+ - Converted reviews into instruction‑style chat format
129
+ - Supervised training toward structured JSON outputs
130
 
131
+ ### **Training Configuration**
132
+ - Epochs: **3**
133
+ - Max Sequence Length: **512**
134
+ - Optimizer: **AdamW**
135
+ - Hardware: **NVIDIA A100 GPU**
136
+ - Training Time: ~10 hours
137
+ - Strategy: QLoRA‑style training, merged after completion
138
 
139
+ ---
140
 
141
+ ## 📈 Evaluation
 
 
 
 
142
 
143
+ ### **Quantitative**
144
+ - **Validation Perplexity:** 3.02
145
 
146
+ ### **Qualitative**
147
+ Evaluated on:
148
+ - Multi‑issue complaints
149
+ - Mixed sentiment reviews
150
+ - Policy‑related feedback
151
+ - Hygiene & safety‑critical cases
152
 
153
+ **Observed Strengths**
154
+ - Consistent JSON formatting
155
+ - Accurate department routing
156
+ - Appropriate severity assignment
157
+ - Robust handling of noisy real‑world text
158
 
159
+ ---
160
 
161
+ ## ⚠️ Limitations
162
 
163
+ - Trained only on English hotel reviews
164
+ - Not suitable for legal, medical, or safety‑critical decisions
165
+ - JSON schema is prompt‑dependent
166
+ - May struggle with:
167
+ - Very short or sarcastic reviews
168
+ - Highly ambiguous feedback
169
+ - Non‑hotel domains (airlines, cruises, etc.)
170
 
171
+ Use as a **decision‑support tool**, not a final authority.
172
 
173
+ ---
174
 
175
+ ## ⚖️ Ethical Considerations
176
 
177
+ - May reflect biases present in user‑generated reviews
178
+ - Should not be used for profiling individuals
179
+ - Avoid passing personal or sensitive data into the model
180
 
181
+ ---
182
 
183
+ ## 🚀 How to Use
184
 
185
+ ```python
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  from transformers import AutoTokenizer, AutoModelForCausalLM
187
 
188
  model_id = "Amey9766/llama32-hotel-review-triage"
 
195
 
196
  prompt = tokenizer.apply_chat_template(
197
  [
198
+ {"role": "system", "content": "You are a hospitality review triage assistant. Output ONLY valid JSON."},
199
+ {"role": "user", "content": "The room was dirty and the AC didn’t work."}
 
 
 
 
 
 
200
  ],
201
  tokenize=False
202
  )
 
205
  output = model.generate(**inputs, max_new_tokens=256)
206
 
207
  print(tokenizer.decode(output[0], skip_special_tokens=True))
208
+ ```
209
 
210
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
+ ## 📚 Citation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
+ ```
215
  @misc{tillu2026llama32hoteltriage,
216
  title = {LLaMA-3.2 Hotel Review Triage Model},
217
  author = {Amey Tillu},
 
219
  howpublished = {\url{https://huggingface.co/Amey9766/llama32-hotel-review-triage}},
220
  note = {Fine-tuned on hospitality reviews for structured JSON triage}
221
  }
222
+ ```
223
 
224
+ ---
225
 
226
+ ## 📜 License
227
 
228
+ This model inherits the license of its base model:
229
 
230
+ **LLaMA 3.2 License (Meta)**
231
+ Please ensure compliance when using or redistributing this model.
232
 
233
+ ---
234
 
235
+ ## 🙏 Acknowledgements
236
 
237
+ - Meta AI for the LLaMA‑3.2 base model
238
+ - Hugging Face ecosystem (Transformers, PEFT, TRL)
239
+ - Public hospitality review datasets used for training
240
 
241
+ ---
242
 
243
+ ## When to Use This Model
244
 
245
+ Use this model when you need:
246
+ - Reliable structured outputs
247
+ - Fast review triage
248
+ - Integration into hotel operations pipelines
249
+ - A foundation for AI hospitality agents