Instructions to use phgrouptechs/hotel-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use phgrouptechs/hotel-agent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="phgrouptechs/hotel-agent") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("phgrouptechs/hotel-agent", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use phgrouptechs/hotel-agent with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf phgrouptechs/hotel-agent:Q4_K_M # Run inference directly in the terminal: llama cli -hf phgrouptechs/hotel-agent:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf phgrouptechs/hotel-agent:Q4_K_M # Run inference directly in the terminal: llama cli -hf phgrouptechs/hotel-agent:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf phgrouptechs/hotel-agent:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf phgrouptechs/hotel-agent:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf phgrouptechs/hotel-agent:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf phgrouptechs/hotel-agent:Q4_K_M
Use Docker
docker model run hf.co/phgrouptechs/hotel-agent:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use phgrouptechs/hotel-agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "phgrouptechs/hotel-agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "phgrouptechs/hotel-agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/phgrouptechs/hotel-agent:Q4_K_M
- SGLang
How to use phgrouptechs/hotel-agent with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "phgrouptechs/hotel-agent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "phgrouptechs/hotel-agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "phgrouptechs/hotel-agent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "phgrouptechs/hotel-agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use phgrouptechs/hotel-agent with Ollama:
ollama run hf.co/phgrouptechs/hotel-agent:Q4_K_M
- Unsloth Studio
How to use phgrouptechs/hotel-agent with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phgrouptechs/hotel-agent to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for phgrouptechs/hotel-agent to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for phgrouptechs/hotel-agent to start chatting
- Docker Model Runner
How to use phgrouptechs/hotel-agent with Docker Model Runner:
docker model run hf.co/phgrouptechs/hotel-agent:Q4_K_M
- Lemonade
How to use phgrouptechs/hotel-agent with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull phgrouptechs/hotel-agent:Q4_K_M
Run and chat with the model
lemonade run user.hotel-agent-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Llama-3-8B-Hotel-Agent (Multi-Tenant & Zero-Hallucination)
Dự án AI Sale Agent chuyên biệt cho ngành khách sạn, được tinh chỉnh (Fine-tune) từ nền tảng Llama-3-8B-Instruct bằng công nghệ Unsloth.
Model được huấn luyện theo phương pháp Data-Agnostic (Không phụ thuộc dữ liệu cứng). AI không học vẹt thông tin của một khách sạn cụ thể, mà học kỹ năng giao tiếp, xử lý từ chối và chốt sale. Toàn bộ thông tin về phòng ốc, giá cả, dịch vụ sẽ được bơm động từ Backend vào System Prompt tại thời điểm chạy thực tế.
🎯 Các tính năng vượt trội đã được tối ưu
- Cá nhân hóa theo thời gian thực (Multi-Tenancy): Dùng duy nhất 1 model cho hàng trăm khách sạn khác nhau bằng cách thay đổi cấu hình đầu vào.
- Xử lý từ chối cực tốt (Objection Handling): Khi khách hàng chê giá đắt hoặc so sánh với các ứng dụng đặt phòng (Agoda, Booking...), AI biết tự động lôi các điểm mạnh (Bao gồm ăn sáng, không phí ẩn...) để bảo vệ giá.
- Bán chéo & Nâng hạng (Upsell/Cross-sell): Nhận diện ý định ẩn của khách để gợi ý các hạng phòng cao hơn hoặc dịch vụ đi kèm.
- Chống ảo giác thông tin (Zero-Hallucination): Tuyệt đối không tự bịa ra thông tin không có trong cấu hình. Tự động từ chối khéo léo hoặc bẻ lái khi khách hỏi lạc đề.
📑 Cấu trúc Prompt Chuẩn (Llama 3 Instruct Format)
Để AI hoạt động chính xác 100% như lúc huấn luyện, bạn bắt buộc phải truyền dữ liệu theo đúng định dạng cấu trúc dưới đây:
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
Bạn là Sale Agent chuyên nghiệp của khách sạn. Hãy dùng thông tin dưới đây để hỗ trợ khách hàng:
- Tên khách sạn: {hotel_name}
- Địa chỉ: {address}
- Hotline: {hotline}
- Thông tin phòng & Giá: {room_data}
- Tiện ích đi kèm: {amenities}
QUY TẮC: Trả lời ngắn gọn, lịch sự, xưng hô Dạ/Anh/Chị. Không tự bịa thông tin ngoài danh sách trên.<|eot_id|><|start_header_id|>user<|end_header_id|>
{câu_hỏi_của_khách_hàng}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
💻 Hướng dẫn chạy Model (Inference)
- Nếu chạy file GGUF trên CPU (Dùng llama-cpp-python) Phù hợp deploy lên các môi trường giá rẻ, cấu hình thấp như Railway hoặc Render:
from llama_cpp import Llama
llm = Llama(
model_path="hotel_agent_model.Q4_K_M.gguf",
n_ctx=2048,
n_threads=4
)
prompt = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nBạn là Sale Agent khách sạn...<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nPhòng Deluxe bên em có bồn tắm không?<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"""
output = llm(prompt, max_tokens=150, stop=["<|eot_id|>"])
print(output["choices"][0]["text"])
- Nếu chạy định dạng Safetensors trên GPU (Dùng transformers) Phù hợp chạy trên Featherless AI, RunPod Serverless hoặc Together AI:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ten-tai-khoan-cua-ban/hotel-agent-8b-safetensors"
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Sử dụng vLLM hoặc pipeline chuẩn để gọi mô hình chat
📊 Thông số huấn luyện (Training Hyperparameters)
Dưới đây là các thông số cốt lõi được ghi nhận từ quá trình huấn luyện thực tế trên GPU NVIDIA RTX 4090: Thông số | Giá trị Kích thước Dataset | 15,000 mẫu hội thoại thực tế Số lượng Epochs | 1 Epoch Số lượng Steps | 500 Steps Batch Size (Per Device) | 1 Gradient Accumulation | 8 Optimizer | adamw_torch Tỷ lệ tham số LoRA | 0.52% (41,943,040 parameters)
- Downloads last month
- 3
4-bit