forked from czyssrs/Few-Shot-NLG
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
2,893 additions
and
5,351 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# wikitobio | ||
Generate biography from wiki infobox | ||
# Few-shot table-to-text Generation | ||
Generate descriptions from wiki infobox under few shot setting | ||
|
||
## Installation | ||
python3 -m venv ucsb | ||
source ucsb/bin/activate | ||
pip install -r requirements.txt | ||
|
||
## Instructions | ||
Download the data(few_shot_gpt-2.zip) and pre-trained GPT2 model(models.zip), unzip them to the same directory of the code(so that all three of them(few_shot_gpt-2_data, models, wikitobio) are in the same directory). | ||
|
||
The training takes two 10G GPUs. I placed the GPT part into one GPU and the pointer generator part into another, since on my side we only have 10G GPUs. If you have different GPU configurations, like one GPU of more than 20G, go to SeqUnit.py and remove all the "with tf.device("/gpu:1"):" tags. | ||
|
||
Command for training: | ||
|
||
$ cd wikitobio | ||
|
||
$ python Main.py your_saved_model_name few_shot_folder | ||
|
||
Now it's the experiment on humans domain with 1000 training data. You will see a result bleu score of around 26 after 10 training rounds. |
Oops, something went wrong.