Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -440,7 +440,7 @@ with gr.Blocks() as demo:
|
|
440 |
### 2. Random Sampling:
|
441 |
Picks up any random path or trail to walk on. Use ```do_sample=True```
|
442 |
|
443 |
-
*Temperature* - Increasing the temperature allows words with lesser probabilities to show up in the output. At
|
444 |
|
445 |
*Top_K*: Creates a small list of paths [tokens or words] to choose from. In the above example, if set to 2, only Option 1 and 3 - the two top ranking tokens in terms of probabilities, will be available for random sampling.
|
446 |
|
@@ -452,7 +452,7 @@ with gr.Blocks() as demo:
|
|
452 |
### 3. Simple Beam search:
|
453 |
Selects the branches (beams) going towards other heavy laden branch of fruits, to find the heaviest set among the branches in all. Akin to greedy search, but finds the total heaviest or largest route.
|
454 |
|
455 |
-
If num_beams = 2
|
456 |
|
457 |
*Early Stopping*: Makes the search stop when a pre-determined criteria for ending the search is satisfied.
|
458 |
|
@@ -466,7 +466,7 @@ with gr.Blocks() as demo:
|
|
466 |
### 5. Contrastive search:
|
467 |
Uses the entire input context to create more interesting outputs.
|
468 |
|
469 |
-
*Penalty Alpha*: When
|
470 |
|
471 |
Refer: https://huggingface.co/blog/introducing-csearch
|
472 |
|
|
|
440 |
### 2. Random Sampling:
|
441 |
Picks up any random path or trail to walk 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 |
|
445 |
*Top_K*: Creates a small list of paths [tokens or words] to choose from. In the above example, if set to 2, only Option 1 and 3 - the two top ranking tokens in terms of probabilities, will be available for random sampling.
|
446 |
|
|
|
452 |
### 3. Simple Beam search:
|
453 |
Selects the branches (beams) going towards other heavy laden branch of fruits, to find the heaviest set among the branches in all. Akin to greedy search, but finds the total heaviest or largest route.
|
454 |
|
455 |
+
If ```num_beams = 2```, every branch will divide into the top two scoring tokens at each step, and so on till the search ends.
|
456 |
|
457 |
*Early Stopping*: Makes the search stop when a pre-determined criteria for ending the search is satisfied.
|
458 |
|
|
|
466 |
### 5. Contrastive search:
|
467 |
Uses the entire input context to create more interesting outputs.
|
468 |
|
469 |
+
*Penalty Alpha*: When ```penalty_alpha=0```, search becomes greedy.
|
470 |
|
471 |
Refer: https://huggingface.co/blog/introducing-csearch
|
472 |
|