Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Recipes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
meta-llama
Llama Recipes
Commits
d1195a6f
Commit
d1195a6f
authored
4 months ago
by
JimChienTW
Browse files
Options
Downloads
Patches
Plain Diff
Fix model parameter mismatch by printing parameters before FSDP
parent
f228cb4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/llama_recipes/finetuning.py
+2
-3
2 additions, 3 deletions
src/llama_recipes/finetuning.py
with
2 additions
and
3 deletions
src/llama_recipes/finetuning.py
+
2
−
3
View file @
d1195a6f
...
@@ -237,7 +237,8 @@ def main(**kwargs):
...
@@ -237,7 +237,8 @@ def main(**kwargs):
if
not
train_config
.
use_peft
and
train_config
.
freeze_LLM_only
and
config
.
model_type
==
"
mllama
"
:
if
not
train_config
.
use_peft
and
train_config
.
freeze_LLM_only
and
config
.
model_type
==
"
mllama
"
:
freeze_LLM_only
(
model
)
freeze_LLM_only
(
model
)
print_model_size
(
model
,
train_config
,
rank
if
train_config
.
enable_fsdp
else
0
)
mixed_precision_policy
,
wrapping_policy
=
get_policies
(
fsdp_config
,
rank
)
mixed_precision_policy
,
wrapping_policy
=
get_policies
(
fsdp_config
,
rank
)
# Create the FSDP wrapper for MllamaSelfAttentionDecoderLayer,MllamaSelfAttentionDecoderLayer,MllamaVisionEncoderLayer in vision models
# Create the FSDP wrapper for MllamaSelfAttentionDecoderLayer,MllamaSelfAttentionDecoderLayer,MllamaVisionEncoderLayer in vision models
...
@@ -306,8 +307,6 @@ def main(**kwargs):
...
@@ -306,8 +307,6 @@ def main(**kwargs):
dataset_processer
=
processor
dataset_processer
=
processor
else
:
else
:
dataset_processer
=
tokenizer
dataset_processer
=
tokenizer
print_model_size
(
model
,
train_config
,
rank
if
train_config
.
enable_fsdp
else
0
)
# Load and preprocess the dataset for training and validation
# Load and preprocess the dataset for training and validation
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment