Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion UMBRELLA_gemini/project/training/main_umbrella_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ def create_llava_model_with_custom_patch_embed(config: UMBRELLATrainingConfig) -
model = LlavaForConditionalGeneration.from_pretrained(
config.model_name,
torch_dtype=torch_dtype,
low_cpu_mem_usage=True
low_cpu_mem_usage=True,
attn_implementation="sdpa"
)

# Create custom PatchEmbed
Expand Down Expand Up @@ -235,6 +236,7 @@ def create_llava_model_with_custom_patch_embed(config: UMBRELLATrainingConfig) -

if config.gradient_checkpointing:
model.gradient_checkpointing_enable()
model.config.use_cache = False

return model

Expand Down