Skip to content

Commit 05c97bc

Browse files
authored
Merge pull request #133 from modelscope/Artiprocher-doc
add general options to lora readme
2 parents 40c6da8 + db88d60 commit 05c97bc

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

examples/train/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,47 @@ file_name,text
5252

5353
## Train a LoRA model
5454

55+
General options:
56+
57+
```
58+
--lora_target_modules LORA_TARGET_MODULES
59+
Layers with LoRA modules.
60+
--dataset_path DATASET_PATH
61+
The path of the Dataset.
62+
--output_path OUTPUT_PATH
63+
Path to save the model.
64+
--steps_per_epoch STEPS_PER_EPOCH
65+
Number of steps per epoch.
66+
--height HEIGHT Image height.
67+
--width WIDTH Image width.
68+
--center_crop Whether to center crop the input images to the resolution. If not set, the images will be randomly cropped. The images will be resized to the resolution first before cropping.
69+
--random_flip Whether to randomly flip images horizontally
70+
--batch_size BATCH_SIZE
71+
Batch size (per device) for the training dataloader.
72+
--dataloader_num_workers DATALOADER_NUM_WORKERS
73+
Number of subprocesses to use for data loading. 0 means that the data will be loaded in the main process.
74+
--precision {32,16,16-mixed}
75+
Training precision
76+
--learning_rate LEARNING_RATE
77+
Learning rate.
78+
--lora_rank LORA_RANK
79+
The dimension of the LoRA update matrices.
80+
--lora_alpha LORA_ALPHA
81+
The weight of the LoRA update matrices.
82+
--use_gradient_checkpointing
83+
Whether to use gradient checkpointing.
84+
--accumulate_grad_batches ACCUMULATE_GRAD_BATCHES
85+
The number of batches in gradient accumulation.
86+
--training_strategy {auto,deepspeed_stage_1,deepspeed_stage_2,deepspeed_stage_3}
87+
Training strategy
88+
--max_epochs MAX_EPOCHS
89+
Number of epochs.
90+
--modelscope_model_id MODELSCOPE_MODEL_ID
91+
Model ID on ModelScope (https://www.modelscope.cn/). The model will be uploaded to ModelScope automatically if you provide a Model ID.
92+
--modelscope_access_token MODELSCOPE_ACCESS_TOKEN
93+
Access key on ModelScope (https://www.modelscope.cn/). Required if you want to upload the model to ModelScope.
94+
```
95+
5596
### Kolors
5697

5798
The following files will be used for constructing Kolors. You can download Kolors from [huggingface](https://huggingface.co/Kwai-Kolors/Kolors) or [modelscope](https://modelscope.cn/models/Kwai-Kolors/Kolors). Due to precision overflow issues, we need to download an additional VAE model (from [huggingface](https://huggingface.co/madebyollin/sdxl-vae-fp16-fix) or [modelscope](https://modelscope.cn/models/AI-ModelScope/sdxl-vae-fp16-fix)). You can use the following code to download these files:

0 commit comments

Comments
 (0)