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
065ddaa7
Commit
065ddaa7
authored
1 year ago
by
Hamid Shojanazeri
Browse files
Options
Downloads
Patches
Plain Diff
fixing the condition for moving to cuda
parent
20b061e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/train_utils.py
+1
-1
1 addition, 1 deletion
utils/train_utils.py
with
1 addition
and
1 deletion
utils/train_utils.py
+
1
−
1
View file @
065ddaa7
...
...
@@ -85,7 +85,7 @@ def train(model, train_dataloader,eval_dataloader, tokenizer, optimizer, lr_sche
for
key
in
batch
.
keys
():
if
train_config
.
enable_fsdp
:
batch
[
key
]
=
batch
[
key
].
to
(
local_rank
)
el
if
not
train_config
.
quantization
:
el
se
:
batch
[
key
]
=
batch
[
key
].
to
(
'
cuda
'
)
outputs
=
model
(
**
batch
)
loss
=
outputs
.
loss
...
...
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