fix: default max_new_tokens to 100
This commit is contained in:
parent
88aae2595d
commit
28821bfd5d
|
@ -523,7 +523,7 @@
|
||||||
"max_new_tokens": {
|
"max_new_tokens": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"default": "null",
|
"default": "20",
|
||||||
"example": "20",
|
"example": "20",
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"minimum": 0
|
"minimum": 0
|
||||||
|
|
|
@ -107,7 +107,7 @@ pub(crate) struct GenerateParameters {
|
||||||
#[schema(default = "false", example = true)]
|
#[schema(default = "false", example = true)]
|
||||||
pub do_sample: bool,
|
pub do_sample: bool,
|
||||||
#[serde(default = "default_max_new_tokens")]
|
#[serde(default = "default_max_new_tokens")]
|
||||||
#[schema(nullable = true, default = "null", example = "20")]
|
#[schema(nullable = true, default = "100", example = "20")]
|
||||||
pub max_new_tokens: Option<u32>,
|
pub max_new_tokens: Option<u32>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[schema(nullable = true, default = "null", example = false)]
|
#[schema(nullable = true, default = "null", example = false)]
|
||||||
|
@ -141,7 +141,7 @@ pub(crate) struct GenerateParameters {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_max_new_tokens() -> Option<u32> {
|
fn default_max_new_tokens() -> Option<u32> {
|
||||||
None
|
Some(100)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_parameters() -> GenerateParameters {
|
fn default_parameters() -> GenerateParameters {
|
||||||
|
|
Loading…
Reference in New Issue