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

Add default values for special token ids in model config #21

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def dump_config(f, config, ggml_type):
config.num_layers,
config.inner_hidden_size,
config.max_sequence_length,
config.bos_token_id,
config.eos_token_id,
config.pad_token_id,
config.bos_token_id if config.bos_token_id is not None else -1,
config.eos_token_id if config.eos_token_id is not None else -1,
config.pad_token_id if config.pad_token_id is not None else -1,
config.sep_token_id if config.sep_token_id is not None else -1,
]
f.write(struct.pack("i" * len(config_values), *config_values))
Expand Down Expand Up @@ -224,8 +224,8 @@ def dump_config(f, config, ggml_type):
config.ffn_hidden_size,
config.seq_length,
config.bos_token_id if config.bos_token_id is not None else -1,
config.eos_token_id,
config.pad_token_id,
config.eos_token_id if config.eos_token_id is not None else -1,
config.pad_token_id if config.pad_token_id is not None else -1,
config.sep_token_id if config.sep_token_id is not None else -1,
config.multi_query_group_num,
]
Expand Down