Sample pack trust remote code v2 (#1873)

* fix the multipack patch for remote code models

* add deepseek v2 lite example w fsdp
This commit is contained in:
Wing Lian
2024-08-27 13:39:24 -04:00
committed by GitHub
parent f6362d2a05
commit 1e43660701
3 changed files with 69 additions and 2 deletions

View File

@@ -94,3 +94,5 @@ def patch_remote(model_name, config_name, modeling_name):
module_name = model_config.__class__.__module__.replace(config_name, modeling_name)
modeling_arch = importlib.import_module(module_name)
modeling_arch._get_unpad_data = get_unpad_data # pylint: disable=protected-access
# workaround to make the patch stick
modeling_arch._axolotl_multipack_patch = True # pylint: disable=protected-access