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

[WIP] ENH Add support for Qwen2 #1906

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

BenjaminBossan
Copy link
Member

@BenjaminBossan BenjaminBossan commented Jul 4, 2024

Add Qwen2 to default target modules, use tiny Qwen2 in tests.

Some tests are still be failing, waiting for #1901. Done.

Add Qwen2 to default target modules, use tiny Qwen2 in tests.
@HuggingFaceDocBuilderDev

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.

@@ -1419,6 +1419,9 @@ def _test_weighted_combination_of_adapters(self, model_id, config_cls, config_kw
if issubclass(config_cls, AdaLoraConfig):
# AdaLora does not support adding more than 1 adapter
return pytest.skip(f"Test not applicable for {config_cls}")
if model_id.endswith("qwen2"):
Copy link
Member

Choose a reason for hiding this comment

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

Is model_id a sufficiently reliable way to detect if the model is qwen2 type? Could we not look into its config and infer it from there?

Copy link
Member Author

Choose a reason for hiding this comment

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

For prod code, I would agree, but this is just for the list of unit tested models, where we wouldn't introduce a different qwen2 architecture, as that would not help test coverage. Even if we did, the worst thing that could happen is that the test would fail. I prefer to have the code that skips the test collected in one place as early as possible in the function body, which is why I don't want to do this after initializing the config.

Copy link
Member

Choose a reason for hiding this comment

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

Make sense. I will respect your judgement then.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. Could you approve then?

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Overall looks harmless to me. Just a single comment.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Sorry for forgetting to approve.

@sayakpaul sayakpaul merged commit ebcd079 into huggingface:main Jul 23, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the enh-add-support-qwen2 branch July 23, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants