Skip to content

Conversation

bukejiyu
Copy link
Collaborator

@bukejiyu bukejiyu commented Sep 26, 2025

修复 embedding 模型 st_projector 权重加载

embed 模型中的 st_projector 模块无法正常加载权重。
本 PR 修改 load_weights 方法,确保 st_projector 参数正确加载,从而保证模型初始化正常。

影响范围:仅限 embed 模型的 st_projector。


def _load_st_projector(model_config: "ModelConfig") -> Optional[nn.Layer]:
try:
print("Loading ST Projector...")
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@bukejiyu bukejiyu changed the title [pooling]fix st_proj [pooling]Fix weight loading for st_projector in embed models Sep 26, 2025
try:
file_bytes = get_hf_file_to_dict(file_path, model_config.model, model_config.revision)
if not file_bytes:
print(file_path)
Copy link
Collaborator

Choose a reason for hiding this comment

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

调试的print删掉吧

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