Dataset
Teach a stable response contract.
Each row pairs raw logs and an instruction with a structured output containing issue, root_cause, severity, fix, and confidence.
Presentation companion · real project artifacts
LogSage is a QLoRA adapter built on Qwen2.5-7B-Instruct. It turns raw application logs into a structured first-pass diagnosis with an issue, likely root cause, severity, fix, and confidence.
This page follows the same sequence used in the video. Every number and link comes from the repository, training report, or published Hugging Face adapter.
Dataset
Each row pairs raw logs and an instruction with a structured output containing issue, root_cause, severity, fix, and confidence.
Formatting
The project uses ChatML-style system, user, and assistant turns. Training and inference use the same conversation structure.
QLoRA
The 7B base model is loaded in 4-bit form. LoRA rank 16 adapters capture task-specific updates while the original model remains separate.
AWS training
The run used an AWS EC2 g5.2xlarge, three epochs, 378 steps, checkpointing, TensorBoard, JSONL metrics, and evaluation outputs.
Publishing
The published repository stores the task-specific adapter and metadata. Inference still needs the compatible Qwen base model.
Inference
Install dependencies, load the tokenizer and 4-bit base, attach the adapter, apply the chat template, generate, decode only new tokens, then extract and validate JSON.
The actual training run
Training loss alone is not proof of usefulness. The best evaluation loss was 0.789 at step 250; the final evaluation loss was 0.811.
The only live build in the video
LogSage_Inference_Colab.ipynb# 1. Load tokenizer + 4-bit Qwen base
base = AutoModelForCausalLM.from_pretrained(...)
# 2. Attach published LogSage adapter
model = PeftModel.from_pretrained(base, adapter_id)
# 3. Reuse the training chat structure
prompt = tokenizer.apply_chat_template(messages, ...)
# 4. Generate only the diagnosis
outputs = model.generate(...)
answer = outputs[0][input_length:]
# 5. Decode and validate structured JSON
result = extract_json(tokenizer.decode(answer))The tokenizer applies the conversation format. The base model supplies general language capability. The PEFT adapter supplies LogSage's learned task behavior.
Video sequence
The honest boundary
LogSage may hallucinate root causes, miss cross-service context, mishandle unseen formats, or sound more certain than the evidence supports.
Stronger evaluation still needs held-out cases, JSON-validity rate, base-model comparison, latency measurement, hallucination analysis, and confidence calibration.
For the peeps building for real
LogSage demonstrates the path from a structured dataset to QLoRA training on AWS, observable metrics, a published PEFT adapter, and reproducible inference in Colab.