Add supports_gradient_checkpointing

This commit is contained in:
ai-modelscope
2025-03-26 15:35:47 +08:00
parent ee45ba3769
commit d0b22d04cd
3 changed files with 14 additions and 0 deletions

View File

@@ -63,6 +63,8 @@ class InternVLChatConfig(PretrainedConfig):
self.ps_version = ps_version # pixel shuffle version
self.min_dynamic_patch = min_dynamic_patch
self.max_dynamic_patch = max_dynamic_patch
# By default, we use tie_word_embeddings=False for models of all sizes.
self.tie_word_embeddings = self.llm_config.tie_word_embeddings
logger.info(f'vision_select_layer: {self.select_layer}')
logger.info(f'ps_version: {self.ps_version}')