From 09be075210d24ec991d4b5d79bf312c406ef54d9 Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Sat, 8 Jun 2024 15:06:16 -0400 Subject: [PATCH] - improve: qwen2 as default initial model (#320) --- apps/shinkai-desktop/src-tauri/src/hardware.rs | 2 +- .../process_handlers/shinkai_node_process_handler.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/shinkai-desktop/src-tauri/src/hardware.rs b/apps/shinkai-desktop/src-tauri/src/hardware.rs index e70fe28fd..26960352c 100644 --- a/apps/shinkai-desktop/src-tauri/src/hardware.rs +++ b/apps/shinkai-desktop/src-tauri/src/hardware.rs @@ -110,7 +110,7 @@ pub fn hardware_get_summary() -> HardwareSummary { requirement_status = RequirementsStatus::Recommended; } else if cpus >= MIN_CPUS && memory >= MIN_MEMORY { requirement_status = RequirementsStatus::Minimum; - } else if cpus >= STILL_USABLE_CPUS && (is_macos && memory >= STILL_USABLE_MEMORY || memory > STILL_USABLE_MEMORY) { + } else if cpus >= STILL_USABLE_CPUS && memory >= STILL_USABLE_MEMORY { requirement_status = RequirementsStatus::StillUsable; } else { requirement_status = RequirementsStatus::Unmeet; diff --git a/apps/shinkai-desktop/src-tauri/src/local_shinkai_node/process_handlers/shinkai_node_process_handler.rs b/apps/shinkai-desktop/src-tauri/src/local_shinkai_node/process_handlers/shinkai_node_process_handler.rs index 2f1847d76..566038f6f 100644 --- a/apps/shinkai-desktop/src-tauri/src/local_shinkai_node/process_handlers/shinkai_node_process_handler.rs +++ b/apps/shinkai-desktop/src-tauri/src/local_shinkai_node/process_handlers/shinkai_node_process_handler.rs @@ -35,9 +35,12 @@ impl ShinkaiNodeProcessHandler { let mut model = "llama3:8b-instruct-q4_1".to_string(); let hardware_summary = hardware_get_summary(); match hardware_summary.requirements_status { - RequirementsStatus::Unmeet | RequirementsStatus::Minimum => { + RequirementsStatus::Minimum => { model = "phi3:3.8b".to_string(); } + RequirementsStatus::StillUsable | RequirementsStatus::Unmeet => { + model = "qwen2:1.5b-instruct-q4_K_M".to_string(); + } _ => {} } model