Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Llama3 changes #793

Merged
merged 8 commits into from
Apr 18, 2024
Merged

Llama3 changes #793

merged 8 commits into from
Apr 18, 2024

Conversation

ebsmothers
Copy link
Contributor

No description provided.

Copy link

pytorch-bot bot commented Apr 18, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/793

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit ff63068 with merge base 83785f9 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 18, 2024

.. code-block:: bash

tune download meta-llama/Llama-3-8b-hf --hf-token <ACCESS_TOKEN>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update this


.. code-block:: bash

tune download meta-llama/Llama-3-8b-hf \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: /tmp/Llama-3-8b-hf/tokenizer.model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: /tmp/Llama-3-8b-hf/tokenizer.model
path: /tmp/Meta-Llama-3-8B/original/tokenizer.model

Comment on lines 39 to 50
checkpointer:
_component_: torchtune.utils.FullModelHFCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/
checkpoint_files: [
pytorch_model-00001-of-00003.bin,
pytorch_model-00002-of-00003.bin,
pytorch_model-00003-of-00003.bin,
]
recipe_checkpoint: null
output_dir: /tmp/Llama-3-8b-hf/
model_type: LLAMA3
resume_from_checkpoint: False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this:

checkpointer:
  _component_: torchtune.utils.FullModelMetaCheckpointer
  checkpoint_dir: /tmp/Meta-Llama-3-8B
  checkpoint_files: [
    consolidated.00.pth
  ]
  recipe_checkpoint: null
  output_dir: /tmp/Meta-Llama-3-8B
  model_type: LLAMA3
resume_from_checkpoint: False

.. code-block:: yaml

checkpointer:
_component_: torchtune.utils.FullModelHFCheckpointer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_component_: torchtune.utils.FullModelHFCheckpointer
_component_: torchtune.utils.FullModelMetaCheckpointer

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
path: /tmp/Meta-Llama-3-8B/original/tokenizer.model


checkpointer:
_component_: torchtune.utils.FullModelMetaCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
checkpoint_dir: /tmp/Meta-Llama-3-8B/original/

consolidated.00.pth
]
recipe_checkpoint: null
output_dir: /tmp/Llama-3-8b-hf/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
output_dir: /tmp/Llama-3-8b-hf/
output_dir: /tmp/Meta-Llama-3-8B

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
path: /tmp/Meta-Llama-3-8B/original/tokenizer.model


checkpointer:
_component_: torchtune.utils.FullModelMetaCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
checkpoint_dir: /tmp/Meta-Llama-3-8B/original/

consolidated.00.pth
]
recipe_checkpoint: null
output_dir: /tmp/Llama-3-8b-hf/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
output_dir: /tmp/Llama-3-8b-hf/
output_dir: /tmp/Meta-Llama-3-8B


checkpointer:
_component_: torchtune.utils.FullModelMetaCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
checkpoint_dir: /tmp/Meta-Llama-3-8B/original/

consolidated.00.pth
]
recipe_checkpoint: null
output_dir: /tmp/Llama-3-8b-hf/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
output_dir: /tmp/Llama-3-8b-hf/
output_dir: /tmp/Meta-Llama-3-8B

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
path: /tmp/Meta-Llama-3-8B/original/tokenizer.model


checkpointer:
_component_: torchtune.utils.FullModelMetaCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
checkpoint_dir: /tmp/Meta-Llama-3-8B/original/

# Tokenizer
tokenizer:
_component_: torchtune.models.llama3.llama3_tokenizer
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: /tmp/Llama-3-8b-hf/original/tokenizer.model
path: /tmp/Meta-Llama-3-8B/original/tokenizer.model


checkpointer:
_component_: torchtune.utils.FullModelMetaCheckpointer
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checkpoint_dir: /tmp/Llama-3-8b-hf/original/
checkpoint_dir: /tmp/Meta-Llama-3-8B/original/

.. code-block:: yaml

checkpointer:
_component_: torchtune.utils.FullModelHFCheckpointer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_component_: torchtune.utils.FullModelHFCheckpointer
_component_: torchtune.utils.FullModelMetaCheckpointer

---------------------------

First, let's download the model from Hugging Face. You will need to follow the instructions
on the `official Meta page <https://github.com/meta-llama/llama3/blob/main/README.md>`_ to gain access to the model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to HF page for access? Much easier and straightforward.

@ebsmothers ebsmothers merged commit 20747cd into pytorch:main Apr 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants