From 846ddd02beaeafe9dba414256aa6df0854393a33 Mon Sep 17 00:00:00 2001 From: Christian M Date: Mon, 8 Jan 2024 18:35:43 +0100 Subject: [PATCH] :sparkles::wrench: configurable model by cli in server mode --- README.md | 2 ++ src/main.rs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12c7b66..8b0927f 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ The following table shows the performance metrics of the model on different syst | 7b-open-chat-3.5 | AMD 7900X3D (12 Core) 64GB | 9.4 tokens/s | | 7b-open-chat-3.5 | AMD 5600G (8 Core VM) 16GB | 2.8 tokens/s | | 13b (llama2 13b) | AMD 7900X3D (12 Core) 64GB | 5.2 tokens/s | +| phi-2 | AMD 7900X3D (12 Core) 64GB | 20.6 tokens/s | ## Todo @@ -108,3 +109,4 @@ The following table shows the performance metrics of the model on different syst - [x] docker image and docker-compose - [ ] add tests - [ ] add documentation +- [ ] fix stop token diff --git a/src/main.rs b/src/main.rs index fa566f7..c52ec0b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,7 +90,9 @@ async fn main() { let opt = Opt::parse(); match load_config(&opt.config) { - Ok(config) => { + Ok(mut config) => { + config.model = opt.model.unwrap_or(config.model); + info!("Loaded config: {:?}", config); if let Some(prompt) = opt.prompt { let parameter = GenerateParameter {