Skip to content

add support for TinyLlama model#693

Merged
regisss merged 2 commits into
huggingface:synapse_1.15from
tjs-intel:support-safetensors-oh
Mar 25, 2024
Merged

add support for TinyLlama model#693
regisss merged 2 commits into
huggingface:synapse_1.15from
tjs-intel:support-safetensors-oh

Conversation

@tjs-intel
Copy link
Copy Markdown
Contributor

@tjs-intel tjs-intel commented Feb 7, 2024

⚠️ Do not merge this PR before Habana DeepSpeed 1.15 is released ⚠️

What does this PR do?

The TinyLlama model only has checkpoints in the form of model.safetensors. This checkpoint needs to be included in the list of checkpoints that is passed to DeepSpeed in order for the model to function properly when initialized with DeepSpeed.

This PR adds the safetensor checkpoints to the list of checkpoints passed to DeepSpeed.

Note: This change requires an upstream commit in microsoft/DeepSpeed to be merged downstream to HabanaAI/DeepSpeed in order for DeepSpeed to support the provided safetensor format.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Comment thread optimum/habana/transformers/generation/utils.py Outdated
@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Feb 7, 2024

@mandy-li Do you know if this commit will be part of Habana DeepSpeed 1.15?

@mandy-li
Copy link
Copy Markdown
Collaborator

mandy-li commented Feb 7, 2024

@mandy-li Do you know if this commit will be part of Habana DeepSpeed 1.15?

@regisss , @tjs-intel , DS changes should be submitted to internal habana deepspeed-fork repo

@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Feb 7, 2024

@mandy-li Do you know if this commit will be part of Habana DeepSpeed 1.15?

@regisss , @tjs-intel , DS changes should be submitted to internal habana deepspeed-fork repo

deepspeedai/DeepSpeed@c8c57b8 is part of the v0.13 release of DeepSpeed. I guess it should be part of Habana DeepSpeed 1.15 or 1.16 no?

@mandy-li
Copy link
Copy Markdown
Collaborator

mandy-li commented Feb 7, 2024

@mandy-li Do you know if this commit will be part of Habana DeepSpeed 1.15?

@regisss , @tjs-intel , DS changes should be submitted to internal habana deepspeed-fork repo

microsoft/DeepSpeed@c8c57b8 is part of the v0.13 release of DeepSpeed. I guess it should be part of Habana DeepSpeed 1.15 or 1.16 no?

Yes, will be in 1.15, but we modified it in the internal Habana DS repo.
@tjs-intel , this PR should go to habana oh-fork to test internally.

@tjs-intel
Copy link
Copy Markdown
Contributor Author

OH-fork PR here HabanaAI#25

@tjs-intel tjs-intel force-pushed the support-safetensors-oh branch from 620fd07 to 595cb67 Compare February 8, 2024 16:21
@regisss regisss mentioned this pull request Feb 11, 2024
3 tasks
@tjs-intel tjs-intel force-pushed the support-safetensors-oh branch from 595cb67 to e3f8822 Compare February 13, 2024 20:04
@tjs-intel
Copy link
Copy Markdown
Contributor Author

HabanaAI#25 has been merged

@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Feb 19, 2024

HabanaAI#25 has been merged

So we need to wait for 1.15 to be merged to merge this PR right?

@tjs-intel
Copy link
Copy Markdown
Contributor Author

tjs-intel commented Feb 20, 2024

@regisss I will leave that discussion to the maintainers.

The consequence of merging this before the HabanaAI/DeepSpeed 1.15 release is that the latest released version of HabanaAI/DeepSpeed (1.14) does not support safetensors. If there are any models with both .bin and .safetensors checkpoints, this change will prefer the .safetensors checkpoint and send that to DeepSpeed instead of the .bin checkpoint. This will cause DeepSpeed 1.14 to raise an exception since the .safetensors checkpoint cannot be unpickled.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

Thanks for the clear explanation @tjs-intel! In that case, we'll wait for the release of SynapseAI v1.15 to merge this PR.
Changes look good to me, could you also run the following to make the code style check pass please?

pip install -U ruff
make style

@regisss regisss added the run-test Run CI for PRs from external contributors label Feb 22, 2024
@regisss regisss changed the base branch from main to synapse_1.15 March 25, 2024 17:51
@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Mar 25, 2024

Merging in the synapse_1.15 branch

@regisss regisss merged commit e06fb93 into huggingface:synapse_1.15 Mar 25, 2024
@tjs-intel tjs-intel deleted the support-safetensors-oh branch March 25, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors synapse 1.15

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants