meta-llama/Llama-3.1-8B Fine-tuned with GRIT and QLoRA
This model is a fine-tuned version of meta-llama/Llama-3.1-8B using the GRIT (Geometric Reprojection Instruction Tuning) algorithm and QLoRA on the openai/gsm8k dataset.
The base model is quantized to 4-bit (NF4) and optimized with Unsloth to enable efficient fine-tuning.
π Training Details
GRIT Algorithm
- K-FAC Updates: Every 20 steps (adaptive) for second-order preconditioning.
- Neural Reprojection: Every 20 steps (adaptive) for rank optimization.
- Rank Adaptation: Enabled (Threshold: 0.9, Min Rank: 4).
- Optimized LoRA Modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj', 'up_proj', 'down_proj', 'gate_proj']
Fine-tuning Configuration
- Base Model: meta-llama/Llama-3.1-8B
- Quantization: 4-bit (NF4) with bf16 compute.
- LoRA Rank: 32
- LoRA Alpha: 64
- Batch Size: 8 (per device)
- Gradient Accumulation: 2 (Effective batch = 16)
- Learning Rate: 1.0e-04
- Precision: bf16 mixed precision
- Sequence Length: 1024 tokens
- Gradient Checkpointing: Enabled
Performance Improvements
- β Faster Convergence: K-FAC preconditioning aligns updates with curvature.
- β Memory-Efficient: 4-bit quantization (QLoRA) and gradient checkpointing used.
- β Adaptive Rank: Dynamically prunes LoRA rank to improve parameter efficiency.
π Training Metrics
- Total Steps: 936
- Final Loss: 0.8789392291990101
- Trainable Params: 83,886,080
π Algorithm Details
- K-FAC Preconditioning (Natural Gradient) and Neural Reprojection as per GRIT method.
- Memory Efficient: Covariance matrices on CPU to reduce GPU load.
π Results
In benchmark comparisons, GRIT has shown faster convergence and better stability than standard LoRA or fine-tuning, making it well-suited for efficient single-epoch training. The use of Unsloth further accelerates this process.
π Citation
If you use this model, please cite the original GRIT paper and:
@misc{grit-lora-Llama-3.1-8B-gsm8k},
title={ meta-llama/Llama-3.1-8B Fine-tuned with GRIT on openai/gsm8k },
author={D1zzYzz},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/D1zzYzz/GRIT-GSM8K-QLORA-llama-3.1-8B-Energy-0.9}
}
βοΈ License
This model inherits the Apache 2.0 license.
- Downloads last month
- 2
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for D1zzYzz/GRIT-GSM8K-QLORA-llama-3.1-8B-Energy-0.9
Base model
meta-llama/Llama-3.1-8B