From e4475d82ae97a50b94a62577967827c921842195 Mon Sep 17 00:00:00 2001 From: cryscan Date: Sat, 4 May 2024 00:21:29 +0800 Subject: [PATCH] Bump version to v0.4.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- assets/configs/Config.toml | 4 ++-- src/api/model.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3b0c86f..3bea1e69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,7 +87,7 @@ dependencies = [ [[package]] name = "ai00_server" -version = "0.4.3" +version = "0.4.4" dependencies = [ "anyhow", "bit-set", diff --git a/Cargo.toml b/Cargo.toml index 721bdf51..9893182f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0" name = "ai00_server" repository = "https://github.com/cgisky1980/ai00_rwkv_server" rust-version = "1.75" -version = "0.4.3" +version = "0.4.4" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/assets/configs/Config.toml b/assets/configs/Config.toml index 3375d65a..883c0dac 100644 --- a/assets/configs/Config.toml +++ b/assets/configs/Config.toml @@ -1,14 +1,14 @@ [model] embed_device = "Cpu" # Device to put the embed tensor ("Cpu" or "Gpu"). max_batch = 8 # The maximum batches that are cached on GPU. -model_path = "assets/models" # Path to the folder containing all models. model_name = "RWKV-x060-World-3B-v2.1-20240417-ctx4096.st" # Name of the model. +model_path = "assets/models" # Path to the folder containing all models. quant = 0 # Layers to be quantized. quant_type = "Int8" # Quantization type ("Int8" or "NF4"). stop = ["\n\n"] # Additional stop words in generation. token_chunk_size = 128 # Size of token chunk that is inferred at once. For high end GPUs, this could be 64 or 128 (faster). -# [state] # Initial state goes here +# [state] # Initial state goes here. # path = "rwkv-x060-chn_single_round_qa-3B-20240502-ctx1024.st" [tokenizer] diff --git a/src/api/model.rs b/src/api/model.rs index 03e51c74..3b3c64e5 100644 --- a/src/api/model.rs +++ b/src/api/model.rs @@ -62,8 +62,8 @@ pub async fn load(depot: &mut Depot, req: &mut Request) -> StatusCode { Err(_) => return StatusCode::NOT_FOUND, } } - if let Some(s) = request.state.as_mut() { - s.path = match build_path(model_path, &s.path) { + if let Some(_state) = request.state.as_mut() { + _state.path = match build_path(model_path, &_state.path) { Ok(path) => path, Err(_) => return StatusCode::NOT_FOUND, }