[Metax] adapt DeepSeek (#4498)

This commit is contained in:
xiaozude
2025-10-24 10:14:53 +08:00
committed by GitHub
parent 8718fa34b2
commit f7069b8057
19 changed files with 1538 additions and 324 deletions

View File

@@ -43,8 +43,8 @@ class DefaultModelLoaderV1(BaseModelLoader):
def clean_memory_fragments(self) -> None:
"""clean_memory_fragments"""
if current_platform.is_cuda():
paddle.device.cuda.empty_cache()
if current_platform.is_cuda() or current_platform.is_maca():
paddle.device.empty_cache()
paddle.device.synchronize()
@save_model()