From 7cc18e85b5e8ed4b2ea8215877d22c9eab4e3c64 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 23 Sep 2024 22:00:59 +0200 Subject: [PATCH 01/16] Cleanup Vertex + Chat --- router/src/lib.rs | 110 ++++++++++---- router/src/server.rs | 313 ++------------------------------------ router/src/vertex.rs | 353 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 447 insertions(+), 329 deletions(-) create mode 100644 router/src/vertex.rs diff --git a/router/src/lib.rs b/router/src/lib.rs index ad8924df0c5..523c4ea4705 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -9,7 +9,10 @@ mod kserve; pub mod logging; pub mod usage_stats; +mod vertex; +use crate::infer::{Infer, InferError}; +use crate::server::prepare_chat_input; use serde::{Deserialize, Serialize}; use tracing::warn; use utoipa::ToSchema; @@ -54,32 +57,6 @@ impl std::str::FromStr for Attention { } } -#[derive(Clone, Deserialize, ToSchema)] -pub(crate) struct GenerateVertexInstance { - #[schema(example = "What is Deep Learning?")] - pub inputs: String, - #[schema(nullable = true, default = "null", example = "null")] - pub parameters: Option, -} - -#[derive(Clone, Deserialize, ToSchema)] -#[serde(untagged)] -enum VertexInstance { - Generate(GenerateVertexInstance), - Chat(ChatRequest), -} - -#[derive(Deserialize, ToSchema)] -pub(crate) struct VertexRequest { - #[serde(rename = "instances")] - pub instances: Vec, -} - -#[derive(Clone, Deserialize, ToSchema, Serialize)] -pub(crate) struct VertexResponse { - pub predictions: Vec, -} - /// Hub type #[derive(Clone, Debug, Deserialize)] pub struct HubModelInfo { @@ -174,6 +151,7 @@ impl HubProcessorConfig { } #[derive(Clone, Debug, Deserialize, ToSchema, Serialize)] +#[cfg_attr(test, derive(PartialEq))] #[serde(tag = "type", content = "value")] pub(crate) enum GrammarType { /// A string that represents a [JSON Schema](https://json-schema.org/). @@ -230,6 +208,7 @@ pub struct Info { } #[derive(Clone, Debug, Deserialize, ToSchema, Default)] +#[cfg_attr(test, derive(PartialEq))] pub(crate) struct GenerateParameters { /// Generate best_of sequences and return the one if the highest token logprobs. #[serde(default)] @@ -774,6 +753,7 @@ impl ChatCompletionChunk { } #[derive(Clone, Deserialize, ToSchema, Serialize)] +#[cfg_attr(test, derive(Debug, PartialEq, Default))] pub(crate) struct ChatRequest { #[schema(example = "mistralai/Mistral-7B-Instruct-v0.2")] /// [UNUSED] ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API. @@ -802,7 +782,7 @@ pub(crate) struct ChatRequest { /// output token returned in the content of message. #[serde(default)] #[schema(example = "false")] - pub logprobs: Option, + pub logprobs: bool, /// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with /// an associated log probability. logprobs must be set to true if this parameter is used. @@ -890,7 +870,82 @@ pub(crate) struct ChatRequest { pub stream_options: Option, } +impl ChatRequest { + fn try_into_generate(self, infer: &Infer) -> Result<(GenerateRequest, bool), InferError> { + let ChatRequest { + model, + max_tokens, + messages, + seed, + stop, + stream, + tools, + tool_choice, + tool_prompt, + temperature, + response_format, + guideline, + presence_penalty, + frequency_penalty, + top_p, + top_logprobs, + .. + } = self; + + let repetition_penalty = presence_penalty.map(|x| x + 2.0); + let max_new_tokens = max_tokens.or(Some(100)); + let tool_prompt = tool_prompt + .filter(|s| !s.is_empty()) + .unwrap_or_else(default_tool_prompt); + let stop = stop.unwrap_or_default(); + // enable greedy only when temperature is 0 + let (do_sample, temperature) = match temperature { + Some(temperature) if temperature == 0.0 => (false, None), + other => (true, other), + }; + let (inputs, grammar, using_tools) = prepare_chat_input( + infer, + response_format, + tools, + tool_choice, + &tool_prompt, + guideline, + messages, + )?; + + Ok(( + GenerateRequest { + inputs: inputs.to_string(), + add_special_tokens: false, + parameters: GenerateParameters { + best_of: None, + temperature, + repetition_penalty, + frequency_penalty, + top_k: None, + top_p, + typical_p: None, + do_sample, + max_new_tokens, + return_full_text: None, + stop, + truncate: None, + watermark: false, + details: true, + decoder_input_details: !stream, + seed, + top_n_tokens: top_logprobs, + grammar, + adapter_id: model.filter(|m| *m != "tgi").map(String::from), + }, + }, + using_tools, + )) + } +} + #[derive(Clone, Deserialize, ToSchema, Serialize)] +#[cfg_attr(test, derive(Debug, PartialEq))] struct StreamOptions { /// If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value. #[schema(example = "true")] @@ -984,6 +1039,7 @@ pub(crate) struct FunctionDefinition { } #[derive(Clone, Debug, Deserialize, Serialize, ToSchema)] +#[cfg_attr(test, derive(PartialEq))] pub(crate) struct Tool { // The type of the tool. Currently, only 'function' is supported. #[schema(example = "function")] diff --git a/router/src/server.rs b/router/src/server.rs index 32c86e0f392..8642bb8819a 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -8,7 +8,8 @@ use crate::kserve::{ kserve_model_metadata, kserve_model_metadata_ready, }; use crate::validation::ValidationError; -use crate::{default_tool_prompt, ChatTokenizeResponse, VertexInstance}; +use crate::vertex::vertex_compatibility; +use crate::ChatTokenizeResponse; use crate::{ usage_stats, BestOfSequence, Details, ErrorResponse, FinishReason, FunctionName, GenerateParameters, GenerateRequest, GenerateResponse, GrammarType, HubModelInfo, @@ -20,8 +21,7 @@ use crate::{ ChatCompletion, ChatCompletionChoice, ChatCompletionChunk, ChatCompletionComplete, ChatCompletionDelta, ChatCompletionLogprob, ChatCompletionLogprobs, ChatCompletionTopLogprob, ChatRequest, Chunk, CompatGenerateRequest, Completion, CompletionComplete, CompletionFinal, - CompletionRequest, CompletionType, DeltaToolCall, Function, Prompt, Tool, VertexRequest, - VertexResponse, + CompletionRequest, CompletionType, DeltaToolCall, Function, Prompt, Tool, }; use crate::{FunctionDefinition, HubPreprocessorConfig, ToolCall, ToolChoice, ToolType}; use crate::{ModelInfo, ModelsInfo}; @@ -149,63 +149,11 @@ async fn openai_get_model_info(info: Extension) -> Json { )] async fn get_chat_tokenize( Extension(infer): Extension, - Json(req): Json, + Json(chat): Json, ) -> Result<(HeaderMap, Json), (StatusCode, Json)> { metrics::counter!("tgi_request_count").increment(1); - let ChatRequest { - model, - max_tokens, - messages, - seed, - stop, - stream, - tools, - tool_choice, - tool_prompt, - temperature, - response_format, - guideline, - .. - } = req; - - let tool_prompt = tool_prompt.unwrap_or_default(); - let (inputs, _grammar, _using_tools) = prepare_chat_input( - &infer, - response_format, - tools, - tool_choice, - &tool_prompt, - guideline, - messages, - )?; - - let generate_request = GenerateRequest { - inputs, - add_special_tokens: false, - parameters: GenerateParameters { - best_of: None, - temperature, - repetition_penalty: None, - frequency_penalty: None, - top_k: None, - top_p: None, - typical_p: None, - do_sample: true, - max_new_tokens: max_tokens, - return_full_text: None, - stop: stop.unwrap_or_default(), - truncate: None, - watermark: false, - details: false, - decoder_input_details: !stream, - seed, - top_n_tokens: None, - grammar: _grammar, - adapter_id: model.as_ref().filter(|m| *m != "tgi").map(String::from), - }, - }; - + let generate_request: GenerateRequest = chat.try_into_generate(&infer)?.0; let input = generate_request.inputs.clone(); let encoding = infer.tokenize(generate_request).await?; if let Some(encoding) = encoding { @@ -1162,77 +1110,18 @@ async fn chat_completions( Extension(infer): Extension, Extension(compute_type): Extension, Extension(info): Extension, - Json(req): Json, + Json(chat): Json, ) -> Result)> { let span = tracing::Span::current(); metrics::counter!("tgi_request_count").increment(1); let ChatRequest { - model, - logprobs, - max_tokens, - messages, - presence_penalty, - seed, - stop, stream, stream_options, - tools, - tool_choice, - tool_prompt, - temperature, - response_format, - guideline, + logprobs, .. - } = req; - - let repetition_penalty = presence_penalty.map(|x| x + 2.0); - let max_new_tokens = max_tokens.or(Some(100)); - let logprobs = logprobs.unwrap_or(false); - let tool_prompt = tool_prompt - .filter(|s| !s.is_empty()) - .unwrap_or_else(default_tool_prompt); - let stop = stop.unwrap_or_default(); - // enable greedy only when temperature is 0 - let (do_sample, temperature) = match temperature { - Some(temperature) if temperature == 0.0 => (false, None), - other => (true, other), - }; - let (inputs, grammar, using_tools) = prepare_chat_input( - &infer, - response_format, - tools, - tool_choice, - &tool_prompt, - guideline, - messages, - )?; - - // build the request passing some parameters - let generate_request = GenerateRequest { - inputs: inputs.to_string(), - add_special_tokens: false, - parameters: GenerateParameters { - best_of: None, - temperature, - repetition_penalty, - frequency_penalty: req.frequency_penalty, - top_k: None, - top_p: req.top_p, - typical_p: None, - do_sample, - max_new_tokens, - return_full_text: None, - stop, - truncate: None, - watermark: false, - details: true, - decoder_input_details: !stream, - seed, - top_n_tokens: req.top_logprobs, - grammar, - adapter_id: model.filter(|m| *m != "tgi").map(String::from), - }, - }; + } = chat.clone(); + let (generate_request, using_tools): (GenerateRequest, bool) = + chat.try_into_generate(&infer)?; // static values that will be returned in all cases let model_id = info.model_id.clone(); @@ -1385,186 +1274,6 @@ async fn chat_completions( } } -/// Generate tokens from Vertex request -#[utoipa::path( -post, -tag = "Text Generation Inference", -path = "/vertex", -request_body = VertexRequest, -responses( -(status = 200, description = "Generated Text", body = VertexResponse), -(status = 424, description = "Generation Error", body = ErrorResponse, -example = json ! ({"error": "Request failed during generation"})), -(status = 429, description = "Model is overloaded", body = ErrorResponse, -example = json ! ({"error": "Model is overloaded"})), -(status = 422, description = "Input validation error", body = ErrorResponse, -example = json ! ({"error": "Input validation error"})), -(status = 500, description = "Incomplete generation", body = ErrorResponse, -example = json ! ({"error": "Incomplete generation"})), -) -)] -#[instrument( - skip_all, - fields( - total_time, - validation_time, - queue_time, - inference_time, - time_per_token, - seed, - ) -)] -async fn vertex_compatibility( - Extension(infer): Extension, - Extension(compute_type): Extension, - Json(req): Json, -) -> Result)> { - let span = tracing::Span::current(); - metrics::counter!("tgi_request_count").increment(1); - - // check that theres at least one instance - if req.instances.is_empty() { - return Err(( - StatusCode::UNPROCESSABLE_ENTITY, - Json(ErrorResponse { - error: "Input validation error".to_string(), - error_type: "Input validation error".to_string(), - }), - )); - } - - // Prepare futures for all instances - let mut futures = Vec::with_capacity(req.instances.len()); - - for instance in req.instances.iter() { - let generate_request = match instance { - VertexInstance::Generate(instance) => GenerateRequest { - inputs: instance.inputs.clone(), - add_special_tokens: true, - parameters: GenerateParameters { - do_sample: true, - max_new_tokens: instance.parameters.as_ref().and_then(|p| p.max_new_tokens), - seed: instance.parameters.as_ref().and_then(|p| p.seed), - details: true, - decoder_input_details: true, - ..Default::default() - }, - }, - VertexInstance::Chat(instance) => { - let ChatRequest { - model, - max_tokens, - messages, - seed, - stop, - stream, - tools, - tool_choice, - tool_prompt, - temperature, - response_format, - guideline, - presence_penalty, - frequency_penalty, - top_p, - top_logprobs, - .. - } = instance.clone(); - - let repetition_penalty = presence_penalty.map(|x| x + 2.0); - let max_new_tokens = max_tokens.or(Some(100)); - let tool_prompt = tool_prompt - .filter(|s| !s.is_empty()) - .unwrap_or_else(default_tool_prompt); - let stop = stop.unwrap_or_default(); - // enable greedy only when temperature is 0 - let (do_sample, temperature) = match temperature { - Some(temperature) if temperature == 0.0 => (false, None), - other => (true, other), - }; - let (inputs, grammar, _using_tools) = match prepare_chat_input( - &infer, - response_format, - tools, - tool_choice, - &tool_prompt, - guideline, - messages, - ) { - Ok(result) => result, - Err(e) => { - return Err(( - StatusCode::BAD_REQUEST, - Json(ErrorResponse { - error: format!("Failed to prepare chat input: {}", e), - error_type: "Input preparation error".to_string(), - }), - )); - } - }; - - GenerateRequest { - inputs: inputs.to_string(), - add_special_tokens: false, - parameters: GenerateParameters { - best_of: None, - temperature, - repetition_penalty, - frequency_penalty, - top_k: None, - top_p, - typical_p: None, - do_sample, - max_new_tokens, - return_full_text: None, - stop, - truncate: None, - watermark: false, - details: true, - decoder_input_details: !stream, - seed, - top_n_tokens: top_logprobs, - grammar, - adapter_id: model.filter(|m| *m != "tgi").map(String::from), - }, - } - } - }; - - let infer_clone = infer.clone(); - let compute_type_clone = compute_type.clone(); - let span_clone = span.clone(); - - futures.push(async move { - generate_internal( - Extension(infer_clone), - compute_type_clone, - Json(generate_request), - span_clone, - ) - .await - .map(|(_, Json(generation))| generation.generated_text) - .map_err(|_| { - ( - StatusCode::INTERNAL_SERVER_ERROR, - Json(ErrorResponse { - error: "Incomplete generation".into(), - error_type: "Incomplete generation".into(), - }), - ) - }) - }); - } - - // execute all futures in parallel, collect results, returning early if any error occurs - let results = futures::future::join_all(futures).await; - let predictions: Result, _> = results.into_iter().collect(); - let predictions = predictions?; - - let response = VertexResponse { predictions }; - Ok((HeaderMap::new(), Json(response)).into_response()) -} - /// Tokenize inputs #[utoipa::path( post, @@ -2637,7 +2346,7 @@ pub enum WebServerError { type PreparedInput = (String, Option, bool); -fn prepare_chat_input( +pub(crate) fn prepare_chat_input( infer: &Infer, response_format: Option, tools: Option>, diff --git a/router/src/vertex.rs b/router/src/vertex.rs new file mode 100644 index 00000000000..a8f7804e80c --- /dev/null +++ b/router/src/vertex.rs @@ -0,0 +1,353 @@ +use crate::infer::Infer; +use crate::server::{generate_internal, ComputeType}; +use crate::{ + ChatRequest, ErrorResponse, GenerateParameters, GenerateRequest, GrammarType, Message, + StreamOptions, Tool, ToolChoice, +}; +use axum::extract::Extension; +use axum::http::{HeaderMap, StatusCode}; +use axum::response::{IntoResponse, Response}; +use axum::Json; +use serde::{Deserialize, Serialize}; +use tracing::instrument; +use utoipa::ToSchema; + +#[derive(Clone, Deserialize, ToSchema)] +#[cfg_attr(test, derive(Debug, PartialEq))] +pub(crate) struct GenerateVertexInstance { + #[schema(example = "What is Deep Learning?")] + pub inputs: String, + #[schema(nullable = true, default = "null", example = "null")] + pub parameters: Option, +} + +#[derive(Clone, Deserialize, ToSchema)] +#[cfg_attr(test, derive(Debug, PartialEq))] +pub(crate) struct VertexChat { + messages: Vec, + // Messages is ignored there. + parameters: VertexParameters, +} + +#[derive(Clone, Deserialize, ToSchema, Serialize)] +#[cfg_attr(test, derive(Debug, PartialEq, Default))] +pub(crate) struct VertexParameters { + #[schema(example = "mistralai/Mistral-7B-Instruct-v0.2")] + /// [UNUSED] ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API. + pub model: Option, + + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, + /// decreasing the model's likelihood to repeat the same line verbatim. + #[serde(default)] + #[schema(example = "1.0")] + pub frequency_penalty: Option, + + /// UNUSED + /// Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens + /// (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, + /// the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, + /// but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should + /// result in a ban or exclusive selection of the relevant token. + #[serde(default)] + pub logit_bias: Option>, + + /// Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each + /// output token returned in the content of message. + #[serde(default)] + #[schema(example = "false")] + pub logprobs: bool, + + /// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with + /// an associated log probability. logprobs must be set to true if this parameter is used. + #[serde(default)] + #[schema(example = "5")] + pub top_logprobs: Option, + + /// The maximum number of tokens that can be generated in the chat completion. + #[serde(default)] + #[schema(example = "32")] + pub max_tokens: Option, + + /// UNUSED + /// How many chat completion choices to generate for each input message. Note that you will be charged based on the + /// number of generated tokens across all of the choices. Keep n as 1 to minimize costs. + #[serde(default)] + #[schema(nullable = true, example = "2")] + pub n: Option, + + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, + /// increasing the model's likelihood to talk about new topics + #[serde(default)] + #[schema(nullable = true, example = 0.1)] + pub presence_penalty: Option, + + /// Up to 4 sequences where the API will stop generating further tokens. + #[serde(default)] + #[schema(nullable = true, example = "null")] + pub stop: Option>, + + #[serde(default = "bool::default")] + pub stream: bool, + + #[schema(nullable = true, example = 42)] + pub seed: Option, + + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while + /// lower values like 0.2 will make it more focused and deterministic. + /// + /// We generally recommend altering this or `top_p` but not both. + #[serde(default)] + #[schema(nullable = true, example = 1.0)] + pub temperature: Option, + + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the + /// tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. + #[serde(default)] + #[schema(nullable = true, example = 0.95)] + pub top_p: Option, + + /// A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of + /// functions the model may generate JSON inputs for. + #[serde(default)] + #[schema(nullable = true, example = "null")] + pub tools: Option>, + + /// A prompt to be appended before the tools + #[serde(default)] + #[schema( + nullable = true, + example = "Given the functions available, please respond with a JSON for a function call with its proper arguments that best answers the given prompt. Respond in the format {name: function name, parameters: dictionary of argument name and its value}.Do not use variables." + )] + pub tool_prompt: Option, + + /// A specific tool to use. If not provided, the model will default to use any of the tools provided in the tools parameter. + #[serde(default)] + #[schema(nullable = true, example = "null")] + pub tool_choice: ToolChoice, + + /// Response format constraints for the generation. + /// + /// NOTE: A request can use `response_format` OR `tools` but not both. + #[serde(default)] + #[schema(nullable = true, default = "null", example = "null")] + pub response_format: Option, + + /// A guideline to be used in the chat_template + #[serde(default)] + #[schema(nullable = true, default = "null", example = "null")] + pub guideline: Option, + + /// Options for streaming response. Only set this when you set stream: true. + #[serde(default)] + #[schema(nullable = true, example = "null")] + pub stream_options: Option, +} + +impl From for ChatRequest { + fn from(val: VertexChat) -> Self { + Self { + messages: val.messages, + frequency_penalty: val.parameters.frequency_penalty, + guideline: val.parameters.guideline, + logit_bias: val.parameters.logit_bias, + logprobs: val.parameters.logprobs, + max_tokens: val.parameters.max_tokens, + model: val.parameters.model, + n: val.parameters.n, + presence_penalty: val.parameters.presence_penalty, + response_format: val.parameters.response_format, + seed: val.parameters.seed, + stop: val.parameters.stop, + stream_options: val.parameters.stream_options, + stream: val.parameters.stream, + temperature: val.parameters.temperature, + tool_choice: val.parameters.tool_choice, + tool_prompt: val.parameters.tool_prompt, + tools: val.parameters.tools, + top_logprobs: val.parameters.top_logprobs, + top_p: val.parameters.top_p, + } + } +} + +#[derive(Clone, Deserialize, ToSchema)] +#[cfg_attr(test, derive(Debug, PartialEq))] +#[serde(untagged)] +pub(crate) enum VertexInstance { + Generate(GenerateVertexInstance), + Chat(VertexChat), +} + +#[derive(Deserialize, ToSchema)] +#[cfg_attr(test, derive(Debug, PartialEq))] +pub(crate) struct VertexRequest { + #[serde(rename = "instances")] + pub instances: Vec, +} + +#[derive(Clone, Deserialize, ToSchema, Serialize)] +pub(crate) struct VertexResponse { + pub predictions: Vec, +} + +/// Generate tokens from Vertex request +#[utoipa::path( +post, +tag = "Text Generation Inference", +path = "/vertex", +request_body = VertexRequest, +responses( +(status = 200, description = "Generated Text", body = VertexResponse), +(status = 424, description = "Generation Error", body = ErrorResponse, +example = json ! ({"error": "Request failed during generation"})), +(status = 429, description = "Model is overloaded", body = ErrorResponse, +example = json ! ({"error": "Model is overloaded"})), +(status = 422, description = "Input validation error", body = ErrorResponse, +example = json ! ({"error": "Input validation error"})), +(status = 500, description = "Incomplete generation", body = ErrorResponse, +example = json ! ({"error": "Incomplete generation"})), +) +)] +#[instrument( + skip_all, + fields( + total_time, + validation_time, + queue_time, + inference_time, + time_per_token, + seed, + ) +)] +pub(crate) async fn vertex_compatibility( + Extension(infer): Extension, + Extension(compute_type): Extension, + Json(req): Json, +) -> Result)> { + let span = tracing::Span::current(); + metrics::counter!("tgi_request_count").increment(1); + + // check that theres at least one instance + if req.instances.is_empty() { + return Err(( + StatusCode::UNPROCESSABLE_ENTITY, + Json(ErrorResponse { + error: "Input validation error".to_string(), + error_type: "Input validation error".to_string(), + }), + )); + } + + // Prepare futures for all instances + let mut futures = Vec::with_capacity(req.instances.len()); + + for instance in req.instances.into_iter() { + let generate_request = match instance { + VertexInstance::Generate(instance) => GenerateRequest { + inputs: instance.inputs.clone(), + add_special_tokens: true, + parameters: GenerateParameters { + do_sample: true, + max_new_tokens: instance.parameters.as_ref().and_then(|p| p.max_new_tokens), + seed: instance.parameters.as_ref().and_then(|p| p.seed), + details: true, + decoder_input_details: true, + ..Default::default() + }, + }, + VertexInstance::Chat(instance) => { + let chat_request: ChatRequest = instance.into(); + let (generate_request, _using_tools): (GenerateRequest, bool) = + chat_request.try_into_generate(&infer)?; + generate_request + } + }; + + let infer_clone = infer.clone(); + let compute_type_clone = compute_type.clone(); + let span_clone = span.clone(); + + futures.push(async move { + generate_internal( + Extension(infer_clone), + compute_type_clone, + Json(generate_request), + span_clone, + ) + .await + .map(|(_, Json(generation))| generation.generated_text) + .map_err(|_| { + ( + StatusCode::INTERNAL_SERVER_ERROR, + Json(ErrorResponse { + error: "Incomplete generation".into(), + error_type: "Incomplete generation".into(), + }), + ) + }) + }); + } + + // execute all futures in parallel, collect results, returning early if any error occurs + let results = futures::future::join_all(futures).await; + let predictions: Result, _> = results.into_iter().collect(); + let predictions = predictions?; + + let response = VertexResponse { predictions }; + Ok((HeaderMap::new(), Json(response)).into_response()) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{Message, MessageContent}; + + #[test] + fn vertex_deserialization() { + let string = serde_json::json!({ + + "messages": [{"role": "user", "content": "What's Deep Learning?"}], + "parameters": { + "max_tokens": 128, + "top_p": 0.95, + "temperature": 0.7 + } + }); + + let _request: VertexChat = serde_json::from_value(string).expect("Can deserialize"); + + let string = serde_json::json!({ + + "instances": [ + { + "messages": [{"role": "user", "content": "What's Deep Learning?"}], + "parameters": { + "max_tokens": 128, + "top_p": 0.95, + "temperature": 0.7 + } + } + ] + + }); + let request: VertexRequest = serde_json::from_value(string).expect("Can deserialize"); + assert_eq!( + request, + VertexRequest { + instances: vec![VertexInstance::Chat(VertexChat { + messages: vec![Message { + role: "user".to_string(), + content: MessageContent::SingleText("What's Deep Learning?".to_string()), + name: None, + },], + parameters: VertexParameters { + max_tokens: Some(128), + top_p: Some(0.95), + temperature: Some(0.7), + ..Default::default() + } + })] + } + ); + } +} From 507ecae147e23f9413929d78e48755e1bcdce565 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 23 Sep 2024 22:21:43 +0200 Subject: [PATCH 02/16] logprobs defaults to false. --- docs/openapi.json | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index 0b5b3ae37a6..7dd015fb777 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -878,7 +878,6 @@ "type": "boolean", "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each\noutput token returned in the content of message.", "example": "false", - "nullable": true }, "max_tokens": { "type": "integer", From be00fb7fc06bc27abf7b6d68c9be1cf04f1966a2 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 11:37:58 +0200 Subject: [PATCH 03/16] Parameters are optional --- router/src/vertex.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/router/src/vertex.rs b/router/src/vertex.rs index a8f7804e80c..5741658b2bb 100644 --- a/router/src/vertex.rs +++ b/router/src/vertex.rs @@ -26,11 +26,12 @@ pub(crate) struct GenerateVertexInstance { pub(crate) struct VertexChat { messages: Vec, // Messages is ignored there. + #[serde(default)] parameters: VertexParameters, } -#[derive(Clone, Deserialize, ToSchema, Serialize)] -#[cfg_attr(test, derive(Debug, PartialEq, Default))] +#[derive(Clone, Deserialize, ToSchema, Serialize, Default)] +#[cfg_attr(test, derive(Debug, PartialEq))] pub(crate) struct VertexParameters { #[schema(example = "mistralai/Mistral-7B-Instruct-v0.2")] /// [UNUSED] ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API. @@ -316,6 +317,12 @@ mod tests { let _request: VertexChat = serde_json::from_value(string).expect("Can deserialize"); + let string = serde_json::json!({ + "messages": [{"role": "user", "content": "What's Deep Learning?"}], + }); + + let _request: VertexChat = serde_json::from_value(string).expect("Can deserialize"); + let string = serde_json::json!({ "instances": [ From 6744df5873ba00df89df1cd96f007b305399b341 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 11:38:59 +0200 Subject: [PATCH 04/16] Fix docs. --- docs/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index 7dd015fb777..c56127509fb 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -877,7 +877,7 @@ "logprobs": { "type": "boolean", "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each\noutput token returned in the content of message.", - "example": "false", + "example": "false" }, "max_tokens": { "type": "integer", From d46d3c65ea974782dca0072afa84610d4ce61863 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 17:21:07 +0200 Subject: [PATCH 05/16] Changing back this logprobs default. --- router/src/lib.rs | 2 +- router/src/server.rs | 2 ++ router/src/vertex.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/router/src/lib.rs b/router/src/lib.rs index 523c4ea4705..0901bafaedf 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -782,7 +782,7 @@ pub(crate) struct ChatRequest { /// output token returned in the content of message. #[serde(default)] #[schema(example = "false")] - pub logprobs: bool, + pub logprobs: Option, /// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with /// an associated log probability. logprobs must be set to true if this parameter is used. diff --git a/router/src/server.rs b/router/src/server.rs index 8642bb8819a..7f1d746c717 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -1123,6 +1123,8 @@ async fn chat_completions( let (generate_request, using_tools): (GenerateRequest, bool) = chat.try_into_generate(&infer)?; + let logprobs = logprobs.unwrap_or_default(); + // static values that will be returned in all cases let model_id = info.model_id.clone(); let system_fingerprint = format!("{}-{}", info.version, info.docker_label.unwrap_or("native")); diff --git a/router/src/vertex.rs b/router/src/vertex.rs index 5741658b2bb..0c1467fe373 100644 --- a/router/src/vertex.rs +++ b/router/src/vertex.rs @@ -56,7 +56,7 @@ pub(crate) struct VertexParameters { /// output token returned in the content of message. #[serde(default)] #[schema(example = "false")] - pub logprobs: bool, + pub logprobs: Option, /// An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with /// an associated log probability. logprobs must be set to true if this parameter is used. From 259ba29a90e5cfc043be884840a75245f5d0b127 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 17:35:42 +0200 Subject: [PATCH 06/16] Fixup doc. --- docs/openapi.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index c56127509fb..0b5b3ae37a6 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -877,7 +877,8 @@ "logprobs": { "type": "boolean", "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each\noutput token returned in the content of message.", - "example": "false" + "example": "false", + "nullable": true }, "max_tokens": { "type": "integer", From 846fcc34477c4274dfa4308f2a49bc8a189bca07 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 17:41:34 +0200 Subject: [PATCH 07/16] Let's debug that. --- .github/workflows/nix_tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index f2209f8a453..b2011d75436 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -29,6 +29,8 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' env: USER: github_runner + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - name: Build run: nix develop .#test --command echo "Ok" - name: Pre-commit tests. From 4a29ae2b669f5efbbeda08eddb7ef26bf8e6a3cb Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:01:55 +0200 Subject: [PATCH 08/16] Not unstable. --- .github/workflows/nix_tests.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index b2011d75436..a44a55ad393 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -20,8 +20,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 - with: - nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v14 with: name: text-generation-inference @@ -29,8 +27,6 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' env: USER: github_runner - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - name: Build run: nix develop .#test --command echo "Ok" - name: Pre-commit tests. From 7d219fc2bd9fd142b657dffdf0a5c7067e925e00 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:05:29 +0200 Subject: [PATCH 09/16] Updating Cargo ? --- Cargo.lock | 171 +++++++++++++++++++++++++++++------------------------ 1 file changed, 93 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c8a0fe2d8a..236c37db3ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -269,9 +269,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234314bd569802ec87011d653d6815c6d7b9ffb969e9fee5b8b20ef860e8dce9" +checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" dependencies = [ "bindgen", "cc", @@ -309,19 +309,19 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" dependencies = [ "async-trait", - "axum-core 0.4.3", + "axum-core 0.4.4", "bytes", "futures-util", "http 1.1.0", @@ -342,7 +342,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -367,9 +367,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" dependencies = [ "async-trait", "bytes", @@ -380,7 +380,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -392,13 +392,13 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdad298231394729042d1f155b93f9fdf0b5ee1aea0b62404c4d7341f7d8fe08" dependencies = [ - "axum 0.7.5", + "axum 0.7.6", "futures-core", "futures-util", "http 1.1.0", "opentelemetry 0.21.0", "pin-project-lite", - "tower", + "tower 0.4.13", "tracing", "tracing-opentelemetry 0.22.0", "tracing-opentelemetry-instrumentation-sdk", @@ -546,9 +546,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "camino" @@ -605,9 +605,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", @@ -675,9 +675,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -685,9 +685,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -697,9 +697,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1732,9 +1732,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -1745,7 +1745,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1985,7 +1984,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.17", + "clap 4.5.18", "fancy-regex", "fraction", "getrandom", @@ -2025,9 +2024,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libfuzzer-sys" @@ -2240,9 +2239,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" +checksum = "1028b628753a7e1a88fc59c9ba4b02ecc3bc0bd3c7af23df667bc28df9b3310e" dependencies = [ "serde", "serde_json", @@ -2250,9 +2249,9 @@ dependencies = [ [[package]] name = "minijinja-contrib" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744a2b84dbd22398e347594ed2aef9d3f1b948934e3e6e94ef69ecd39d597f4b" +checksum = "39ffd46ee854be23604a20efd6c9655374fefbe4d44b949dc0f907305d92873a" dependencies = [ "minijinja", "serde", @@ -2600,9 +2599,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "onig" @@ -2955,9 +2954,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" @@ -3002,9 +3001,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "d30538d42559de6b034bc76fd6dd4c38961b1ee5c6c56e3808c50128fdbc22ce" [[package]] name = "powerfmt" @@ -3161,9 +3160,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" +checksum = "15ee168e30649f7f234c3d49ef5a7a6cbf5134289bc46c29ff3155fa3221c225" dependencies = [ "cfg-if", "indoc", @@ -3179,9 +3178,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" +checksum = "e61cef80755fe9e46bb8a0b8f20752ca7676dcc07a5277d8b7768c6172e529b3" dependencies = [ "once_cell", "target-lexicon", @@ -3189,9 +3188,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" +checksum = "67ce096073ec5405f5ee2b8b31f03a68e02aa10d5d4f565eca04acc41931fa1c" dependencies = [ "libc", "pyo3-build-config", @@ -3199,9 +3198,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" +checksum = "2440c6d12bc8f3ae39f1e775266fa5122fd0c8891ce7520fa6048e683ad3de28" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -3211,9 +3210,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" +checksum = "1be962f0e06da8f8465729ea2cb71a416d2257dff56cbe40a70d3e62a93ae5d1" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3403,9 +3402,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" dependencies = [ "bitflags 2.6.0", ] @@ -3770,9 +3769,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -4179,7 +4178,7 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "clap 4.5.17", + "clap 4.5.18", "cmake", "cxx", "cxx-build", @@ -4201,7 +4200,7 @@ name = "text-generation-benchmark" version = "2.3.1-dev0" dependencies = [ "average", - "clap 4.5.17", + "clap 4.5.18", "crossterm", "float-ord", "hf-hub", @@ -4231,7 +4230,7 @@ dependencies = [ "tokio", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tracing", ] @@ -4239,7 +4238,7 @@ dependencies = [ name = "text-generation-launcher" version = "2.3.1-dev0" dependencies = [ - "clap 4.5.17", + "clap 4.5.18", "ctrlc", "float_eq", "hf-hub", @@ -4260,10 +4259,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "csv", "futures", "futures-util", @@ -4358,10 +4357,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "criterion", "futures", "futures-util", @@ -4394,7 +4393,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", @@ -4414,18 +4413,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4696,9 +4695,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ "indexmap 2.5.0", "serde", @@ -4729,7 +4728,7 @@ dependencies = [ "prost 0.11.9", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -4756,7 +4755,7 @@ dependencies = [ "prost 0.12.6", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -4795,6 +4794,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -5008,9 +5023,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -5043,9 +5058,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode_categories" @@ -5145,7 +5160,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b39868d43c011961e04b41623e050aedf2cc93652562ff7935ce0f819aaf2da" dependencies = [ - "axum 0.7.5", + "axum 0.7.6", "mime_guess", "regex", "rust-embed", @@ -5362,9 +5377,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.5" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] From 6c6f2b557563447e99b36cc547f76613620fd4d4 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:10:29 +0200 Subject: [PATCH 10/16] Wat? --- .github/workflows/nix_tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index a44a55ad393..e0bbfbf346a 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -20,6 +20,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable + install-url: https://releases.nixos.org/nix/nix-2.18.5/install - uses: cachix/cachix-action@v14 with: name: text-generation-inference From 0b029b3c247fd312d091601e9ee2372aea573724 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:12:12 +0200 Subject: [PATCH 11/16] Dummy change. --- .github/workflows/nix_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index e0bbfbf346a..40c73149172 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -27,6 +27,7 @@ jobs: with: name: text-generation-inference # If you chose signing key for write access + # Dummy change. authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' env: USER: github_runner From 48b7841a684116a89f5a4c913caa5badf342b8a8 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:14:10 +0200 Subject: [PATCH 12/16] Trying some other install. --- .github/workflows/nix_tests.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index 40c73149172..756918568a6 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -21,13 +21,11 @@ jobs: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 with: - nix_path: nixpkgs=channel:nixos-unstable - install-url: https://releases.nixos.org/nix/nix-2.18.5/install + github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: cachix/cachix-action@v14 with: name: text-generation-inference # If you chose signing key for write access - # Dummy change. authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' env: USER: github_runner From 6a07d1e83cafa9dcd84d01cc18007ccf89b98764 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:18:28 +0200 Subject: [PATCH 13/16] Trying smething. --- .gitignore | 3 +-- Cargo.lock | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index edcc2f89053..4270a1ae96a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,8 @@ target router/tokenizer.json *__pycache__* +backends/v2/src/client/pb backends/v3/src/client/pb -backends/client/src/v2/pb -backends/client/src/v3/pb # ROCm auto-generated files *.hip diff --git a/Cargo.lock b/Cargo.lock index 236c37db3ec..d1230d25707 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4308,10 +4308,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "futures", "futures-util", "grpc-metadata", @@ -4342,7 +4342,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", From e4397991d20cfbeaea52edd73c916c4a9cb27a2b Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 20:23:02 +0200 Subject: [PATCH 14/16] Revert everything. --- .github/workflows/nix_tests.yaml | 2 +- Cargo.lock | 177 ++++++++++++++----------------- 2 files changed, 82 insertions(+), 97 deletions(-) diff --git a/.github/workflows/nix_tests.yaml b/.github/workflows/nix_tests.yaml index 756918568a6..f2209f8a453 100644 --- a/.github/workflows/nix_tests.yaml +++ b/.github/workflows/nix_tests.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v27 with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v14 with: name: text-generation-inference diff --git a/Cargo.lock b/Cargo.lock index d1230d25707..2c8a0fe2d8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" [[package]] name = "arbitrary" @@ -269,9 +269,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.21.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" +checksum = "234314bd569802ec87011d653d6815c6d7b9ffb969e9fee5b8b20ef860e8dce9" dependencies = [ "bindgen", "cc", @@ -309,19 +309,19 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "tokio", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum" -version = "0.7.6" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", - "axum-core 0.4.4", + "axum-core 0.4.3", "bytes", "futures-util", "http 1.1.0", @@ -342,7 +342,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower 0.5.1", + "tower", "tower-layer", "tower-service", "tracing", @@ -367,9 +367,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", @@ -380,7 +380,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", "tracing", @@ -392,13 +392,13 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdad298231394729042d1f155b93f9fdf0b5ee1aea0b62404c4d7341f7d8fe08" dependencies = [ - "axum 0.7.6", + "axum 0.7.5", "futures-core", "futures-util", "http 1.1.0", "opentelemetry 0.21.0", "pin-project-lite", - "tower 0.4.13", + "tower", "tracing", "tracing-opentelemetry 0.22.0", "tracing-opentelemetry-instrumentation-sdk", @@ -546,9 +546,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.2" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "camino" @@ -605,9 +605,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.21" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", @@ -675,9 +675,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.18" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -685,9 +685,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -697,9 +697,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1732,9 +1732,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -1745,6 +1745,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", + "tower", "tower-service", "tracing", ] @@ -1984,7 +1985,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.18", + "clap 4.5.17", "fancy-regex", "fraction", "getrandom", @@ -2024,9 +2025,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libfuzzer-sys" @@ -2239,9 +2240,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.3.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1028b628753a7e1a88fc59c9ba4b02ecc3bc0bd3c7af23df667bc28df9b3310e" +checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" dependencies = [ "serde", "serde_json", @@ -2249,9 +2250,9 @@ dependencies = [ [[package]] name = "minijinja-contrib" -version = "2.3.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ffd46ee854be23604a20efd6c9655374fefbe4d44b949dc0f907305d92873a" +checksum = "744a2b84dbd22398e347594ed2aef9d3f1b948934e3e6e94ef69ecd39d597f4b" dependencies = [ "minijinja", "serde", @@ -2599,9 +2600,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" [[package]] name = "onig" @@ -2954,9 +2955,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plotters" @@ -3001,9 +3002,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.8.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d30538d42559de6b034bc76fd6dd4c38961b1ee5c6c56e3808c50128fdbc22ce" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3160,9 +3161,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15ee168e30649f7f234c3d49ef5a7a6cbf5134289bc46c29ff3155fa3221c225" +checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" dependencies = [ "cfg-if", "indoc", @@ -3178,9 +3179,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61cef80755fe9e46bb8a0b8f20752ca7676dcc07a5277d8b7768c6172e529b3" +checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" dependencies = [ "once_cell", "target-lexicon", @@ -3188,9 +3189,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce096073ec5405f5ee2b8b31f03a68e02aa10d5d4f565eca04acc41931fa1c" +checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" dependencies = [ "libc", "pyo3-build-config", @@ -3198,9 +3199,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2440c6d12bc8f3ae39f1e775266fa5122fd0c8891ce7520fa6048e683ad3de28" +checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -3210,9 +3211,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be962f0e06da8f8465729ea2cb71a416d2257dff56cbe40a70d3e62a93ae5d1" +checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3402,9 +3403,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.5" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -3769,9 +3770,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -4178,7 +4179,7 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "clap 4.5.18", + "clap 4.5.17", "cmake", "cxx", "cxx-build", @@ -4200,7 +4201,7 @@ name = "text-generation-benchmark" version = "2.3.1-dev0" dependencies = [ "average", - "clap 4.5.18", + "clap 4.5.17", "crossterm", "float-ord", "hf-hub", @@ -4230,7 +4231,7 @@ dependencies = [ "tokio", "tonic 0.10.2", "tonic-build", - "tower 0.4.13", + "tower", "tracing", ] @@ -4238,7 +4239,7 @@ dependencies = [ name = "text-generation-launcher" version = "2.3.1-dev0" dependencies = [ - "clap 4.5.18", + "clap 4.5.17", "ctrlc", "float_eq", "hf-hub", @@ -4259,10 +4260,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.6", + "axum 0.7.5", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.18", + "clap 4.5.17", "csv", "futures", "futures-util", @@ -4308,10 +4309,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.6", + "axum 0.7.5", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.18", + "clap 4.5.17", "futures", "futures-util", "grpc-metadata", @@ -4342,7 +4343,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower 0.4.13", + "tower", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", @@ -4357,10 +4358,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.6", + "axum 0.7.5", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.18", + "clap 4.5.17", "criterion", "futures", "futures-util", @@ -4393,7 +4394,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower 0.4.13", + "tower", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", @@ -4413,18 +4414,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -4695,9 +4696,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.21" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap 2.5.0", "serde", @@ -4728,7 +4729,7 @@ dependencies = [ "prost 0.11.9", "tokio", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -4755,7 +4756,7 @@ dependencies = [ "prost 0.12.6", "tokio", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -4794,22 +4795,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 0.1.2", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower-http" version = "0.5.2" @@ -5023,9 +5008,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -5058,9 +5043,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode_categories" @@ -5160,7 +5145,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b39868d43c011961e04b41623e050aedf2cc93652562ff7935ce0f819aaf2da" dependencies = [ - "axum 0.7.6", + "axum 0.7.5", "mime_guess", "regex", "rust-embed", @@ -5377,9 +5362,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" dependencies = [ "rustls-pki-types", ] From 02b25e524de4f220b93cfbe48674e239ab2c3ddf Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 22:14:36 +0200 Subject: [PATCH 15/16] Update Cargo lock. --- Cargo.lock | 186 ++++++++++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 86 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c8a0fe2d8a..e535004e14d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -269,9 +269,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234314bd569802ec87011d653d6815c6d7b9ffb969e9fee5b8b20ef860e8dce9" +checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" dependencies = [ "bindgen", "cc", @@ -309,19 +309,19 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" dependencies = [ "async-trait", - "axum-core 0.4.3", + "axum-core 0.4.4", "bytes", "futures-util", "http 1.1.0", @@ -342,7 +342,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -367,9 +367,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" dependencies = [ "async-trait", "bytes", @@ -380,7 +380,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -392,13 +392,13 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdad298231394729042d1f155b93f9fdf0b5ee1aea0b62404c4d7341f7d8fe08" dependencies = [ - "axum 0.7.5", + "axum 0.7.6", "futures-core", "futures-util", "http 1.1.0", "opentelemetry 0.21.0", "pin-project-lite", - "tower", + "tower 0.4.13", "tracing", "tracing-opentelemetry 0.22.0", "tracing-opentelemetry-instrumentation-sdk", @@ -546,9 +546,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "camino" @@ -605,9 +605,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", @@ -675,9 +675,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -685,9 +685,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -697,9 +697,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1732,9 +1732,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -1745,7 +1745,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1985,7 +1984,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.17", + "clap 4.5.18", "fancy-regex", "fraction", "getrandom", @@ -2025,9 +2024,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libfuzzer-sys" @@ -2240,9 +2239,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" +checksum = "1028b628753a7e1a88fc59c9ba4b02ecc3bc0bd3c7af23df667bc28df9b3310e" dependencies = [ "serde", "serde_json", @@ -2250,9 +2249,9 @@ dependencies = [ [[package]] name = "minijinja-contrib" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744a2b84dbd22398e347594ed2aef9d3f1b948934e3e6e94ef69ecd39d597f4b" +checksum = "39ffd46ee854be23604a20efd6c9655374fefbe4d44b949dc0f907305d92873a" dependencies = [ "minijinja", "serde", @@ -2600,9 +2599,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "onig" @@ -2955,9 +2954,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" @@ -3002,9 +3001,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "d30538d42559de6b034bc76fd6dd4c38961b1ee5c6c56e3808c50128fdbc22ce" [[package]] name = "powerfmt" @@ -3161,9 +3160,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433" +checksum = "15ee168e30649f7f234c3d49ef5a7a6cbf5134289bc46c29ff3155fa3221c225" dependencies = [ "cfg-if", "indoc", @@ -3179,9 +3178,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8" +checksum = "e61cef80755fe9e46bb8a0b8f20752ca7676dcc07a5277d8b7768c6172e529b3" dependencies = [ "once_cell", "target-lexicon", @@ -3189,9 +3188,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6" +checksum = "67ce096073ec5405f5ee2b8b31f03a68e02aa10d5d4f565eca04acc41931fa1c" dependencies = [ "libc", "pyo3-build-config", @@ -3199,9 +3198,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206" +checksum = "2440c6d12bc8f3ae39f1e775266fa5122fd0c8891ce7520fa6048e683ad3de28" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -3211,9 +3210,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372" +checksum = "1be962f0e06da8f8465729ea2cb71a416d2257dff56cbe40a70d3e62a93ae5d1" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3403,9 +3402,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" dependencies = [ "bitflags 2.6.0", ] @@ -3770,9 +3769,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -4179,7 +4178,7 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "clap 4.5.17", + "clap 4.5.18", "cmake", "cxx", "cxx-build", @@ -4201,8 +4200,7 @@ name = "text-generation-benchmark" version = "2.3.1-dev0" dependencies = [ "average", - "clap 4.5.17", - "crossterm", + "clap 4.5.18", "float-ord", "hf-hub", "ratatui", @@ -4231,7 +4229,7 @@ dependencies = [ "tokio", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tracing", ] @@ -4239,7 +4237,7 @@ dependencies = [ name = "text-generation-launcher" version = "2.3.1-dev0" dependencies = [ - "clap 4.5.17", + "clap 4.5.18", "ctrlc", "float_eq", "hf-hub", @@ -4260,10 +4258,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "csv", "futures", "futures-util", @@ -4309,10 +4307,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "futures", "futures-util", "grpc-metadata", @@ -4343,7 +4341,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", @@ -4358,10 +4356,10 @@ version = "2.3.1-dev0" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.6", "axum-tracing-opentelemetry", "base64 0.22.1", - "clap 4.5.17", + "clap 4.5.18", "criterion", "futures", "futures-util", @@ -4394,7 +4392,7 @@ dependencies = [ "tokio-stream", "tonic 0.10.2", "tonic-build", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-opentelemetry 0.21.0", @@ -4414,18 +4412,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4696,9 +4694,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.5.0", "serde", @@ -4729,7 +4727,7 @@ dependencies = [ "prost 0.11.9", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -4756,7 +4754,7 @@ dependencies = [ "prost 0.12.6", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -4795,6 +4793,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -5008,9 +5022,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -5043,9 +5057,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode_categories" @@ -5145,7 +5159,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b39868d43c011961e04b41623e050aedf2cc93652562ff7935ce0f819aaf2da" dependencies = [ - "axum 0.7.5", + "axum 0.7.6", "mime_guess", "regex", "rust-embed", @@ -5362,9 +5376,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.5" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -5653,9 +5667,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" dependencies = [ "memchr", ] From ebe33e7dbc91248b0a8e1ad1d08422d095317d23 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 24 Sep 2024 22:24:44 +0200 Subject: [PATCH 16/16] Fixing the pre-commit after rebase. --- benchmark/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/src/lib.rs b/benchmark/src/lib.rs index 03612eef9ea..bb4b6a77f9f 100644 --- a/benchmark/src/lib.rs +++ b/benchmark/src/lib.rs @@ -6,8 +6,8 @@ mod utils; use crate::app::App; use crate::event::Event; -use ratatui::crossterm::ExecutableCommand; use ratatui::backend::CrosstermBackend; +use ratatui::crossterm::ExecutableCommand; use ratatui::Terminal; use std::io; use text_generation_client::v3::{GrammarType, NextTokenChooserParameters, ShardedClient};