Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions keras_hub/src/models/qwen3/qwen3_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,40 @@
},
"kaggle_handle": "kaggle://keras/qwen-3/keras/qwen3_32b_en/1",
},
"qwen3_embedding_0.6b_en": {
"metadata": {
"description": (
"This text embedding model features a 32k context length and "
"offers flexible, user-defined embedding dimensions that can "
"range from 32 to 1024."
),
"params": 595776512,
"path": "qwen3",
},
"kaggle_handle": "kaggle://keras/qwen-3-embedding/keras/qwen3_embedding_0.6b_en/1",
},
"qwen3_embedding_4b_en": {
"metadata": {
"description": (
"This text embedding model features a 32k context length and "
"offers flexible, user-defined embedding dimensions that can "
"range from 32 to 2560."
),
"params": 4021774336,
"path": "qwen3",
},
"kaggle_handle": "kaggle://keras/qwen-3-embedding/keras/qwen3_embedding_4b_en/1",
},
"qwen3_embedding_8b_en": {
"metadata": {
"description": (
"This text embedding model features a 32k context length and "
"offers flexible, user-defined embedding dimensions that can "
"range from 32 to 4096."
),
"params": 8188515328,
"path": "qwen3",
},
"kaggle_handle": "kaggle://keras/qwen-3-embedding/keras/qwen3_embedding_8b_en/1",
},
Comment on lines +73 to +108
Copy link
Contributor

Choose a reason for hiding this comment

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

high

These new presets for Qwen3 embedding models have been added, but there are no corresponding tests to verify they work correctly. According to the repository's style guide, testing is a non-negotiable part of every contribution, and presets should be tested to confirm they can be loaded.1

Please add a new test case to keras_hub/src/models/qwen3/qwen3_backbone_test.py to validate at least the smallest of the new presets, qwen3_embedding_0.6b_en, using self.run_preset_test().

For example:

@pytest.mark.large
def test_embedding_preset(self):
    self.run_preset_test(
        cls=Qwen3Backbone,
        preset="qwen3_embedding_0.6b_en",
        input_data=self.input_data,
        # The output shape might need adjustment based on the preset's hidden_dim.
        expected_output_shape=(2, 5, 1024),
    )

Style Guide References

Footnotes

  1. The style guide states that testing is a non-negotiable part of every contribution and that presets must be tested to ensure they can be loaded correctly using self.run_preset_test().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this test case will cover above presets as well. no need of test case here.

https://github.com/keras-team/keras-hub/blob/master/keras_hub/src/models/qwen3/qwen3_causal_lm_test.py#L118

}
Loading