CoolFace
Modelpublic

kevembuvak/llama32-1b-qlora-finetome-exam-gguf

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes17downloads
Model Card

ID2223 Exam Coach – QLoRA-Fine-Tuned Llama 3.2 1B (GGUF)

This repository contains a 1B parameter Llama 3.2 Instruct model fine-tuned using QLoRA in two stages:

  1. 1.Instruction tuning on the FineTome dataset
  2. 2.Exam-specialized fine-tuning on a custom ID2223 exam preparation dataset
  • —The final model is exported to GGUF format (Q4KM and Q8_0) for efficient CPU inference.
  • —It powers the Hugging Face Space "kevembuvak/iris", a self-study assistant for the KTH course “ID2223 – Scalable Machine Learning and Deep Learning”.

Model Summary

PropertyValue
Base Modelmeta-llama/Llama-3.2-1B-Instruct
Fine-tuning methodQLoRA (4-bit NF4 quantization)
Training Frameworkstransformers, trl, peft, bitsandbytes
GPU UsedNVIDIA RTX 4090 16 GB
LoRA Configr=16, alpha=32, dropout=0.05
Context length4096
Export FormatGGUF Q4KM and Q8_0
Intended UseID2223 exam preparation, ML/LLM explanations

Training Pipeline

This model was trained in two QLoRA stages.

Stage 1 - Instruction Tuning (FineTome)

Dataset: mlabonne/FineTome-100k (sampled 40k)

Preprocessing steps:
  • —Convert ShareGPT-style data to Llama-3 message format
  • —Apply chat template (tokenizer.apply_chat_template)
  • —Limit to 4 most recent dialogue turns
  • —Truncate to max length 512 tokens
  • —Create 99/1 train-validation split
Training configuration:
  • —2 epochs
  • —LR = 2e-4
  • —Batch size 4 × grad_accum 4
  • —BF16 compute
  • —Optimizer: pagedadamw8bit

This produced the adapter: llama32-1b-qlora-finetome.


Stage 2 - ID2223 Exam Specialization

Dataset: kevembuvak/id2223_exam_prep

Training configuration:
  • —Base model: Meta-Llama-3.2-1B-Instruct
  • —Load Stage 1 adapter as trainable
  • —LR = 1e-4
  • —2 epochs
  • —Batch size 4 × grad_accum 4
  • —BF16 compute
  • —Optimizer: pagedadamw8bit

Final training loss: approx. 0.079


Related Resources

Companion Hugging Face Space - Iris [https://huggingface.co/spaces/kevembuvak/iris]

Training Code (GitHub) [https://github.com/keremburakyilmaz/PEFT-of-LLM]


Intended Use & Limitations

Intended For:

  • —ID2223 exam preparation
  • —Generating study materials and quizzes
  • —Evaluating written answers

Not Suitable For:

  • —High-stakes or safety-critical tasks
  • —Factual-heavy real-world use outside ML context

Acknowledgements

  • —Meta AI for Llama 3.2
  • —FineTome dataset (mlabonne/FineTome-100k)
  • —Hugging Face (transformers, trl, peft)