Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

removes tokenizer.model from required safetensors model files" - #1793

Merged
mergify[bot] merged 1 commit into
instructlab:mainfrom
JamesKunstle:fix-safetensors-files
Jul 19, 2024
Merged

removes tokenizer.model from required safetensors model files"#1793
mergify[bot] merged 1 commit into
instructlab:mainfrom
JamesKunstle:fix-safetensors-files

Conversation

@JamesKunstle

Copy link
Copy Markdown
Contributor

tokenizer.model isn't required for a model directory to be a .safetensors model- this broke model loading for me because the checkpoints that we save don't have this file. This appears to be a common, but not a required file. (look at metaai/llama3-8b)

@JamesKunstle
JamesKunstle requested a review from jaideepr97 July 18, 2024 21:40
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jul 18, 2024
@JamesKunstle JamesKunstle added the bug Something isn't working label Jul 18, 2024
@JamesKunstle
JamesKunstle force-pushed the fix-safetensors-files branch from a3fccd7 to a8129ba Compare July 18, 2024 22:22
Comment thread tests/test_backends.py
f.write("")
if valid:
with open(
safetensors_model_path / "tokenizer.model", "a+", encoding="UTF-8"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

needed to remove this from the test too haha

@mergify mergify Bot added the testing Relates to testing label Jul 18, 2024
@JamesKunstle
JamesKunstle force-pushed the fix-safetensors-files branch from a8129ba to fc3872e Compare July 18, 2024 22:23
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jul 18, 2024
@JamesKunstle
JamesKunstle requested review from leseb, russellb and tiran July 18, 2024 22:34
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jul 18, 2024
@JamesKunstle

Copy link
Copy Markdown
Contributor Author

Requires test fix that's updated in #1791

@leseb leseb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On paper, the change makes sense to me, please:

  • look into the test failures
  • update your commit message to match the PR description

Thanks!

@jaideepr97 jaideepr97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JamesKunstle LGTM as well, sorry for breaking this for you!
will approve after all CI checks pass

Comment thread tests/test_backends.py
@JamesKunstle
JamesKunstle force-pushed the fix-safetensors-files branch from fc3872e to e7a84f6 Compare July 19, 2024 14:50
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jul 19, 2024
@JamesKunstle

Copy link
Copy Markdown
Contributor Author

On paper, the change makes sense to me, please:

  • look into the test failures
  • update your commit message to match the PR description

Thanks!

@leseb I updated the commit message- the current test failure is because I'm fixing the code and the test at once- how do we handle this failure state?

@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jul 19, 2024
@jaideepr97

jaideepr97 commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

the current test failure is because I'm fixing the code and the test at once- how do we handle this failure state?

@JamesKunstle not sure I follow, it's pretty standard to make code and test changes in the same PR, no? The CI should just run the test as is in your branch

@ktam3 ktam3 added this to the 0.18.0 milestone Jul 19, 2024
@JamesKunstle

Copy link
Copy Markdown
Contributor Author

the current test failure is because I'm fixing the code and the test at once- how do we handle this failure state?

@JamesKunstle not sure I follow, it's pretty standard to make code and test changes in the same PR, no? The CI should just run the test as is in your branch

You're right, was typing too quickly. I think this actually breaks the test- will investigate.

tokenizer.model isn't required for a model directory to be a .safetensors model-
this broke model loading for me because the checkpoints that we save don't have this file.
This appears to be a common, but not a required file. (look at metaai/llama3-8b)

Signed-off-by: James Kunstle <jkunstle@redhat.com>
@JamesKunstle
JamesKunstle force-pushed the fix-safetensors-files branch from e7a84f6 to 240f1cc Compare July 19, 2024 17:52
@JamesKunstle

Copy link
Copy Markdown
Contributor Author

answer: test setup should've written json_object to config.json rather than empty string.

@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jul 19, 2024
@nathan-weinberg
nathan-weinberg self-requested a review July 19, 2024 18:17
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jul 19, 2024
@nathan-weinberg nathan-weinberg removed the bug Something isn't working label Jul 19, 2024

@jaideepr97 jaideepr97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jul 19, 2024
@JamesKunstle
JamesKunstle requested a review from RobotSail July 19, 2024 19:46

@RobotSail RobotSail left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@mergify
mergify Bot merged commit 19e226c into instructlab:main Jul 19, 2024
@ktam3 ktam3 modified the milestones: 0.18.0, 0.18.0a4 Jul 22, 2024
@alinaryan alinaryan modified the milestones: 0.18.0a4, 0.18.0a5 Jul 22, 2024
@JamesKunstle
JamesKunstle deleted the fix-safetensors-files branch August 3, 2024 00:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants