AlexWortega commited on
Commit
338af45
1 Parent(s): 8f9fe9b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -1
README.md CHANGED
@@ -55,7 +55,25 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
55
  tokenizer = AutoTokenizer.from_pretrained("AlexWortega/instruct_rugptMedium")
56
  model = AutoModelForCausalLM.from_pretrained("AlexWortega/instruct_rugptMedium")
57
  ```
58
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  # License
60
 
61
  The weights of Instructions ruGPT Small v0.1a are licensed under version 2.0 of the Apache License.
 
55
  tokenizer = AutoTokenizer.from_pretrained("AlexWortega/instruct_rugptMedium")
56
  model = AutoModelForCausalLM.from_pretrained("AlexWortega/instruct_rugptMedium")
57
  ```
58
+ обратите внимание, что лучшие параметры для генерации
59
+ ```
60
+ gen_kwargs = {
61
+ "min_length": 20,
62
+ "max_new_tokens": 100,
63
+ "top_k": 50,
64
+ "top_p": 0.9,
65
+ "do_sample": True,
66
+ "early_stopping": True,
67
+ "no_repeat_ngram_size": 2,
68
+ "eos_token_id": tokenizer.eos_token_id,
69
+ "pad_token_id": tokenizer.eos_token_id,
70
+ "use_cache": True,
71
+ "repetition_penalty": 1.5,
72
+ "length_penalty": 0.8,
73
+ "num_beams": 4,
74
+ "num_return_sequences": k
75
+ }
76
+ ```
77
  # License
78
 
79
  The weights of Instructions ruGPT Small v0.1a are licensed under version 2.0 of the Apache License.