diff --git a/extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/jni/LibUtils.java b/extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/jni/LibUtils.java index 4a14263e903..2caa6e9312e 100644 --- a/extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/jni/LibUtils.java +++ b/extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/jni/LibUtils.java @@ -95,9 +95,10 @@ private static Path copyJniLibrary(String[] libs) { if (override) { logger.info("Uses override TOKENIZERS_FLAVOR: {}", flavor); } else { - flavor = platform.getFlavor(); if (Utils.isOfflineMode() || "win".equals(os)) { flavor = "cpu"; + } else { + flavor = platform.getFlavor(); } }