THUDM / THUDM/slime

[Suggestion] Check the HF and the script config in conversion tool

Open
#1,059 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

I absolutely love your 0.2.0 update! During our usage, some colleagues mistakenly modify configurations in scripts/models, but tools/convert_hf_to_torch_dist.py doesn't seem to check whether the HF config matches the config in scripts/models. We noticed that there's a dedicated function called hf_validate_args in utils/arguments.py that performs this validation. If there are issues with the weights after conversion, it can cause silent errors during training (no error messages at all!). Maybe this validation check can be added to the conversion tool. Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tools/convert_hf_to_torch_dist.py and inspect how it handles configurations before conversion. Read hf_validate_args in utils/arguments.py to understand the existing validation, then ensure the conversion tool checks the HF configuration against scripts/models and reports mismatches before producing weights.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.