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

"summary_type": "cls_index" not supported #6

Open
tomyoung903 opened this issue Jul 15, 2020 · 1 comment
Open

"summary_type": "cls_index" not supported #6

tomyoung903 opened this issue Jul 15, 2020 · 1 comment

Comments

@tomyoung903
Copy link

Hello,

Thank you for releasing the code.

Running the code as instructed loads config information:

{
"activation_function": "gelu_new",
"architectures": [
"GPT2LMHeadModel"
],
"attn_pdrop": 0.1,
"bos_token_id": 50256,
"embd_pdrop": 0.1,
"eos_token_id": 50256,
"finetuning_task": null,
"initializer_range": 0.02,
"layer_norm_epsilon": 1e-05,
"model_type": "gpt2",
"n_ctx": 1024,
"n_embd": 768,
"n_head": 12,
"n_layer": 12,
"n_positions": 1024,
"num_labels": 1,
"output_attentions": false,
"output_hidden_states": false,
"resid_pdrop": 0.1,
"summary_activation": null,
"summary_first_dropout": 0.1,
"summary_proj_to_labels": true,
"summary_type": "cls_index",
"summary_use_proj": true,
"task_specific_params": {
"text-generation": {
"do_sample": true,
"max_length": 50
}
},
"torchscript": false,
"vocab_size": 50257
}

But "summary_type": "cls_index" is not supported in "modeling_utils.py", throwing an error.

Did I miss anything? Should "summary_type": "cls_index" be "token_ids" instead?

@kiseliu
Copy link

kiseliu commented Jul 23, 2020

I think it's better to replace "token_ids" to "cls_index" in modeling_utils.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants