music
sander-wood commited on
Commit
5c1594f
1 Parent(s): 4401d22

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -72,9 +72,9 @@ To set up the MelodyT5 environment and install the necessary dependencies, follo
72
  Before running the inference script, you can configure the following parameters in `config.py` or directly via command-line arguments:
73
 
74
  - `-num_tunes`: Number of independently computed returned tunes (default: 3)
75
- - `-max_patch`: Maximum length in tokens of each tune (default: 128)
76
- - `-top_p`: Tokens within the sample operation of text generation (default: 0.8)
77
- - `-top_k`: Tokens within the sample operation of text generation (default: 8)
78
  - `-temperature`: Temperature of the sampling operation (default: 2.6)
79
  - `-seed`: Seed for random state (default: None)
80
  - `-show_control_code`: Whether to show control codes (default: True)
@@ -86,7 +86,7 @@ These parameters control how the model generates melodies based on the input pro
86
  To perform inference tasks using MelodyT5, follow these steps:
87
 
88
  1. **Prepare Your Prompt**
89
- - Edit `prompt.txt` to specify the task and input for the model. Each line in `prompt.txt` should contain a single prompt.
90
 
91
  2. **Execute Inference**
92
  - Run the following command to execute the inference script:
@@ -94,11 +94,11 @@ To perform inference tasks using MelodyT5, follow these steps:
94
  python inference.py -num_tunes 3 -max_patch 128 -top_p 0.8 -top_k 8 -temperature 2.6 -seed <seed_value> -show_control_code True
95
  ```
96
  Replace `<seed_value>` with your chosen seed value or leave it as `None` for a random seed.
97
- - The script will generate melodies based on the prompts specified in `prompt.txt` using the configured parameters and save the results in the `output_tunes` folder.
98
 
99
  ## How to Use
100
 
101
- Follow these steps to effectively utilize MelodyT5 for symbolic music processing:
102
 
103
  1. **Prepare XML Data**
104
 
@@ -137,8 +137,6 @@ Follow these steps to effectively utilize MelodyT5 for symbolic music processing
137
 
138
  To perform inference tasks such as melody generation or harmonization, execute `inference.py`. The script reads prompts from `prompt.txt` to specify the task and input for the model. Customize prompts in `prompt.txt` to define different tasks and inputs for MelodyT5. Refer to the examples below for guidance on setting up prompts.
139
 
140
- Ensure the input (encoder input) is complete, while the output (decoder input) is optional. If you need the model to continue a given output, use `%%input` and `%%output` to mark the beginning of each section. Additionally, the output must not contain incomplete bars. Here is an example prompt:
141
-
142
  ```
143
  %%input
144
  %%variation
@@ -155,6 +153,8 @@ Follow these steps to effectively utilize MelodyT5 for symbolic music processing
155
  |: B |
156
  ```
157
 
 
 
158
  ## Inference Examples
159
  Below are the MelodyT5 results on seven MelodyHub tasks, using random samples from the validation set. Three independent outputs were generated without cherry-picking. Each `X:0` output corresponds to the original input for that task and is not generated by the model, while `X:1`, `X:2`, and `X:3` are generated outputs.
160
 
 
72
  Before running the inference script, you can configure the following parameters in `config.py` or directly via command-line arguments:
73
 
74
  - `-num_tunes`: Number of independently computed returned tunes (default: 3)
75
+ - `-max_patch`: Maximum length in patches of each tune (default: 128)
76
+ - `-top_p`: Cumulative probability threshold for nucleus sampling (default: 0.8)
77
+ - `-top_k`: Number of highest probability tokens to keep for sampling (default: 8)
78
  - `-temperature`: Temperature of the sampling operation (default: 2.6)
79
  - `-seed`: Seed for random state (default: None)
80
  - `-show_control_code`: Whether to show control codes (default: True)
 
86
  To perform inference tasks using MelodyT5, follow these steps:
87
 
88
  1. **Prepare Your Prompt**
89
+ - Edit `prompt.txt` to specify the task and input for the model.
90
 
91
  2. **Execute Inference**
92
  - Run the following command to execute the inference script:
 
94
  python inference.py -num_tunes 3 -max_patch 128 -top_p 0.8 -top_k 8 -temperature 2.6 -seed <seed_value> -show_control_code True
95
  ```
96
  Replace `<seed_value>` with your chosen seed value or leave it as `None` for a random seed.
97
+ - The script will generate melodies based on the prompt specified in `prompt.txt` using the configured parameters and save the results in the `output_tunes` folder.
98
 
99
  ## How to Use
100
 
101
+ Follow these steps to utilize MelodyT5 for symbolic music processing:
102
 
103
  1. **Prepare XML Data**
104
 
 
137
 
138
  To perform inference tasks such as melody generation or harmonization, execute `inference.py`. The script reads prompts from `prompt.txt` to specify the task and input for the model. Customize prompts in `prompt.txt` to define different tasks and inputs for MelodyT5. Refer to the examples below for guidance on setting up prompts.
139
 
 
 
140
  ```
141
  %%input
142
  %%variation
 
153
  |: B |
154
  ```
155
 
156
+ Ensure the input (encoder input) is complete, while the output (decoder input) is optional. If you need the model to continue a given output, use `%%input` and `%%output` to mark the beginning of each section. Additionally, the output must not contain incomplete bars.
157
+
158
  ## Inference Examples
159
  Below are the MelodyT5 results on seven MelodyHub tasks, using random samples from the validation set. Three independent outputs were generated without cherry-picking. Each `X:0` output corresponds to the original input for that task and is not generated by the model, while `X:1`, `X:2`, and `X:3` are generated outputs.
160