diff --git a/docker/install.sh b/docker/install.sh index c2dfcd82..b15dab31 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -27,7 +27,7 @@ pip install --no-cache-dir triton auto-gptq==$autogptq_version -U && pip cache p if [[ "$(printf '%s\n' "0.6.0" "$vllm_version" | sort -V | head -n1)" = "0.6.0" ]]; then # vllm_version is >= 0.6.0 - pip install vllm==$vllm_version + pip install --no-cache-dir vllm==$vllm_version && pip cache purge fi # pip uninstall -y torch-scatter && TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5;8.0;8.6;8.9;9.0" pip install --no-cache-dir -U torch-scatter diff --git a/modelscope/utils/hf_util/patcher.py b/modelscope/utils/hf_util/patcher.py index 4e984d55..3665461f 100644 --- a/modelscope/utils/hf_util/patcher.py +++ b/modelscope/utils/hf_util/patcher.py @@ -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 diff --git a/tests/hub/test_create_aigc_model.py b/tests/hub/test_create_aigc_model.py index 43065952..a17f9b8a 100644 --- a/tests/hub/test_create_aigc_model.py +++ b/tests/hub/test_create_aigc_model.py @@ -38,7 +38,7 @@ class TestCreateAigcModel(unittest.TestCase): os.remove(self.tmp_file_path) delete_credential() - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skipUnless(test_level() >= 2, 'skip test in current test level') def test_create_aigc_model_expects_sha256_error(self): """Test creating an AIGC model repository.