Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Flaskapp #90

Open
wants to merge 90 commits into
base: finetuning
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
5b64684
update README
WuTheFWasThat Feb 18, 2019
6dab221
reorganize and add temp 0.7
WuTheFWasThat Feb 19, 2019
aae26ab
add license
WuTheFWasThat Feb 20, 2019
fc0ee6d
add conditional samples
WuTheFWasThat Feb 20, 2019
825aa3d
separate out tensorflow install
WuTheFWasThat Feb 20, 2019
92ce9f2
shuffle headings
WuTheFWasThat Feb 20, 2019
bf43e73
more warning
WuTheFWasThat Feb 20, 2019
23ed990
instructinos mention git clone
WuTheFWasThat Feb 20, 2019
99af6d7
Add a Dockerfile and document usage in README
madisonmay Feb 14, 2019
2cf46d9
fixed unconditional sampling reproducibility issue
Feb 20, 2019
946facf
fixed seed arg to ensure reproducibility in conditional-samples model
Feb 20, 2019
b6f943d
update readme
WuTheFWasThat Feb 20, 2019
a3aa7de
add conditional samples with default settings
WuTheFWasThat Feb 21, 2019
68bf7a0
add .gitattributes file to ensure files copied to docker container ha…
Feb 21, 2019
c5b9c89
Minor: update readme
natemurthy Feb 21, 2019
c314dda
Minor: update readme
natemurthy Feb 27, 2019
ed49f03
Add documentation for help flags (#81)
ArmaanBhullar Feb 27, 2019
9d1e704
slight fix to batch size description
WuTheFWasThat Feb 27, 2019
0465394
updates
WuTheFWasThat Feb 28, 2019
d1fc873
Add finetuning code.
Mar 3, 2019
1fba31f
chmod +x
Mar 3, 2019
dfca3cf
Add finetuning instructions
Mar 3, 2019
9423776
Fix sample generation with batch_size greater than 1.
Mar 3, 2019
8eb6793
Python download script (#89)
webproduktion01 Mar 4, 2019
ed0dedc
update download stuff
WuTheFWasThat Mar 4, 2019
953530f
update readme with usage caveats and calls for research
WuTheFWasThat Mar 6, 2019
79a246a
add contributors md and move dev docs out
WuTheFWasThat Mar 6, 2019
8637828
fix for windows (thanks to chrothenbach)
WuTheFWasThat Mar 7, 2019
3e18729
Add training script with Horovod support
tlkh Mar 18, 2019
ec16bad
Fix typo in train command in README
tlkh Mar 18, 2019
0bad9e4
Added instructions for training using Horovod
tlkh Mar 18, 2019
d14501a
Update CONTRIBUTORS.md
WuTheFWasThat Mar 18, 2019
ef62678
Merge pull request #2 from tlkh/finetuning
nshepperd Mar 19, 2019
c465071
autoformat
Mar 4, 2019
1e32b10
Combine input text files with <|endoftext|> delimiter to ensure there…
Mar 19, 2019
3a3ce65
Write losses to summary file for tensorboard.
Mar 20, 2019
d5b387b
Add learning rate as command line flag.
Mar 20, 2019
b106d0a
Use argparse instead of fire in train.py.
Mar 20, 2019
2044d13
Fix encode.py
Mar 21, 2019
a359a34
Add gradient accumulation with default of 5 minibatches
Mar 21, 2019
8738950
Merge remote-tracking branch 'origin/master' into finetuning
Mar 25, 2019
eda8777
Turn off gradient accumulation by default, it shouldn't be needed.
May 2, 2019
0503b1b
updates for 345M model
WuTheFWasThat May 3, 2019
b5ef71a
reference dataset
WuTheFWasThat May 3, 2019
dd75299
remove samples
WuTheFWasThat May 3, 2019
47df6da
Add gradient checkpointing and another optimization necessary to allo…
May 4, 2019
c46ed99
Add "validation" loss calculation.
May 4, 2019
941a762
Add toposort to requirements
Tenoke May 5, 2019
13c5412
Merge pull request #3 from Tenoke/finetuning
May 6, 2019
3985cc7
Add option to use SGD for optimizer
May 14, 2019
7fc2a44
Record learning rate in tensorboard logs
May 14, 2019
a464925
Add text in README for --optimizer flag
May 14, 2019
ae535b6
Reduce default learning rate of train.py.
May 14, 2019
2d4fd0c
Merge remote-tracking branch 'origin/master' into finetuning
May 14, 2019
6a77a7b
New feature: add noise to network inputs to regularize against overre…
May 15, 2019
87fe3d7
Add top-p sampling
May 15, 2019
e99ee37
Add top_p to interactive_conditional_samples.py and generate_uncondit…
May 15, 2019
2b24145
fix typo in top_p
May 15, 2019
6c1f21d
Fix top_p sampling for batch_size>1
May 15, 2019
e5c5054
allow models to be in a separate folder via models_dir argument (#129)
memo May 16, 2019
c0859d7
Fix TODO in sample.sample_sequences- Avoid 'leaving last token calcul…
albertwujj May 31, 2019
41a6793
Update README.md
christopherhesse Jul 27, 2019
e937879
Merge pull request #161 from openai/christopherhesse-patch-1
christopherhesse Jul 27, 2019
cca7144
Updated README.md
biranchi2018 Aug 15, 2019
cb41537
add model card
jackclarksf Aug 20, 2019
f35fa1d
push 774M model
WuTheFWasThat Aug 20, 2019
ac5d522
nucleus sampling
WuTheFWasThat Aug 27, 2019
a070f38
Merge pull request #22 from biranchi2018/biranchi2018-patch-1
Aug 27, 2019
50fa3b6
Add note to install cudnn, re https://github.com/nshepperd/gpt-2/issu…
Jun 16, 2019
b7cda3f
Add flag to set encoding for text reading and writing, defaulting to …
Jul 20, 2019
fbae7db
update readmes
WuTheFWasThat Nov 5, 2019
d98291d
update model card
jackclarksf Nov 5, 2019
ebdba20
updated g_form contact
jackclarksf Nov 26, 2019
0f97760
Update LICENSE
cookee12 Jan 3, 2020
03fce0a
Update README.md
WuTheFWasThat Jan 3, 2020
0574c57
delete
WuTheFWasThat Jan 4, 2020
a74da5d
move to azure
WuTheFWasThat Dec 2, 2020
fdd5ecf
Merge branch 'master' into finetuning
Mar 2, 2021
9741323
Fix models_dir issue #76
Mar 6, 2021
4556dd2
Delete train-horovod.py, which is unmaintained
Mar 6, 2021
2de5d1b
Fixes to support tensorflow v2.x. Training should still work in v1.x.
Mar 6, 2021
ffc54c7
Add tensor rematerialization.
Mar 16, 2021
29ce412
Update twremat.cabal for ghc 9.0
Apr 1, 2021
c002e8f
first commit
napalmj Apr 13, 2022
9c15f97
repositioned items
napalmj Apr 13, 2022
4a2a362
added flask app
napalmj Apr 13, 2022
b05775f
removed env
napalmj Apr 13, 2022
d17db8e
git ignore
napalmj Apr 13, 2022
1f4a69d
deleted text files
napalmj Apr 13, 2022
9eb1d27
ignoring training text
napalmj Apr 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sample generation with batch_size greater than 1.
  • Loading branch information
Neil Shepperd committed Mar 3, 2019
commit 9423776ff05a04771be1d8fb27cca0a9d5e6f054
15 changes: 9 additions & 6 deletions train.py
Original file line number Diff line number Diff line change
@@ -185,14 +185,17 @@ def save():
fp.write(str(counter) + '\n')

def generate_samples():
context_tokens = data_sampler.sample(1)
all_text = []
for i in range(sample_num):
index = 0
while index < sample_num:
out = sess.run(
tf_sample, feed_dict={context: [data_sampler.sample(1)]})
text = enc.decode(out[0])
all_text.append('======== SAMPLE {} ========'.format(i + 1))
all_text.append(text)
all_text.append('')
tf_sample, feed_dict={context: batch_size*[context_tokens]})
for i in range(min(sample_num - index, batch_size)):
text = enc.decode(out[i])
text = '======== SAMPLE {} ========\n{}\n'.format(index + 1, text)
all_text.append(text)
index += 1
print(text)
maketree(os.path.join(SAMPLE_DIR, run_name))
with open(