BHARGAV REDDY commited on
Upload Base/Datasets/rag_mcp_sft/FINETUNE_COMMANDS.md with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354# LoRA Finetune Commands
These commands assume you are running from a PowerShell terminal on Windows.
## 1. Clone the workspace repo
```powershell
git clone <your-luna-repo-url>
cd LUNA
```
## 2. Create the environment and install dependencies
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
```
## 3. Build the RAG + MCP dataset locally
```powershell
python .\Base\Datasets\rag_mcp_sft\build_rag_mcp_sft_dataset.py --target-tokens 10000000
```
## 4. Push the dataset to Hugging Face
```powershell
$env:HF_TOKEN = "<your_hf_token>"
python .\Base\Datasets\rag_mcp_sft\push_to_hf.py --repo-id ASTERIZER/LUNA-RAG-MCP-SFT-10M
```
## 5. Train LoRA adapters on top of the current LUNA SFT checkpoint from Hugging Face
The config already points to the user-requested base checkpoint file:
- repo: `ASTERIZER/LUNA-100M`
- file: `sft_v1/final/model.pth`
Run:
```powershell
$env:HF_TOKEN = "<your_hf_token>"
python .\lora_sft_train.py --config .\rag_mcp_lora_config.yaml
```
## 6. Optional overrides
```powershell
python .\lora_sft_train.py --config .\rag_mcp_lora_config.yaml --epochs 3
python .\lora_sft_train.py --config .\rag_mcp_lora_config.yaml --out_dir .\Base\out\sft\rag_mcp_lora_exp2
python .\lora_sft_train.py --config .\rag_mcp_lora_config.yaml --pretrained_ckpt .\Base\out\input_models\luna_sft_v1\model.pth
```Base/Datasets/rag_mcp_sft/FINETUNE_COMMANDS.mdAdded+54