You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.1KB

3 months ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Project README
  2. This project is based on `Python 3.10`. To get started, you can create an environment using conda with the following command:
  3. ```bash
  4. conda create -n superpos python=3.10
  5. ```
  6. After setting up the environment, install all the required packages with:
  7. ```bash
  8. pip install -r requirements.txt
  9. ```
  10. ## Project Structure
  11. The entry point of this project is located in the `./09_Cluster` directory. The most important files in this directory are the `config.yaml` files. Below is an example of a configuration file:
  12. ```yaml
  13. default: &default
  14. use_tqdm: true
  15. random_seed: 42
  16. base_save_path: /home/msadraei/trained_final
  17. model_name: google/t5-base-lm-adapt
  18. project_name_prefix: iclr_attempt_lmt5
  19. experiment_name_suffix: null
  20. train_batch_size: 32
  21. valid_batch_size: 32
  22. remove_dropout: true
  23. learning_rate: 0.01
  24. weight_decay: 0.01
  25. num_epochs: 40
  26. peft_params: null # no mutation
  27. hot_modules:
  28. - sadcl
  29. best_finder:
  30. save: true
  31. metric: valid_mean
  32. higher_better: true
  33. tasks:
  34. - glue:cola
  35. - glue:mrpc
  36. - glue:stsb
  37. - superglue:rte
  38. - superglue:cb
  39. - superglue:wic
  40. - superglue:copa
  41. - superglue:boolq
  42. - superglue:multirc
  43. pp: &pp
  44. - /home/msadraei/trained_final/hzi_cluster_t5_base_glue-mnli/10_combine_128
  45. - /home/msadraei/trained_final/hzi_cluster_t5_base_glue-sst2/10_combine_128
  46. - /home/msadraei/trained_final/hzi_cluster_t5_base_glue-qqp/10_combine_128
  47. - /home/msadraei/trained_final/hzi_cluster_t5_base_glue-qnli/10_combine_128
  48. run_configs:
  49. - <<: *default
  50. learning_rate: 0.3
  51. weight_decay: 0.00001
  52. peft_params:
  53. kind: attempt
  54. n_tokens: 10
  55. g_bottleneck: 100
  56. pretrained_paths: *pp
  57. ```
  58. ## PEFT Support
  59. This project supports different kinds of Parameter-Efficient Fine-Tuning (PEFT) methods. The valid values for PEFT types are `'combine'`, `'residual'`, `'simple'`, `'spot'`, and `'attempt'`. Each run configuration will be executed over each dataset in the list of tasks.
  60. ## Running the Project
  61. To run a configuration, use the following command:
  62. ```bash
  63. python train.py config.yaml
  64. ```
  65. This will start the training process based on the settings defined in `config.yaml`.