FredZhang7 commited on
Commit
0050e9d
1 Parent(s): 7c5bf67

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -8
README.md CHANGED
@@ -79,17 +79,14 @@ for i in range(len(output)):
79
  print('\033[92m' + tokenizer.decode(output[i], skip_special_tokens=True) + '\033[0m\n')
80
  ```
81
 
82
- Example of generated prompts:
83
  ![constrastive search](./constrastive_search.png)
84
 
 
85
 
86
- ## Greedy Search
87
-
88
- Replace `output` with
89
-
90
  ```python
91
- output = model.generate(input_ids, do_sample=True, temperature=temperature, top_k=top_k, max_length=max_length, num_return_sequences=num_return_sequences, early_stopping=True)
92
  ```
93
 
94
- Example of generated prompts:
95
- ![greedy search](./greedy_search.png)
 
79
  print('\033[92m' + tokenizer.decode(output[i], skip_special_tokens=True) + '\033[0m\n')
80
  ```
81
 
82
+ No comma style:
83
  ![constrastive search](./constrastive_search.png)
84
 
85
+ <br>
86
 
87
+ To bring back the commas, assign output without penalty_alpha:
 
 
 
88
  ```python
89
+ output = model.generate(input_ids, do_sample=True, temperature=temperature, top_k=top_k, max_length=max_length, num_return_sequences=num_return_sequences, repetition_penalty=repitition_penalty, no_repeat_ngram_size=1, early_stopping=True)
90
  ```
91
 
92
+ ![constrastive search](./contrastive_comma_style.png)