Text Generation
Safetensors
Vietnamese
English
qwen2
qwen
qwen2.5
slm
RAG
travel
vietnamese
unsloth
anti-hallucination
conversational
Instructions to use thanhdo881/qwen2.5-3b-vivu-travel-vn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use thanhdo881/qwen2.5-3b-vivu-travel-vn 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 thanhdo881/qwen2.5-3b-vivu-travel-vn 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 thanhdo881/qwen2.5-3b-vivu-travel-vn to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thanhdo881/qwen2.5-3b-vivu-travel-vn to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="thanhdo881/qwen2.5-3b-vivu-travel-vn", max_seq_length=2048, )
How to use from
Unsloth StudioInstall 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 thanhdo881/qwen2.5-3b-vivu-travel-vn to start chattingUsing HuggingFace Spaces for Unsloth
# No setup required# Open https://huggingface.co/spaces/unsloth/studio in your browser
# Search for thanhdo881/qwen2.5-3b-vivu-travel-vn to start chattingLoad model with FastModel
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="thanhdo881/qwen2.5-3b-vivu-travel-vn",
max_seq_length=2048,
)Quick Links
qwen2.5-3b-vivu-travel-vn
Overview
qwen2.5-3b-vivu-travel-vn is a 3B-parameter Small Language Model (SLM) fine-tuned for the Vietnamese Tourism Domain. Built on Qwen2.5-3B-Instruct using Unsloth (PEFT/LoRA), it acts as ViVu, an intelligent travel assistant optimized for Advanced RAG pipelines.
Key Features
- Strict Anti-Hallucination: Zero-tolerance for fabrication; strictly grounds answers in the retrieved context and politely declines out-of-scope queries.
- RAG-Optimized: Perfectly synthesizes Vector DB chunks into clean, structured Vietnamese (Markdown supported).
- Resource Efficient: Deployable on consumer-grade GPUs (e.g., RTX 3060, T4) with low VRAM footprint.
Model Details
- Base Model: Qwen/Qwen2.5-3B-Instruct
- Architecture: Causal LM, 32k context length.
- Training Method: LoRA Instruction-tuning via Unsloth.
- Language: Vietnamese, English.
Quickstart
pip install transformers vllm accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "thanhdo881/qwen2.5-3b-vivu-travel-vn"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
# 1. Prepare RAG Context & Query
context = "Đà Lạt nằm trên cao nguyên Lâm Viên, nổi tiếng với khí hậu ôn đới và Hồ Xuân Hương."
question = "Đà Lạt có những đặc điểm gì nổi bật?"
prompt = f"Dựa vào thông tin sau:\n{context}\n\nHãy trả lời câu hỏi: {question}"
# 2. Build Messages
messages = [
{"role": "system", "content": "Bạn là ViVu, trợ lý du lịch Việt Nam. Chỉ trả lời dựa trên ngữ cảnh được cung cấp."},
{"role": "user", "content": prompt}
]
# 3. Generate
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3, repetition_penalty=1.1)
response = tokenizer.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0]
print(response)
- Downloads last month
- 10
Install Unsloth Studio (macOS, Linux, WSL)
# Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thanhdo881/qwen2.5-3b-vivu-travel-vn to start chatting