Spaces:
Sleeping
Sleeping
Amitontheweb
commited on
Commit
•
709b944
1
Parent(s):
b7b789a
Update app.py
Browse files
app.py
CHANGED
@@ -432,13 +432,13 @@ with gr.Blocks() as demo:
|
|
432 |
|
433 |
|
434 |
### 1. Greedy Search:
|
435 |
-
|
436 |
|
437 |
-
In this illustrative example, since "!" has the highest probability, a greedy strategy will output: Today is a rainy day!
|
438 |
|
439 |
|
440 |
### 2. Random Sampling:
|
441 |
-
Picks up any random path or trail to
|
442 |
|
443 |
*Temperature* - Increasing the temperature allows words with lesser probabilities to show up in the output. At ```temperature = 0```, search becomes 'greedy' for words with high probabilities.
|
444 |
|
|
|
432 |
|
433 |
|
434 |
### 1. Greedy Search:
|
435 |
+
Picks up the next word/token carrying the highest probability score. The most well trodden path. Default for GPT2.
|
436 |
|
437 |
+
In this illustrative example, since "!" has the highest probability score, a greedy strategy will output: Today is a rainy day!
|
438 |
|
439 |
|
440 |
### 2. Random Sampling:
|
441 |
+
Picks up any random path or trail of tokens to traverse and continue the input. To turn sampling on, use ```do_sample=True```
|
442 |
|
443 |
*Temperature* - Increasing the temperature allows words with lesser probabilities to show up in the output. At ```temperature = 0```, search becomes 'greedy' for words with high probabilities.
|
444 |
|