Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEA:add split token and generate related resource #59

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
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
4 changes: 4 additions & 0 deletions config/conversation/gpt2/durecdial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: DuRecDial
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'GPT2-chitchat'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 0.01
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'GPT2-chitchat'
# optim
conv:
epoch: 1
Expand Down
4 changes: 4 additions & 0 deletions config/conversation/gpt2/gorecdial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: GoRecDial
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 0.01
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'gpt2'
# optim
conv:
epoch: 1
Expand Down
4 changes: 4 additions & 0 deletions config/conversation/gpt2/inspired.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: Inspired
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 1
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'gpt2'
# optim
conv:
epoch: 1
Expand Down
4 changes: 4 additions & 0 deletions config/conversation/gpt2/opendialkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: OpenDialKG
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 0.01
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'gpt2'
# optim
conv:
epoch: 1
Expand Down
4 changes: 4 additions & 0 deletions config/conversation/gpt2/redial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: ReDial
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 0.01
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'gpt2'
# optim
conv:
epoch: 1
Expand Down
4 changes: 4 additions & 0 deletions config/conversation/gpt2/tgredial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
dataset: TGReDial
tokenize:
conv: gpt2
# tokenize path
conv_tokenize_path: 'GPT2-chitchat'
# dataloader
context_truncate: 256
response_truncate: 30
item_truncate: 100
scale: 1
# model
conv_model: GPT2
# pretrained path
conv_pretrained_path: 'GPT2-chitchat'
# optim
conv:
epoch: 50
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/durecdial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: DuRecDial
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-chinese'
conv_tokenize_path: 'GPT2-chitchat'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
rec_pretrained_path: 'bert-base-chinese'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'GPT2-chitchat'
# embedding: word2vec
embedding_dim: 300
use_dropout: False
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/gorecdial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: GoRecDial
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-uncased'
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
rec_pretrained_path: 'bert-base-uncased'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'gpt2'
# embedding: word2vec
embedding_dim: 300
use_dropout: False
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/inspired.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: Inspired
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-uncased'
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
rec_pretrained_path: 'bert-base-uncased'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'gpt2'
# optim
rec:
epoch: 1
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/opendialkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: OpenDialKG
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-uncased'
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
conv_pretrained_path: 'bert-base-uncased'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'gpt2'
# embedding: word2vec
embedding_dim: 300
use_dropout: False
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/redial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: ReDial
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-uncased'
conv_tokenize_path: 'gpt2'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
conv_pretrained_path: 'bert-base-uncased'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'gpt2'
# embedding: word2vec
embedding_dim: 300
use_dropout: False
Expand Down
7 changes: 7 additions & 0 deletions config/crs/inspired/tgredial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: TGReDial
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-chinese'
conv_tokenize_path: 'GPT2-chitchat'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,8 +14,12 @@ scale: 1
# model
# rec
rec_model: InspiredRec
# pretrained path
rec_pretrained_path: 'bert-base-chinese'
# conv
conv_model: InspiredConv
# pretrained path
conv_pretrained_path: 'GPT2-chitchat'
# embedding: word2vec
embedding_dim: 300
use_dropout: False
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/durecdial.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: DuRecDial
tokenize: jieba
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 1
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/gorecdial.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: GoRecDial
tokenize: nltk
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 1
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/inspired.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: Inspired
tokenize: nltk
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 1
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/opendialkg.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: OpenDialKG
tokenize: nltk
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 1
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/redial.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: ReDial
tokenize: nltk
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 3
Expand Down
3 changes: 2 additions & 1 deletion config/crs/kgsf/tgredial.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: TGReDial
tokenize: pkuseg
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -21,6 +21,7 @@ learn_positional_embeddings: false
embeddings_scale: true
reduction: false
n_positions: 1024
copy: true
# optim
pretrain:
epoch: 50
Expand Down
3 changes: 2 additions & 1 deletion config/crs/ntrd/tgredial.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dataset
dataset: TGReDial
tokenize: pkuseg
embedding: word2vec.npy
embedding: True
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -24,6 +24,7 @@ n_positions: 1024
gen_loss_weight: 5
n_movies: 62287
replace_token: '[ITEM]'
copy: true
# optim
pretrain:
epoch: 50
Expand Down
6 changes: 6 additions & 0 deletions config/crs/tgredial/durecdial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dataset: DuRecDial
tokenize:
rec: bert
conv: gpt2
# tokenize path
rec_tokenize_path: 'bert-base-chinese'
conv_tokenize_path: 'GPT2-chitchat'
# dataloader
context_truncate: 256
response_truncate: 30
Expand All @@ -11,6 +14,9 @@ scale: 0.01
# model
rec_model: TGRec
conv_model: TGConv
# pretrained path
rec_pretrained_path: 'bert-base-chinese'
conv_pretrained_path: 'GPT2-chitchat'
hidden_dropout_prob: 0.2
initializer_range: 0.02
hidden_size: 50
Expand Down
Loading