vpcom commited on
Commit
e01e402
·
1 Parent(s): bb83f17

fix: no hyperparams

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -584,14 +584,15 @@ def generate(
584
  temperature = 1e-2
585
  top_p = float(top_p)
586
  generate_kwargs = dict(
587
- temperature=temperature,
588
  max_new_tokens=max_new_tokens,
589
- top_p=top_p,
590
- repetition_penalty=repetition_penalty,
 
591
  stop_sequences=stop_sequences,
592
  do_sample=True,
593
  #best_of=2,
594
- top_k=top_k,
595
  #typical_p=0.9,
596
  #seed=seed,
597
  )
@@ -648,7 +649,7 @@ additional_inputs=[
648
  gr.Slider(
649
  label="Top-p (nucleus sampling)",
650
  value=None,
651
- minimum=0.0,
652
  maximum=1,
653
  step=0.05,
654
  interactive=True,
@@ -657,7 +658,7 @@ additional_inputs=[
657
  gr.Slider(
658
  label="Top-k",
659
  value=None,
660
- minimum=0.0,
661
  maximum=1000,
662
  step=1,
663
  interactive=True,
@@ -666,7 +667,7 @@ additional_inputs=[
666
  gr.Slider(
667
  label="Repetition penalty",
668
  value=None,
669
- minimum=1.0,
670
  maximum=2.0,
671
  step=0.05,
672
  interactive=True,
 
584
  temperature = 1e-2
585
  top_p = float(top_p)
586
  generate_kwargs = dict(
587
+ # temperature=temperature,
588
  max_new_tokens=max_new_tokens,
589
+ # top_p=top_p,
590
+ # repetition_penalty=repetition_penalty,
591
+ # top_k=top_k,
592
  stop_sequences=stop_sequences,
593
  do_sample=True,
594
  #best_of=2,
595
+
596
  #typical_p=0.9,
597
  #seed=seed,
598
  )
 
649
  gr.Slider(
650
  label="Top-p (nucleus sampling)",
651
  value=None,
652
+ minimum=0.6,
653
  maximum=1,
654
  step=0.05,
655
  interactive=True,
 
658
  gr.Slider(
659
  label="Top-k",
660
  value=None,
661
+ minimum=100,
662
  maximum=1000,
663
  step=1,
664
  interactive=True,
 
667
  gr.Slider(
668
  label="Repetition penalty",
669
  value=None,
670
+ minimum=1.0001,
671
  maximum=2.0,
672
  step=0.05,
673
  interactive=True,