--- title: Nemotron LoRA Fine-tuning emoji: 🚀 colorFrom: blue colorTo: green sdk: gradio sdk_version: 4.0.0 app_file: app.py pinned: false license: apache-2.0 --- # 🚀 LoRA Fine-tuning for Nemotron-3-8B Train Nvidia's Nemotron-3-8B model with LoRA on your custom datasets. ## Features - ✅ 4-bit Quantization with QLoRA - ✅ PEFT Integration - ✅ Gradio UI - ✅ Auto Push to Hub - ✅ Progress Tracking ## Quick Start 1. Upgrade to GPU (Settings → Hardware) 2. Configure training parameters 3. Add HF token if needed 4. Click "Start Training" ## Configuration Default settings are optimized for A10G (24GB VRAM). Adjust for your GPU: - **T4 (16GB)**: batch_size=2, gradient_accumulation=8 - **A10G (24GB)**: batch_size=4, gradient_accumulation=4 - **A100 (40GB)**: batch_size=8, gradient_accumulation=2 ## Dataset Format Supports multiple formats (auto-detected): - Q&A: `{"question": "...", "answer": "..."}` - Instruction: `{"instruction": "...", "response": "..."}` - Text: `{"text": "..."}` ## Using the Model ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base_model = AutoModelForCausalLM.from_pretrained("nvidia/nemotron-3-8b-base-4k") model = PeftModel.from_pretrained(base_model, "YOUR_USERNAME/nemotron-lora") tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/nemotron-lora") ``` ## Support For issues: [GitHub](https://github.com/YOUR_REPO)