File size: 1,621 Bytes
320c5b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Extra Packages Required

This document lists additional packages needed for new features compared to the base v2 model that is already running.

## For LoRA Support (legrconv4x_llava_lora.py)
**Required Package:**
```bash
pip install peft>=0.5.0
```

**Purpose:** 
- PEFT (Parameter-Efficient Fine-Tuning) library from HuggingFace
- Provides LoRA implementation for efficient model adaptation
- Used in `model/legrconv4x_llava_lora.py`

**Features Enabled:**
- Low-rank adaptation of LLaVA language model
- Efficient fine-tuning with minimal trainable parameters
- Save/load LoRA weights separately
- Proper integration with LLaVA's causal LM architecture

**Fixes Applied:**
- Changed TaskType to CAUSAL_LM (matches LLaVA's base class)
- Removed redundant requires_grad loop (PEFT handles this)
- Removed eval() call to allow proper LoRA dropout during training
- Fixed load_adapter to use proper PEFT loading method

---

## For Warmup Scheduler (already implemented)
**No additional packages required**
- Uses only PyTorch's built-in `_LRScheduler` class
- Implemented in `utils/warmup_scheduler.py`

---

## For AdamW Optimizer (already implemented)
**No additional packages required**
- AdamW is included in PyTorch (torch.optim.AdamW)
- Available in PyTorch >= 1.2.0

---

## For WandB Logging (already implemented)
**Already installed in v2**
- wandb package is already in the environment
- No additional installation needed

---

## Installation Command for All Extra Packages:
```bash
# Activate your conda environment first
conda activate llmf2

# Install only the new requirements
pip install peft>=0.5.0
```