Add wandb_entity to wandb options, update example configs, update README (#361)
Browse files* Update wandb_entity and add wandb descriptions
* add wandb to config section
* remove trailing whitespace for pre-commit hook
* remove trailing whitespace for pre-commit hook
---------
Co-authored-by: Morgan McGuire <[email protected]>
Co-authored-by: Wing Lian <[email protected]>
- README.md +17 -4
- examples/cerebras/qlora.yml +1 -0
- examples/falcon/config-7b-lora.yml +1 -0
- examples/falcon/config-7b-qlora.yml +1 -0
- examples/falcon/config-7b.yml +1 -0
- examples/gptj/qlora.yml +1 -0
- examples/gptq-lora-7b/config.yml +1 -0
- examples/jeopardy-bot/config.yml +1 -0
- examples/llama-2/lora.yml +1 -0
- examples/llama-2/qlora.yml +1 -0
- examples/mpt-7b/config.yml +1 -0
- examples/openllama-3b/config.yml +1 -0
- examples/openllama-3b/lora.yml +1 -0
- examples/openllama-3b/qlora.yml +1 -0
- examples/pythia-12b/config.yml +1 -0
- examples/pythia/lora.yml +1 -0
- examples/redpajama/config-3b.yml +1 -0
- examples/replit-3b/config-lora.yml +1 -0
- examples/xgen-7b/xgen-7b-8k-qlora.yml +1 -0
- src/axolotl/utils/wandb.py +2 -0
README.md
CHANGED
|
@@ -401,11 +401,12 @@ lora_out_dir:
|
|
| 401 |
lora_fan_in_fan_out: false
|
| 402 |
|
| 403 |
# wandb configuration if you're using it
|
| 404 |
-
wandb_mode:
|
| 405 |
-
wandb_project:
|
|
|
|
| 406 |
wandb_watch:
|
| 407 |
-
wandb_run_id:
|
| 408 |
-
wandb_log_model: #
|
| 409 |
|
| 410 |
# where to save the finished model to
|
| 411 |
output_dir: ./completed-model
|
|
@@ -553,6 +554,18 @@ fsdp_config:
|
|
| 553 |
|
| 554 |
- llama Deepspeed: append `ACCELERATE_USE_DEEPSPEED=true` in front of finetune command
|
| 555 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 556 |
### Inference
|
| 557 |
|
| 558 |
Pass the appropriate flag to the train command:
|
|
|
|
| 401 |
lora_fan_in_fan_out: false
|
| 402 |
|
| 403 |
# wandb configuration if you're using it
|
| 404 |
+
wandb_mode: # "offline" to save run metadata locally and not sync to the server, "disabled" to turn off wandb
|
| 405 |
+
wandb_project: # your wandb project name
|
| 406 |
+
wandb_entity: # a wandb Team name if using a Team
|
| 407 |
wandb_watch:
|
| 408 |
+
wandb_run_id: # set the name of your wandb run
|
| 409 |
+
wandb_log_model: # "checkpoint" to log model to wandb Artifacts every `save_steps` or "end" to log only at the end of training
|
| 410 |
|
| 411 |
# where to save the finished model to
|
| 412 |
output_dir: ./completed-model
|
|
|
|
| 554 |
|
| 555 |
- llama Deepspeed: append `ACCELERATE_USE_DEEPSPEED=true` in front of finetune command
|
| 556 |
|
| 557 |
+
##### Weights & Biases Logging
|
| 558 |
+
|
| 559 |
+
- wandb options
|
| 560 |
+
```yaml
|
| 561 |
+
wandb_mode:
|
| 562 |
+
wandb_project:
|
| 563 |
+
wandb_entity:
|
| 564 |
+
wandb_watch:
|
| 565 |
+
wandb_run_id:
|
| 566 |
+
wandb_log_model:
|
| 567 |
+
```
|
| 568 |
+
|
| 569 |
### Inference
|
| 570 |
|
| 571 |
Pass the appropriate flag to the train command:
|
examples/cerebras/qlora.yml
CHANGED
|
@@ -23,6 +23,7 @@ lora_target_modules:
|
|
| 23 |
lora_target_linear:
|
| 24 |
lora_fan_in_fan_out:
|
| 25 |
wandb_project:
|
|
|
|
| 26 |
wandb_watch:
|
| 27 |
wandb_run_id:
|
| 28 |
wandb_log_model:
|
|
|
|
| 23 |
lora_target_linear:
|
| 24 |
lora_fan_in_fan_out:
|
| 25 |
wandb_project:
|
| 26 |
+
wandb_entity:
|
| 27 |
wandb_watch:
|
| 28 |
wandb_run_id:
|
| 29 |
wandb_log_model:
|
examples/falcon/config-7b-lora.yml
CHANGED
|
@@ -24,6 +24,7 @@ lora_target_modules:
|
|
| 24 |
lora_target_linear: true
|
| 25 |
lora_fan_in_fan_out:
|
| 26 |
wandb_project:
|
|
|
|
| 27 |
wandb_watch:
|
| 28 |
wandb_run_id:
|
| 29 |
wandb_log_model:
|
|
|
|
| 24 |
lora_target_linear: true
|
| 25 |
lora_fan_in_fan_out:
|
| 26 |
wandb_project:
|
| 27 |
+
wandb_entity:
|
| 28 |
wandb_watch:
|
| 29 |
wandb_run_id:
|
| 30 |
wandb_log_model:
|
examples/falcon/config-7b-qlora.yml
CHANGED
|
@@ -38,6 +38,7 @@ lora_target_linear: true
|
|
| 38 |
lora_fan_in_fan_out:
|
| 39 |
|
| 40 |
wandb_project:
|
|
|
|
| 41 |
wandb_watch:
|
| 42 |
wandb_run_id:
|
| 43 |
wandb_log_model:
|
|
|
|
| 38 |
lora_fan_in_fan_out:
|
| 39 |
|
| 40 |
wandb_project:
|
| 41 |
+
wandb_entity:
|
| 42 |
wandb_watch:
|
| 43 |
wandb_run_id:
|
| 44 |
wandb_log_model:
|
examples/falcon/config-7b.yml
CHANGED
|
@@ -24,6 +24,7 @@ lora_target_modules:
|
|
| 24 |
lora_target_linear: true
|
| 25 |
lora_fan_in_fan_out:
|
| 26 |
wandb_project:
|
|
|
|
| 27 |
wandb_watch:
|
| 28 |
wandb_run_id:
|
| 29 |
wandb_log_model:
|
|
|
|
| 24 |
lora_target_linear: true
|
| 25 |
lora_fan_in_fan_out:
|
| 26 |
wandb_project:
|
| 27 |
+
wandb_entity:
|
| 28 |
wandb_watch:
|
| 29 |
wandb_run_id:
|
| 30 |
wandb_log_model:
|
examples/gptj/qlora.yml
CHANGED
|
@@ -20,6 +20,7 @@ lora_target_modules:
|
|
| 20 |
lora_target_linear: true
|
| 21 |
lora_fan_in_fan_out:
|
| 22 |
wandb_project:
|
|
|
|
| 23 |
wandb_watch:
|
| 24 |
wandb_run_id:
|
| 25 |
wandb_log_model:
|
|
|
|
| 20 |
lora_target_linear: true
|
| 21 |
lora_fan_in_fan_out:
|
| 22 |
wandb_project:
|
| 23 |
+
wandb_entity:
|
| 24 |
wandb_watch:
|
| 25 |
wandb_run_id:
|
| 26 |
wandb_log_model:
|
examples/gptq-lora-7b/config.yml
CHANGED
|
@@ -22,6 +22,7 @@ lora_target_modules:
|
|
| 22 |
- v_proj
|
| 23 |
lora_fan_in_fan_out: false
|
| 24 |
wandb_project: llama-7b-lora-int4
|
|
|
|
| 25 |
wandb_watch:
|
| 26 |
wandb_run_id:
|
| 27 |
wandb_log_model:
|
|
|
|
| 22 |
- v_proj
|
| 23 |
lora_fan_in_fan_out: false
|
| 24 |
wandb_project: llama-7b-lora-int4
|
| 25 |
+
wandb_entity:
|
| 26 |
wandb_watch:
|
| 27 |
wandb_run_id:
|
| 28 |
wandb_log_model:
|
examples/jeopardy-bot/config.yml
CHANGED
|
@@ -18,6 +18,7 @@ lora_dropout:
|
|
| 18 |
lora_target_modules:
|
| 19 |
lora_fan_in_fan_out: false
|
| 20 |
wandb_project:
|
|
|
|
| 21 |
wandb_watch:
|
| 22 |
wandb_run_id:
|
| 23 |
wandb_log_model:
|
|
|
|
| 18 |
lora_target_modules:
|
| 19 |
lora_fan_in_fan_out: false
|
| 20 |
wandb_project:
|
| 21 |
+
wandb_entity:
|
| 22 |
wandb_watch:
|
| 23 |
wandb_run_id:
|
| 24 |
wandb_log_model:
|
examples/llama-2/lora.yml
CHANGED
|
@@ -26,6 +26,7 @@ lora_target_linear: true
|
|
| 26 |
lora_fan_in_fan_out:
|
| 27 |
|
| 28 |
wandb_project:
|
|
|
|
| 29 |
wandb_watch:
|
| 30 |
wandb_run_id:
|
| 31 |
wandb_log_model:
|
|
|
|
| 26 |
lora_fan_in_fan_out:
|
| 27 |
|
| 28 |
wandb_project:
|
| 29 |
+
wandb_entity:
|
| 30 |
wandb_watch:
|
| 31 |
wandb_run_id:
|
| 32 |
wandb_log_model:
|
examples/llama-2/qlora.yml
CHANGED
|
@@ -27,6 +27,7 @@ lora_target_linear: true
|
|
| 27 |
lora_fan_in_fan_out:
|
| 28 |
|
| 29 |
wandb_project:
|
|
|
|
| 30 |
wandb_watch:
|
| 31 |
wandb_run_id:
|
| 32 |
wandb_log_model:
|
|
|
|
| 27 |
lora_fan_in_fan_out:
|
| 28 |
|
| 29 |
wandb_project:
|
| 30 |
+
wandb_entity:
|
| 31 |
wandb_watch:
|
| 32 |
wandb_run_id:
|
| 33 |
wandb_log_model:
|
examples/mpt-7b/config.yml
CHANGED
|
@@ -20,6 +20,7 @@ lora_target_modules:
|
|
| 20 |
- v_proj
|
| 21 |
lora_fan_in_fan_out: false
|
| 22 |
wandb_project: mpt-alpaca-7b
|
|
|
|
| 23 |
wandb_watch:
|
| 24 |
wandb_run_id:
|
| 25 |
wandb_log_model:
|
|
|
|
| 20 |
- v_proj
|
| 21 |
lora_fan_in_fan_out: false
|
| 22 |
wandb_project: mpt-alpaca-7b
|
| 23 |
+
wandb_entity:
|
| 24 |
wandb_watch:
|
| 25 |
wandb_run_id:
|
| 26 |
wandb_log_model:
|
examples/openllama-3b/config.yml
CHANGED
|
@@ -22,6 +22,7 @@ lora_target_modules:
|
|
| 22 |
lora_target_linear:
|
| 23 |
lora_fan_in_fan_out:
|
| 24 |
wandb_project:
|
|
|
|
| 25 |
wandb_watch:
|
| 26 |
wandb_run_id:
|
| 27 |
wandb_log_model:
|
|
|
|
| 22 |
lora_target_linear:
|
| 23 |
lora_fan_in_fan_out:
|
| 24 |
wandb_project:
|
| 25 |
+
wandb_entity:
|
| 26 |
wandb_watch:
|
| 27 |
wandb_run_id:
|
| 28 |
wandb_log_model:
|
examples/openllama-3b/lora.yml
CHANGED
|
@@ -28,6 +28,7 @@ lora_target_modules:
|
|
| 28 |
- o_proj
|
| 29 |
lora_fan_in_fan_out:
|
| 30 |
wandb_project:
|
|
|
|
| 31 |
wandb_watch:
|
| 32 |
wandb_run_id:
|
| 33 |
wandb_log_model:
|
|
|
|
| 28 |
- o_proj
|
| 29 |
lora_fan_in_fan_out:
|
| 30 |
wandb_project:
|
| 31 |
+
wandb_entity:
|
| 32 |
wandb_watch:
|
| 33 |
wandb_run_id:
|
| 34 |
wandb_log_model:
|
examples/openllama-3b/qlora.yml
CHANGED
|
@@ -22,6 +22,7 @@ lora_target_modules:
|
|
| 22 |
lora_target_linear: true
|
| 23 |
lora_fan_in_fan_out:
|
| 24 |
wandb_project:
|
|
|
|
| 25 |
wandb_watch:
|
| 26 |
wandb_run_id:
|
| 27 |
wandb_log_model:
|
|
|
|
| 22 |
lora_target_linear: true
|
| 23 |
lora_fan_in_fan_out:
|
| 24 |
wandb_project:
|
| 25 |
+
wandb_entity:
|
| 26 |
wandb_watch:
|
| 27 |
wandb_run_id:
|
| 28 |
wandb_log_model:
|
examples/pythia-12b/config.yml
CHANGED
|
@@ -23,6 +23,7 @@ lora_target_modules:
|
|
| 23 |
lora_target_linear: true
|
| 24 |
lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
|
| 25 |
wandb_project:
|
|
|
|
| 26 |
wandb_watch:
|
| 27 |
wandb_run_id:
|
| 28 |
wandb_log_model:
|
|
|
|
| 23 |
lora_target_linear: true
|
| 24 |
lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
|
| 25 |
wandb_project:
|
| 26 |
+
wandb_entity:
|
| 27 |
wandb_watch:
|
| 28 |
wandb_run_id:
|
| 29 |
wandb_log_model:
|
examples/pythia/lora.yml
CHANGED
|
@@ -17,6 +17,7 @@ lora_target_modules:
|
|
| 17 |
lora_target_linear:
|
| 18 |
lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
|
| 19 |
wandb_project:
|
|
|
|
| 20 |
wandb_watch:
|
| 21 |
wandb_run_id:
|
| 22 |
wandb_log_model:
|
|
|
|
| 17 |
lora_target_linear:
|
| 18 |
lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
|
| 19 |
wandb_project:
|
| 20 |
+
wandb_entity:
|
| 21 |
wandb_watch:
|
| 22 |
wandb_run_id:
|
| 23 |
wandb_log_model:
|
examples/redpajama/config-3b.yml
CHANGED
|
@@ -21,6 +21,7 @@ lora_target_modules:
|
|
| 21 |
- v_proj
|
| 22 |
lora_fan_in_fan_out: false
|
| 23 |
wandb_project: redpajama-alpaca-3b
|
|
|
|
| 24 |
wandb_watch:
|
| 25 |
wandb_run_id:
|
| 26 |
wandb_log_model:
|
|
|
|
| 21 |
- v_proj
|
| 22 |
lora_fan_in_fan_out: false
|
| 23 |
wandb_project: redpajama-alpaca-3b
|
| 24 |
+
wandb_entity:
|
| 25 |
wandb_watch:
|
| 26 |
wandb_run_id:
|
| 27 |
wandb_log_model:
|
examples/replit-3b/config-lora.yml
CHANGED
|
@@ -20,6 +20,7 @@ lora_target_modules:
|
|
| 20 |
- mlp_down
|
| 21 |
lora_fan_in_fan_out:
|
| 22 |
wandb_project: lora-replit
|
|
|
|
| 23 |
wandb_watch:
|
| 24 |
wandb_run_id:
|
| 25 |
wandb_log_model:
|
|
|
|
| 20 |
- mlp_down
|
| 21 |
lora_fan_in_fan_out:
|
| 22 |
wandb_project: lora-replit
|
| 23 |
+
wandb_entity:
|
| 24 |
wandb_watch:
|
| 25 |
wandb_run_id:
|
| 26 |
wandb_log_model:
|
examples/xgen-7b/xgen-7b-8k-qlora.yml
CHANGED
|
@@ -37,6 +37,7 @@ lora_target_linear: true
|
|
| 37 |
lora_fan_in_fan_out:
|
| 38 |
|
| 39 |
wandb_project:
|
|
|
|
| 40 |
wandb_watch:
|
| 41 |
wandb_run_id:
|
| 42 |
wandb_log_model:
|
|
|
|
| 37 |
lora_fan_in_fan_out:
|
| 38 |
|
| 39 |
wandb_project:
|
| 40 |
+
wandb_entity:
|
| 41 |
wandb_watch:
|
| 42 |
wandb_run_id:
|
| 43 |
wandb_log_model:
|
src/axolotl/utils/wandb.py
CHANGED
|
@@ -9,6 +9,8 @@ def setup_wandb_env_vars(cfg):
|
|
| 9 |
elif cfg.wandb_project and len(cfg.wandb_project) > 0:
|
| 10 |
os.environ["WANDB_PROJECT"] = cfg.wandb_project
|
| 11 |
cfg.use_wandb = True
|
|
|
|
|
|
|
| 12 |
if cfg.wandb_watch and len(cfg.wandb_watch) > 0:
|
| 13 |
os.environ["WANDB_WATCH"] = cfg.wandb_watch
|
| 14 |
if cfg.wandb_log_model and len(cfg.wandb_log_model) > 0:
|
|
|
|
| 9 |
elif cfg.wandb_project and len(cfg.wandb_project) > 0:
|
| 10 |
os.environ["WANDB_PROJECT"] = cfg.wandb_project
|
| 11 |
cfg.use_wandb = True
|
| 12 |
+
if cfg.wandb_entity and len(cfg.wandb_entity) > 0:
|
| 13 |
+
os.environ["WANDB_ENTITY"] = cfg.wandb_entity
|
| 14 |
if cfg.wandb_watch and len(cfg.wandb_watch) > 0:
|
| 15 |
os.environ["WANDB_WATCH"] = cfg.wandb_watch
|
| 16 |
if cfg.wandb_log_model and len(cfg.wandb_log_model) > 0:
|