satisfy compiler
This commit is contained in:
parent
01e61bf0a4
commit
e29fc9e32a
|
@ -31,6 +31,7 @@ pub async fn run(
|
||||||
typical_p: Option<f32>,
|
typical_p: Option<f32>,
|
||||||
repetition_penalty: Option<f32>,
|
repetition_penalty: Option<f32>,
|
||||||
frequency_penalty: Option<f32>,
|
frequency_penalty: Option<f32>,
|
||||||
|
no_repeat_ngram_size: Option<u32>,
|
||||||
watermark: bool,
|
watermark: bool,
|
||||||
do_sample: bool,
|
do_sample: bool,
|
||||||
client: ShardedClient,
|
client: ShardedClient,
|
||||||
|
@ -44,6 +45,7 @@ pub async fn run(
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: repetition_penalty.unwrap_or(1.0),
|
repetition_penalty: repetition_penalty.unwrap_or(1.0),
|
||||||
frequency_penalty: frequency_penalty.unwrap_or(0.0),
|
frequency_penalty: frequency_penalty.unwrap_or(0.0),
|
||||||
|
no_repeat_ngram_size: no_repeat_ngram_size.unwrap_or(0),
|
||||||
watermark,
|
watermark,
|
||||||
grammar: String::new(),
|
grammar: String::new(),
|
||||||
grammar_type: GrammarType::None as i32,
|
grammar_type: GrammarType::None as i32,
|
||||||
|
@ -145,6 +147,7 @@ pub async fn run(
|
||||||
typical_p,
|
typical_p,
|
||||||
repetition_penalty,
|
repetition_penalty,
|
||||||
frequency_penalty,
|
frequency_penalty,
|
||||||
|
no_repeat_ngram_size,
|
||||||
watermark,
|
watermark,
|
||||||
do_sample,
|
do_sample,
|
||||||
);
|
);
|
||||||
|
|
|
@ -89,6 +89,11 @@ struct Args {
|
||||||
#[clap(long, env)]
|
#[clap(long, env)]
|
||||||
frequency_penalty: Option<f32>,
|
frequency_penalty: Option<f32>,
|
||||||
|
|
||||||
|
/// Generation parameter in case you want to specifically test/debug particular
|
||||||
|
/// decoding strategies, for full doc refer to the `text-generation-server`
|
||||||
|
#[clap(long, env)]
|
||||||
|
no_repeat_ngram_size: Option<u32>,
|
||||||
|
|
||||||
/// Generation parameter in case you want to specifically test/debug particular
|
/// Generation parameter in case you want to specifically test/debug particular
|
||||||
/// decoding strategies, for full doc refer to the `text-generation-server`
|
/// decoding strategies, for full doc refer to the `text-generation-server`
|
||||||
#[clap(long, env)]
|
#[clap(long, env)]
|
||||||
|
@ -125,6 +130,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
typical_p,
|
typical_p,
|
||||||
repetition_penalty,
|
repetition_penalty,
|
||||||
frequency_penalty,
|
frequency_penalty,
|
||||||
|
no_repeat_ngram_size,
|
||||||
watermark,
|
watermark,
|
||||||
do_sample,
|
do_sample,
|
||||||
master_shard_uds_path,
|
master_shard_uds_path,
|
||||||
|
@ -196,6 +202,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
typical_p,
|
typical_p,
|
||||||
repetition_penalty,
|
repetition_penalty,
|
||||||
frequency_penalty,
|
frequency_penalty,
|
||||||
|
no_repeat_ngram_size,
|
||||||
watermark,
|
watermark,
|
||||||
do_sample,
|
do_sample,
|
||||||
sharded_client,
|
sharded_client,
|
||||||
|
|
|
@ -143,6 +143,7 @@ impl Client {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 1.2,
|
repetition_penalty: 1.2,
|
||||||
frequency_penalty: 0.1,
|
frequency_penalty: 0.1,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: true,
|
watermark: true,
|
||||||
grammar: String::new(),
|
grammar: String::new(),
|
||||||
grammar_type: GrammarType::None as i32,
|
grammar_type: GrammarType::None as i32,
|
||||||
|
|
|
@ -228,6 +228,7 @@ impl Health for ShardedClient {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 1.0,
|
repetition_penalty: 1.0,
|
||||||
frequency_penalty: 0.0,
|
frequency_penalty: 0.0,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: false,
|
watermark: false,
|
||||||
grammar: String::new(),
|
grammar: String::new(),
|
||||||
grammar_type: GrammarType::None as i32,
|
grammar_type: GrammarType::None as i32,
|
||||||
|
|
|
@ -166,6 +166,7 @@ impl Client {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 1.2,
|
repetition_penalty: 1.2,
|
||||||
frequency_penalty: 0.1,
|
frequency_penalty: 0.1,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: true,
|
watermark: true,
|
||||||
grammar: String::new(),
|
grammar: String::new(),
|
||||||
grammar_type: GrammarType::None as i32,
|
grammar_type: GrammarType::None as i32,
|
||||||
|
|
|
@ -231,6 +231,7 @@ impl Health for ShardedClient {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 1.0,
|
repetition_penalty: 1.0,
|
||||||
frequency_penalty: 0.0,
|
frequency_penalty: 0.0,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: false,
|
watermark: false,
|
||||||
grammar: String::new(),
|
grammar: String::new(),
|
||||||
grammar_type: GrammarType::None as i32,
|
grammar_type: GrammarType::None as i32,
|
||||||
|
|
|
@ -377,6 +377,7 @@ impl From<ValidParameters> for NextTokenChooserParameters {
|
||||||
seed: value.seed,
|
seed: value.seed,
|
||||||
repetition_penalty: value.repetition_penalty,
|
repetition_penalty: value.repetition_penalty,
|
||||||
frequency_penalty: value.frequency_penalty,
|
frequency_penalty: value.frequency_penalty,
|
||||||
|
no_repeat_ngram_size: value.no_repeat_ngram_size,
|
||||||
watermark: value.watermark,
|
watermark: value.watermark,
|
||||||
grammar,
|
grammar,
|
||||||
grammar_type: grammar_type.into(),
|
grammar_type: grammar_type.into(),
|
||||||
|
@ -420,6 +421,7 @@ mod tests {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 0.0,
|
repetition_penalty: 0.0,
|
||||||
frequency_penalty: 0.0,
|
frequency_penalty: 0.0,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: false,
|
watermark: false,
|
||||||
grammar: None,
|
grammar: None,
|
||||||
},
|
},
|
||||||
|
|
|
@ -440,6 +440,7 @@ impl From<ValidParameters> for NextTokenChooserParameters {
|
||||||
seed: value.seed,
|
seed: value.seed,
|
||||||
repetition_penalty: value.repetition_penalty,
|
repetition_penalty: value.repetition_penalty,
|
||||||
frequency_penalty: value.frequency_penalty,
|
frequency_penalty: value.frequency_penalty,
|
||||||
|
no_repeat_ngram_size: value.no_repeat_ngram_size,
|
||||||
watermark: value.watermark,
|
watermark: value.watermark,
|
||||||
grammar,
|
grammar,
|
||||||
grammar_type: grammar_type.into(),
|
grammar_type: grammar_type.into(),
|
||||||
|
@ -483,6 +484,7 @@ mod tests {
|
||||||
seed: 0,
|
seed: 0,
|
||||||
repetition_penalty: 0.0,
|
repetition_penalty: 0.0,
|
||||||
frequency_penalty: 0.0,
|
frequency_penalty: 0.0,
|
||||||
|
no_repeat_ngram_size: 0,
|
||||||
watermark: false,
|
watermark: false,
|
||||||
grammar: None,
|
grammar: None,
|
||||||
},
|
},
|
||||||
|
|
|
@ -200,6 +200,7 @@ impl Validation {
|
||||||
temperature,
|
temperature,
|
||||||
repetition_penalty,
|
repetition_penalty,
|
||||||
frequency_penalty,
|
frequency_penalty,
|
||||||
|
no_repeat_ngram_size,
|
||||||
top_k,
|
top_k,
|
||||||
top_p,
|
top_p,
|
||||||
typical_p,
|
typical_p,
|
||||||
|
@ -243,6 +244,8 @@ impl Validation {
|
||||||
return Err(ValidationError::FrequencyPenalty);
|
return Err(ValidationError::FrequencyPenalty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let no_repeat_ngram_size = no_repeat_ngram_size.unwrap_or(0);
|
||||||
|
|
||||||
// Different because the proto default value is not a valid value
|
// Different because the proto default value is not a valid value
|
||||||
// for the user
|
// for the user
|
||||||
let top_p = top_p
|
let top_p = top_p
|
||||||
|
@ -370,6 +373,7 @@ impl Validation {
|
||||||
temperature,
|
temperature,
|
||||||
repetition_penalty,
|
repetition_penalty,
|
||||||
frequency_penalty,
|
frequency_penalty,
|
||||||
|
no_repeat_ngram_size,
|
||||||
top_k,
|
top_k,
|
||||||
top_p,
|
top_p,
|
||||||
typical_p,
|
typical_p,
|
||||||
|
|
Loading…
Reference in New Issue