CoolFace
Modelpublic

D1zzYzz/GRIT-BOOLQ-QLORA-llama-3.2-3B-Energy-0.99

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes10downloads
Model Card

meta-llama/Llama-3.2-3B Fine-tuned with GRIT and Lora

This model is a fine-tuned version of meta-llama/Llama-3.2-3B using the GRIT (Geometric Reprojection Instruction Tuning) algorithm and LoRA on the google/boolq 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 10 steps (adaptive) for second-order preconditioning.
  • โ€”Neural Reprojection: Every 20 steps (adaptive) for rank optimization.
  • โ€”Rank Adaptation: Enabled (Threshold: 0.99, Min Rank: 4).
  • โ€”Optimized LoRA Modules: ['qproj', 'kproj', 'vproj', 'oproj', 'gateproj', 'upproj', 'down_proj']

Fine-tuning Configuration

  • โ€”Base Model: meta-llama/Llama-3.2-3B
  • โ€”Quantization: 4-bit (NF4) with bf16 compute.
  • โ€”LoRA Rank: 16
  • โ€”LoRA Alpha: 32
  • โ€”Batch Size: 8 (per device)
  • โ€”Gradient Accumulation: 4 (Effective batch = 32)
  • โ€”Learning Rate: 2.0e-05
  • โ€”Precision: bf16 mixed precision
  • โ€”Sequence Length: 1024 tokens
  • โ€”Gradient Checkpointing: Enabled

Performance Improvements

  • โ€”โœ… Faster Convergence: K-FAC preconditioning aligns updates with curvature.
  • โ€”โœ… Adaptive Rank: Dynamically prunes LoRA rank to improve parameter efficiency.

๐Ÿ“Š Training Metrics

  • โ€”Total Steps: 295
  • โ€”Final Loss: 0.318148963734255
  • โ€”Trainable Params: 24,313,856

๐Ÿ“ 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:

bibtex
@misc{grit-lora-Llama-3.2-3B-boolq},
  title={ meta-llama/Llama-3.2-3B Fine-tuned with GRIT on google/boolq },
  author={D1zzYzz},
  year={2025},
  publisher={Hugging Face},
  url={https://huggingface.co/D1zzYzz/GRIT-BOOLQ-QLORA-llama-3.2-3B-Energy-0.99}
}

โš–๏ธ License

This model inherits the Apache 2.0 license.