
When the AI APIs go down, the bot keeps answering.
A self-hosted, retrieval-grounded chat model built as the fallback brain for Hader: Qwen2.5 fine-tuned with QLoRA on real conversations, served by vLLM on a GPU box behind an OpenAI-compatible endpoint.
- 14BBase model, AWQ quantised
- 24 GBGPU for the 14B fine-tune
- 1URL to swap to switch over
- ≤ 2%Hallucination gate
Model, data, serving and evals
The live bot runs on Groq Llama 70B, GPT-4o and Claude Sonnet. This model is built to behave like them, in isolation from the live bot, so it can take over when external APIs are unavailable.
- Model choice: Qwen2.5 for Arabic, French, English and Arabizi
- Behavioural QLoRA fine-tune with axolotl
- Serving with vLLM, base model and LoRA adapter
- An eval harness with ship gates graded against real reference replies
From corpus to endpoint
Data runs anywhere. Training and serving run on the GPU box.
- 1Export and scrub the corpus
- 2Build the fine-tune set
- 3QLoRA on the GPU box
- 4LoRA adapter
- 5vLLM, OpenAI-compatible
- 6Eval gates
- 7Swap the base URL
What it does
- 01
Grounded, not memorised
Retrieval feeds the same prompt, markers and catalogue the live bot uses, so the model learns behaviour, not facts.
- 02
Fits one card
The 14B QLoRA fits a 24 GB GPU at a sequence length of 8,192. A 32B run wants 40 to 48 GB.
- 03
Drop-in endpoint
vLLM serves an OpenAI-compatible API, so the live bot switches over with a base URL change and nothing else.
- 04
Base or fine-tuned
The same server exposes the base model as a baseline and the adapter by name, so every comparison is like for like.
- 05
Ship gates
Format, grounding with at most 2% invented prices, language match including French and Arabizi, scope lock and first-token latency on the box.
Stack
- Model
- Qwen2.5-14B-Instruct, AWQ quantisation, LoRA adapter.
- Training
- axolotl with flash-attention on a CUDA GPU.
- Serving
- vLLM, OpenAI-compatible, Docker Compose.
- Evals
- Python harness, baseline scorecards, test suite.