cahya commited on
Commit
faf39cc
1 Parent(s): bf32a4d

update the generate param

Browse files
Files changed (1) hide show
  1. app/api.py +4 -4
app/api.py CHANGED
@@ -72,14 +72,14 @@ async def indochat(
72
  text: str = Form(default="", description="The Prompt"),
73
  max_length: int = Form(default=250, description="Maximal length of the generated text"),
74
  do_sample: bool = Form(default=True, description="Whether to use sampling; use greedy decoding otherwise"),
75
- top_k: int = Form(default=50, description="The number of highest probability vocabulary tokens to keep "
76
  "for top-k-filtering"),
77
  top_p: float = Form(default=0.95, description="If set to float < 1, only the most probable tokens with "
78
  "probabilities that add up to top_p or higher are kept "
79
  "for generation"),
80
- temperature: float = Form(default=1.0, description="The Temperature of the softmax distribution"),
81
- penalty_alpha: float = Form(default=0.6, description="Penalty alpha"),
82
- repetition_penalty: float = Form(default=1.0, description="Repetition penalty"),
83
  seed: int = Form(default=42, description="Random Seed"),
84
  max_time: float = Form(default=60.0, description="Maximal time in seconds to generate the text")
85
  ):
 
72
  text: str = Form(default="", description="The Prompt"),
73
  max_length: int = Form(default=250, description="Maximal length of the generated text"),
74
  do_sample: bool = Form(default=True, description="Whether to use sampling; use greedy decoding otherwise"),
75
+ top_k: int = Form(default=30, description="The number of highest probability vocabulary tokens to keep "
76
  "for top-k-filtering"),
77
  top_p: float = Form(default=0.95, description="If set to float < 1, only the most probable tokens with "
78
  "probabilities that add up to top_p or higher are kept "
79
  "for generation"),
80
+ temperature: float = Form(default=0.5, description="The Temperature of the softmax distribution"),
81
+ penalty_alpha: float = Form(default=0.0, description="Penalty alpha"),
82
+ repetition_penalty: float = Form(default=1.2, description="Repetition penalty"),
83
  seed: int = Form(default=42, description="Random Seed"),
84
  max_time: float = Form(default=60.0, description="Maximal time in seconds to generate the text")
85
  ):