lewtun HF Staff commited on
Commit
b8a3178
·
verified ·
1 Parent(s): fcc320f

Use the recommended sampling settings in generation_config.json

Browse files

This PR adds the sampling settings recommended in the model card (temperature 0.2, top-p 0.9) to `generation_config.json`, so that `transformers` and vLLM pick them up by default.

It also raises `max_new_tokens` from 40 (added in #9) to 512, since 40 tokens cuts off most replies mid-sentence. Removing it entirely isn't an option, because `generate()` would then fall back to transformers' default of 20 new tokens.

Files changed (1) hide show
  1. generation_config.json +5 -3
generation_config.json CHANGED
@@ -1,8 +1,10 @@
1
  {
2
- "_from_model_config": true,
3
  "bos_token_id": 1,
 
4
  "eos_token_id": 2,
 
5
  "pad_token_id": 2,
6
- "transformers_version": "4.42.3",
7
- "max_new_tokens": 40
 
8
  }
 
1
  {
 
2
  "bos_token_id": 1,
3
+ "do_sample": true,
4
  "eos_token_id": 2,
5
+ "max_new_tokens": 512,
6
  "pad_token_id": 2,
7
+ "temperature": 0.2,
8
+ "top_p": 0.9,
9
+ "transformers_version": "4.42.3"
10
  }