From ae7fd27d1a12d0abbb5c8daa3c3ed357d83371d4 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Fri, 10 May 2024 18:48:03 +0000 Subject: [PATCH] allow absoulte model and tokenizer paths --- controllers/aici_native/src/bintokens.rs | 2 +- rllm/rllm-base/src/server/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/aici_native/src/bintokens.rs b/controllers/aici_native/src/bintokens.rs index 95e06434..da632c26 100644 --- a/controllers/aici_native/src/bintokens.rs +++ b/controllers/aici_native/src/bintokens.rs @@ -166,7 +166,7 @@ pub fn find_tokenizer(mut name: &str) -> Result { log::info!("loading tokenizer: {}", name); - let loaded = if name.starts_with(".") { + let loaded = if name.starts_with(".") || name.starts_with("/") { Tokenizer::from_file(name) } else { let mut name2 = name.to_string(); diff --git a/rllm/rllm-base/src/server/mod.rs b/rllm/rllm-base/src/server/mod.rs index e6eb6872..9976d712 100644 --- a/rllm/rllm-base/src/server/mod.rs +++ b/rllm/rllm-base/src/server/mod.rs @@ -579,7 +579,7 @@ pub async fn server_main( args.revision = Some(rev); } - if args.model.starts_with(".") { + if args.model.starts_with(".") || args.model.starts_with("/") { args.local_weights = Some(args.model.clone()); }