parent
f58085b812
commit
59185abfd9
|
@ -93,6 +93,7 @@ enum TokenizerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
struct RequestParams {
|
struct RequestParams {
|
||||||
max_new_tokens: u32,
|
max_new_tokens: u32,
|
||||||
temperature: f32,
|
temperature: f32,
|
||||||
|
@ -208,6 +209,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
struct AcceptedCompletion {
|
struct AcceptedCompletion {
|
||||||
request_id: Uuid,
|
request_id: Uuid,
|
||||||
accepted_completion: u32,
|
accepted_completion: u32,
|
||||||
|
@ -215,12 +217,14 @@ struct AcceptedCompletion {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
struct RejectedCompletion {
|
struct RejectedCompletion {
|
||||||
request_id: Uuid,
|
request_id: Uuid,
|
||||||
shown_completions: Vec<u32>,
|
shown_completions: Vec<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
struct CompletionParams {
|
struct CompletionParams {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
text_document_position: TextDocumentPositionParams,
|
text_document_position: TextDocumentPositionParams,
|
||||||
|
|
|
@ -7,10 +7,10 @@ fim:
|
||||||
suffix: <fim_suffix>
|
suffix: <fim_suffix>
|
||||||
model: bigcode/starcoder
|
model: bigcode/starcoder
|
||||||
request_params:
|
request_params:
|
||||||
max_new_tokens: 150
|
maxNewTokens: 150
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
do_sample: true
|
doSample: true
|
||||||
top_p: 0.95
|
topP: 0.95
|
||||||
tls_skip_verify_insecure: false
|
tls_skip_verify_insecure: false
|
||||||
tokenizer_config:
|
tokenizer_config:
|
||||||
repository: bigcode/starcoder
|
repository: bigcode/starcoder
|
||||||
|
|
|
@ -7,10 +7,10 @@ fim:
|
||||||
suffix: <fim_suffix>
|
suffix: <fim_suffix>
|
||||||
model: bigcode/starcoder
|
model: bigcode/starcoder
|
||||||
request_params:
|
request_params:
|
||||||
max_new_tokens: 150
|
maxNewTokens: 150
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
do_sample: true
|
doSample: true
|
||||||
top_p: 0.95
|
topP: 0.95
|
||||||
tls_skip_verify_insecure: false
|
tls_skip_verify_insecure: false
|
||||||
tokenizer_config:
|
tokenizer_config:
|
||||||
repository: bigcode/starcoder
|
repository: bigcode/starcoder
|
||||||
|
|
|
@ -14,6 +14,7 @@ impl Request for GetCompletions {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
pub(crate) struct RequestParams {
|
pub(crate) struct RequestParams {
|
||||||
pub(crate) max_new_tokens: u32,
|
pub(crate) max_new_tokens: u32,
|
||||||
pub(crate) temperature: f32,
|
pub(crate) temperature: f32,
|
||||||
|
@ -60,6 +61,7 @@ pub(crate) enum TokenizerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
pub(crate) struct GetCompletionsParams {
|
pub(crate) struct GetCompletionsParams {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub(crate) text_document_position: TextDocumentPositionParams,
|
pub(crate) text_document_position: TextDocumentPositionParams,
|
||||||
|
|
Loading…
Reference in a new issue