From 825e0da374cd73bc0058502019ac2c8995dbf9fc Mon Sep 17 00:00:00 2001 From: Eric Buehler <65165915+EricLBuehler@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:04:31 -0400 Subject: [PATCH] [Breaking] Bump version to v0.3.0 (#736) * Move into constructor * Bump version to 0.3.0 --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- README.md | 2 +- mistralrs-bench/Cargo.toml | 2 +- mistralrs-core/Cargo.toml | 6 +++--- mistralrs-core/src/engine/mod.rs | 9 ++------- mistralrs-core/src/lib.rs | 11 ++++------- mistralrs-pyo3/Cargo.toml | 2 +- mistralrs-pyo3/Cargo_template.toml | 2 +- mistralrs-pyo3/pyproject.toml | 2 +- mistralrs-pyo3/pyproject_template.toml | 2 +- mistralrs-server/Cargo.toml | 2 +- mistralrs/Cargo.toml | 2 +- 13 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef186b69c..4f74c8438 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2094,7 +2094,7 @@ dependencies = [ [[package]] name = "mistralrs" -version = "0.2.5" +version = "0.3.0" dependencies = [ "anyhow", "candle-core", @@ -2112,7 +2112,7 @@ dependencies = [ [[package]] name = "mistralrs-bench" -version = "0.2.5" +version = "0.3.0" dependencies = [ "anyhow", "candle-core", @@ -2127,7 +2127,7 @@ dependencies = [ [[package]] name = "mistralrs-core" -version = "0.2.5" +version = "0.3.0" dependencies = [ "accelerate-src", "akin", @@ -2195,7 +2195,7 @@ dependencies = [ [[package]] name = "mistralrs-paged-attn" -version = "0.2.5" +version = "0.3.0" dependencies = [ "anyhow", "bindgen_cuda 0.1.6", @@ -2205,7 +2205,7 @@ dependencies = [ [[package]] name = "mistralrs-pyo3" -version = "0.2.5" +version = "0.3.0" dependencies = [ "accelerate-src", "anyhow", @@ -2229,7 +2229,7 @@ dependencies = [ [[package]] name = "mistralrs-quant" -version = "0.2.5" +version = "0.3.0" dependencies = [ "bindgen_cuda 0.1.5", "candle-core", @@ -2244,7 +2244,7 @@ dependencies = [ [[package]] name = "mistralrs-server" -version = "0.2.5" +version = "0.3.0" dependencies = [ "accelerate-src", "anyhow", @@ -2273,7 +2273,7 @@ dependencies = [ [[package]] name = "mistralrs-vision" -version = "0.2.5" +version = "0.3.0" dependencies = [ "candle-core", "image", diff --git a/Cargo.toml b/Cargo.toml index f67176c31..9bd4a85c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ exclude = [ resolver = "2" [workspace.package] -version = "0.2.5" +version = "0.3.0" edition = "2021" description = "Fast and easy LLM serving." homepage = "https://github.com/EricLBuehler/mistral.rs" diff --git a/README.md b/README.md index 1be543896..a1383f574 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ Please submit more benchmarks via raising an issue! > Note: You can use our [Docker containers here](https://github.com/EricLBuehler/mistral.rs/pkgs/container/mistral.rs). > Learn more about running Docker containers: https://docs.docker.com/engine/reference/run/ -> Note: You can use pre-built `mistralrs-server` binaries [here](https://github.com/EricLBuehler/mistral.rs/releases/tag/v0.2.5) +> Note: You can use pre-built `mistralrs-server` binaries [here](https://github.com/EricLBuehler/mistral.rs/releases/tag/v0.3.0) - Install the [Python package here](mistralrs-pyo3/README.md). diff --git a/mistralrs-bench/Cargo.toml b/mistralrs-bench/Cargo.toml index 8e38eaa46..4763fedc4 100644 --- a/mistralrs-bench/Cargo.toml +++ b/mistralrs-bench/Cargo.toml @@ -18,7 +18,7 @@ candle-core.workspace = true serde.workspace = true serde_json.workspace = true clap.workspace = true -mistralrs-core = { version = "0.2.5", path = "../mistralrs-core" } +mistralrs-core = { version = "0.3.0", path = "../mistralrs-core" } tracing.workspace = true tokio.workspace = true cli-table = "0.4.7" diff --git a/mistralrs-core/Cargo.toml b/mistralrs-core/Cargo.toml index 4f288ade5..a071b4839 100644 --- a/mistralrs-core/Cargo.toml +++ b/mistralrs-core/Cargo.toml @@ -64,13 +64,13 @@ tracing-subscriber.workspace = true derive-new = "0.6.0" itertools = "0.13.0" sysinfo = "0.30.12" -mistralrs-vision = { version = "0.2.5", path = "../mistralrs-vision" } +mistralrs-vision = { version = "0.3.0", path = "../mistralrs-vision" } csv = "1.3.0" reqwest.workspace = true base64.workspace = true bytemuck_derive = "1.7.0" -mistralrs-paged-attn = { version = "0.2.5", path = "../mistralrs-paged-attn", optional = true } -mistralrs-quant = { version = "0.2.0", path = "../mistralrs-quant" } +mistralrs-paged-attn = { version = "0.3.0", path = "../mistralrs-paged-attn", optional = true } +mistralrs-quant = { version = "0.3.0", path = "../mistralrs-quant" } uuid = { version = "1.10.0", features = ["v4"] } schemars = "0.8.21" serde_yaml = "0.9.34" diff --git a/mistralrs-core/src/engine/mod.rs b/mistralrs-core/src/engine/mod.rs index 808257afc..d993472a9 100644 --- a/mistralrs-core/src/engine/mod.rs +++ b/mistralrs-core/src/engine/mod.rs @@ -62,6 +62,7 @@ impl Engine { no_prefix_cache: bool, prefix_cache_n: usize, disable_eos_stop: bool, + throughput_logging_enabled: bool, ) -> Self { let device = get_mut_arcmutex!(pipeline).device().clone(); let is_xlora = get_mut_arcmutex!(pipeline).get_metadata().is_xlora; @@ -84,16 +85,10 @@ impl Engine { ), is_debug: DEBUG.load(Ordering::Relaxed), disable_eos_stop, - throughput_logging_enabled: false, + throughput_logging_enabled, } } - // TODO(EricLBuehler): On v0.3.0 move this into the Engine constructor - /// Enable throughput logging. - pub fn enable_throughput_logging(&mut self) { - self.throughput_logging_enabled = true; - } - pub async fn run(&mut self) { let rng = Arc::new(std::sync::Mutex::new(Isaac64Rng::seed_from_u64(SEED))); let mut last_completion_ids: Vec = vec![]; diff --git a/mistralrs-core/src/lib.rs b/mistralrs-core/src/lib.rs index 0a7825c6a..1fd4291ad 100644 --- a/mistralrs-core/src/lib.rs +++ b/mistralrs-core/src/lib.rs @@ -293,6 +293,7 @@ impl MistralRs { let no_prefix_cache = no_prefix_cache.unwrap_or(false); let prefix_cache_n = prefix_cache_n.unwrap_or(16); let disable_eos_stop = disable_eos_stop.unwrap_or(false); + let throughput_logging_enabled = throughput_logging_enabled.is_some(); let reboot_state = RebootState { pipeline: pipeline.clone(), @@ -302,7 +303,7 @@ impl MistralRs { no_prefix_cache, prefix_cache_n, disable_eos_stop, - throughput_logging_enabled: throughput_logging_enabled.is_some(), + throughput_logging_enabled, }; let (tx, rx) = channel(10_000); @@ -322,10 +323,8 @@ impl MistralRs { no_prefix_cache, prefix_cache_n, disable_eos_stop, + throughput_logging_enabled, ); - if throughput_logging_enabled.is_some() { - engine.enable_throughput_logging(); - } engine.run().await; }); }); @@ -375,10 +374,8 @@ impl MistralRs { reboot_state.no_prefix_cache, reboot_state.prefix_cache_n, reboot_state.disable_eos_stop, + reboot_state.throughput_logging_enabled, ); - if reboot_state.throughput_logging_enabled { - engine.enable_throughput_logging(); - } engine.run().await; }); }); diff --git a/mistralrs-pyo3/Cargo.toml b/mistralrs-pyo3/Cargo.toml index fc09d788f..b71e0e563 100644 --- a/mistralrs-pyo3/Cargo.toml +++ b/mistralrs-pyo3/Cargo.toml @@ -17,7 +17,7 @@ doc = false [dependencies] pyo3.workspace = true -mistralrs-core = { version = "0.2.5", path = "../mistralrs-core", features = ["pyo3_macros"] } +mistralrs-core = { version = "0.3.0", path = "../mistralrs-core", features = ["pyo3_macros"] } serde.workspace = true serde_json.workspace = true candle-core.workspace = true diff --git a/mistralrs-pyo3/Cargo_template.toml b/mistralrs-pyo3/Cargo_template.toml index 087ff7708..c0339b48f 100644 --- a/mistralrs-pyo3/Cargo_template.toml +++ b/mistralrs-pyo3/Cargo_template.toml @@ -17,7 +17,7 @@ doc = false [dependencies] pyo3.workspace = true -mistralrs-core = { version = "0.2.5", path = "../mistralrs-core", features=["pyo3_macros","$feature_name"] } +mistralrs-core = { version = "0.3.0", path = "../mistralrs-core", features=["pyo3_macros","$feature_name"] } serde.workspace = true serde_json.workspace = true candle-core = { git = "https://github.com/EricLBuehler/candle.git", version = "0.6.0", rev = "3c8e120", features=["$feature_name"] } diff --git a/mistralrs-pyo3/pyproject.toml b/mistralrs-pyo3/pyproject.toml index caa863b3a..b9da18c6c 100644 --- a/mistralrs-pyo3/pyproject.toml +++ b/mistralrs-pyo3/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "mistralrs" -version = "0.2.5" +version = "0.3.0" requires-python = ">=3.8" classifiers = [ "Programming Language :: Rust", diff --git a/mistralrs-pyo3/pyproject_template.toml b/mistralrs-pyo3/pyproject_template.toml index 99479c192..4c2199ef3 100644 --- a/mistralrs-pyo3/pyproject_template.toml +++ b/mistralrs-pyo3/pyproject_template.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "$name" -version = "0.2.5" +version = "0.3.0" requires-python = ">=3.8" classifiers = [ "Programming Language :: Rust", diff --git a/mistralrs-server/Cargo.toml b/mistralrs-server/Cargo.toml index bd08f6576..62560af12 100644 --- a/mistralrs-server/Cargo.toml +++ b/mistralrs-server/Cargo.toml @@ -22,7 +22,7 @@ axum = { version = "0.7.4", features = ["tokio"] } tower-http = { version = "0.5.1", features = ["cors"]} utoipa = { version = "4.2", features = ["axum_extras"] } utoipa-swagger-ui = { version = "7.1.0", features = ["axum"]} -mistralrs-core = { version = "0.2.5", path = "../mistralrs-core" } +mistralrs-core = { version = "0.3.0", path = "../mistralrs-core" } indexmap.workspace = true accelerate-src = { workspace = true, optional = true } intel-mkl-src = { workspace = true, optional = true } diff --git a/mistralrs/Cargo.toml b/mistralrs/Cargo.toml index 04fb460b7..36071e008 100644 --- a/mistralrs/Cargo.toml +++ b/mistralrs/Cargo.toml @@ -12,7 +12,7 @@ license.workspace = true homepage.workspace = true [dependencies] -mistralrs-core = { version = "0.2.5", path = "../mistralrs-core" } +mistralrs-core = { version = "0.3.0", path = "../mistralrs-core" } anyhow.workspace = true tokio.workspace = true candle-core.workspace = true