support patch intern and deepseek (#1475)

This commit is contained in:
tastelikefeet
2025-08-23 10:43:56 +08:00
committed by GitHub
parent 6b70c8b577
commit a2c0673571

View File

@@ -42,6 +42,8 @@ def get_all_imported_modules():
'BatchFeature',
'Qwen.*',
'Llama.*',
'Intern.*',
'Deepseek.*',
'PretrainedConfig',
'PreTrainedTokenizer',
'PreTrainedModel',
@@ -242,11 +244,11 @@ def _patch_pretrained_class(all_imported_modules, wrap=False):
extra_allow_file_pattern = list(
(cls.vocab_files_names.values()) if cls is not None
and hasattr(cls, 'vocab_files_names') else []) + [
'chat_template.jinja', r'*.json', r'*.py'
'chat_template.jinja', r'*.json', r'*.py', r'*.txt'
] # noqa
elif 'Processor' in module_class.__name__:
extra_allow_file_pattern = [
'chat_template.jinja', r'*.json', r'*.py'
'chat_template.jinja', r'*.json', r'*.py', r'*.txt'
]
kwargs['allow_file_pattern'] = extra_allow_file_pattern