noriyukipy commited on
Commit
95c4ca3
1 Parent(s): 0e80705

Modify model config file to set default generation parameters of top_k, top_p and do_sample

Browse files
Files changed (2) hide show
  1. README.md +2 -0
  2. config.json +4 -1
README.md CHANGED
@@ -58,6 +58,8 @@ Then load the pretrained tokenizer and GPT-2 model, and call a `generate` method
58
  ['近年の機械学習は、特に、コンピューター学習において重要な概念である。この概念は、教育心理学', '近年の機械学習は時間間隔の短縮、時間間隔の短縮、学習時間の短縮、学習の', '近年の機械学習は、学生と学生が自分の能力を高め、結果を向上させることを目的としている。それは、']
59
  ```
60
 
 
 
61
  ## License
62
 
63
  All the models included in this repository are licensed under [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
58
  ['近年の機械学習は、特に、コンピューター学習において重要な概念である。この概念は、教育心理学', '近年の機械学習は時間間隔の短縮、時間間隔の短縮、学習時間の短縮、学習の', '近年の機械学習は、学生と学生が自分の能力を高め、結果を向上させることを目的としている。それは、']
59
  ```
60
 
61
+ **Note:** The default model configuration `config.json` sets some generation parameters with `do_sample=True`, `top_k=50`, `top_p=0.95`. Please reset these parameters when you need to set different parameters.
62
+
63
  ## License
64
 
65
  All the models included in this repository are licensed under [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
config.json CHANGED
@@ -31,5 +31,8 @@
31
  "transformers_version": "4.3.3",
32
  "unk_token_id": 1,
33
  "use_cache": true,
34
- "vocab_size": 32000
 
 
 
35
  }
31
  "transformers_version": "4.3.3",
32
  "unk_token_id": 1,
33
  "use_cache": true,
34
+ "vocab_size": 32000,
35
+ "top_k": 50,
36
+ "top_p": 0.95,
37
+ "do_sample": true
38
  }