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

fix: add checks to ensure evaluate model args are valid - #1795

Merged
mergify[bot] merged 2 commits into
instructlab:mainfrom
nathan-weinberg:eval-fixes
Jul 23, 2024
Merged

fix: add checks to ensure evaluate model args are valid#1795
mergify[bot] merged 2 commits into
instructlab:mainfrom
nathan-weinberg:eval-fixes

Conversation

@nathan-weinberg

@nathan-weinberg nathan-weinberg commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

While testing Eval, I noticed we are passing a GGUF file by default to the evaluate command but Evaluation won't fully support GGUF until instructlab/eval#50 is complete

I filed #1792 to track this on the CLI side, but adding this minor check as well in the meantime

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@nathan-weinberg nathan-weinberg added this to the 0.18.0a4 milestone Jul 18, 2024
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jul 18, 2024
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jul 18, 2024
@nathan-weinberg

Copy link
Copy Markdown
Contributor Author

@leseb I noticed you introduced a function is_model_gguf for the backend work - do you think that's worth using here or this check is sufficient? only noticed the func after I'd already written this

@mergify mergify Bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jul 18, 2024
@leseb

leseb commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

@leseb I noticed you introduced a function is_model_gguf for the backend work - do you think that's worth using here or this check is sufficient? only noticed the func after I'd already written this

Yes, that's the proper way to validate the model is GGUF so please use it.

@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.

See: #1795 (comment)

Also, can you add a test case for this? Thanks!

@alimaredia

Copy link
Copy Markdown
Contributor

The root of the issue is that MMLU and MMLU-Branch only work for .safetensors models right now. What we actually want to check is that the model is .safetensors and reject anything else.

Seb and JD worked on adding a check for this here: https://github.com/instructlab/instructlab/blob/main/src/instructlab/model/backends/backends.py#L115

Comment thread src/instructlab/model/evaluate.py Outdated
@mergify mergify Bot added testing Relates to testing ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jul 19, 2024
@nathan-weinberg
nathan-weinberg requested review from booxter and leseb July 19, 2024 17:46
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jul 19, 2024
Comment thread src/instructlab/model/evaluate.py Outdated
@nathan-weinberg nathan-weinberg added the hold In-progress PR. Tag should be removed before merge. label Jul 19, 2024
danmcp
danmcp previously requested changes Jul 19, 2024
Comment thread src/instructlab/model/evaluate.py Outdated
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jul 19, 2024
@mergify mergify Bot removed 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

@nathan-weinberg @alimaredia @alinaryan @danmcp
is the GGUF check being done because eval spins up a vLLM server? If so heads up that I have a PR to check for .bin files in addition to .safetensors files - presence of either would qualify the model as valid since .bin files can also be served via vLLM
this shouldn't break eval, and should allow us to also evaluate .bin models
#1809

@alinaryan alinaryan modified the milestones: 0.18.0a5, 0.18.0a6 Jul 22, 2024
@nathan-weinberg nathan-weinberg changed the title fix: add check to ensure evaluate isn't attempted on GGUF fix: add checks to ensure evaluate model args are valid Jul 23, 2024
…anch

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
@nathan-weinberg

Copy link
Copy Markdown
Contributor Author

@nathan-weinberg @alimaredia @alinaryan @danmcp is the GGUF check being done because eval spins up a vLLM server? If so heads up that I have a PR to check for .bin files in addition to .safetensors files - presence of either would qualify the model as valid since .bin files can also be served via vLLM this shouldn't break eval, and should allow us to also evaluate .bin models #1809

For MTBench and MTBenchBranch, yes we are spinning up a vLLM server but there is also llama-cpp support so GGUF files can be used, though for most users using vLLM and safetensors makes the most sense here

@nathan-weinberg

Copy link
Copy Markdown
Contributor Author

@leseb @alinaryan @booxter I've done a bit of a refactor here - know you all already approved but wanted to give you a ping in case you had any comments on the new code

@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.

Just nits.

Comment thread src/instructlab/model/evaluate.py Outdated

@booxter booxter 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.

It's fine; some ideas on how to improve if you'd like to.

Comment thread src/instructlab/model/evaluate.py Outdated
Comment thread tests/test_lab_evaluate.py
Comment thread tests/test_lab_evaluate.py Outdated
…ch and mt_bench_branch

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
@nathan-weinberg nathan-weinberg removed the hold In-progress PR. Tag should be removed before merge. label Jul 23, 2024
Comment thread src/instructlab/model/evaluate.py
@alinaryan alinaryan modified the milestones: 0.18.0a6, 0.18.0a7 Jul 23, 2024
@nathan-weinberg
nathan-weinberg dismissed danmcp’s stale review July 23, 2024 20:20

Changes were address and Dan is on PTO, can followup need be

@mergify
mergify Bot merged commit 186a367 into instructlab:main Jul 23, 2024
@nathan-weinberg
nathan-weinberg deleted the eval-fixes branch July 23, 2024 20:21
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.

9 participants