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

微调bge-reranker-v2-minicpm-layerwise,添加教师分数脚本用的compute score是不是应该跟推理原生模型时一样? #1371

Open
zhangying950 opened this issue Feb 11, 2025 · 1 comment

Comments

@zhangying950
Copy link

加载Reranker模型

loaded_reranker_model = LayerWiseFlagLLMReranker(
'path_to_original_bge-reranker-v2-minicpm-layerwise',
model_class='decoder-only-layerwise',
query_max_length=256,
passage_max_length=1024,
use_fp16=True,
devices=['cuda:1']
)

推理:
scores = compute_score(pairs, cutoff_layers=[28],normalize=True)

添加教师分数:
scores = compute_score(pairs, cutoff_layers=[28])

这样得到的教师分数可以用于finetune吗?cutoff_layers、normalize是需要的吗?

@545999961
Copy link
Collaborator

可以用scores = compute_score(pairs, cutoff_layers=[28])获得教师分数,normalize是不需要的,cutoff_layers视情况而定

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

No branches or pull requests

2 participants