From 92a0d08e27906eb69d4bde6900c7efaf20b86456 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 19 Dec 2024 06:48:03 +0000 Subject: [PATCH] fix webui Former-commit-id: 369cca8110e6923ad9978b6b93928a3bcb5c6f30 --- src/llamafactory/webui/chatter.py | 1 + src/llamafactory/webui/components/export.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/llamafactory/webui/chatter.py b/src/llamafactory/webui/chatter.py index c18955cf..9d0e4b20 100644 --- a/src/llamafactory/webui/chatter.py +++ b/src/llamafactory/webui/chatter.py @@ -91,6 +91,7 @@ class WebChatModel(ChatModel): rope_scaling=get("top.rope_scaling") if get("top.rope_scaling") in ["linear", "dynamic"] else None, infer_backend=get("infer.infer_backend"), infer_dtype=get("infer.infer_dtype"), + trust_remote_code=True, ) if checkpoint_path: diff --git a/src/llamafactory/webui/components/export.py b/src/llamafactory/webui/components/export.py index 190e8855..29be2b35 100644 --- a/src/llamafactory/webui/components/export.py +++ b/src/llamafactory/webui/components/export.py @@ -84,6 +84,7 @@ def save_model( export_quantization_dataset=export_quantization_dataset, export_device=export_device, export_legacy_format=export_legacy_format, + trust_remote_code=True, ) if checkpoint_path: