diff --git a/FlagEmbedding/finetune/embedder/decoder_only/base/runner.py b/FlagEmbedding/finetune/embedder/decoder_only/base/runner.py index 3a921832..aaaf0abc 100644 --- a/FlagEmbedding/finetune/embedder/decoder_only/base/runner.py +++ b/FlagEmbedding/finetune/embedder/decoder_only/base/runner.py @@ -70,6 +70,7 @@ def load_tokenizer_and_model(self) -> Tuple[PreTrainedTokenizer, AbsEmbedderMode num_labels=num_labels, cache_dir=self.model_args.cache_dir, token=self.model_args.token, + trust_remote_code=self.model_args.trust_remote_code, ) logger.info('Config: %s', config) diff --git a/FlagEmbedding/finetune/embedder/decoder_only/icl/runner.py b/FlagEmbedding/finetune/embedder/decoder_only/icl/runner.py index 86083c45..4cfe1dc9 100644 --- a/FlagEmbedding/finetune/embedder/decoder_only/icl/runner.py +++ b/FlagEmbedding/finetune/embedder/decoder_only/icl/runner.py @@ -74,6 +74,7 @@ def load_tokenizer_and_model(self) -> Tuple[PreTrainedTokenizer, AbsEmbedderMode num_labels=num_labels, cache_dir=self.model_args.cache_dir, token=self.model_args.token, + trust_remote_code=self.model_args.trust_remote_code, ) logger.info('Config: %s', config) diff --git a/FlagEmbedding/finetune/embedder/encoder_only/base/runner.py b/FlagEmbedding/finetune/embedder/encoder_only/base/runner.py index 3bc732d8..94558b2a 100644 --- a/FlagEmbedding/finetune/embedder/encoder_only/base/runner.py +++ b/FlagEmbedding/finetune/embedder/encoder_only/base/runner.py @@ -41,6 +41,7 @@ def load_tokenizer_and_model(self) -> Tuple[PreTrainedTokenizer, AbsEmbedderMode num_labels=num_labels, cache_dir=self.model_args.cache_dir, token=self.model_args.token, + trust_remote_code=self.model_args.trust_remote_code, ) logger.info('Config: %s', config) diff --git a/FlagEmbedding/finetune/embedder/encoder_only/m3/runner.py b/FlagEmbedding/finetune/embedder/encoder_only/m3/runner.py index 9d945e2d..b3ecfba2 100644 --- a/FlagEmbedding/finetune/embedder/encoder_only/m3/runner.py +++ b/FlagEmbedding/finetune/embedder/encoder_only/m3/runner.py @@ -116,6 +116,7 @@ def load_tokenizer_and_model(self) -> Tuple[PreTrainedTokenizer, AbsEmbedderMode num_labels=num_labels, cache_dir=self.model_args.cache_dir, token=self.model_args.token, + trust_remote_code=self.model_args.trust_remote_code, ) logger.info('Config: %s', config) diff --git a/FlagEmbedding/finetune/reranker/encoder_only/base/runner.py b/FlagEmbedding/finetune/reranker/encoder_only/base/runner.py index 7459d565..3b1a67f7 100644 --- a/FlagEmbedding/finetune/reranker/encoder_only/base/runner.py +++ b/FlagEmbedding/finetune/reranker/encoder_only/base/runner.py @@ -35,6 +35,7 @@ def load_tokenizer_and_model(self) -> Tuple[PreTrainedTokenizer, AbsRerankerMode num_labels=num_labels, cache_dir=self.model_args.cache_dir, token=self.model_args.token, + trust_remote_code=self.model_args.trust_remote_code, ) logger.info('Config: %s', config)