-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add paddle nv-embed-v1 #8785
add paddle nv-embed-v1 #8785
Conversation
Thanks for your contribution! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8785 +/- ##
===========================================
+ Coverage 55.44% 55.58% +0.14%
===========================================
Files 626 630 +4
Lines 98065 98382 +317
===========================================
+ Hits 54368 54683 +315
- Misses 43697 43699 +2 ☔ View full report in Codecov by Sentry. |
hf_model = LoRAModel.from_pretrained(base_model, peft_model_name, lora_config=lora_config, dtype="bfloat16") | ||
return hf_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hf_model -> model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
self.cross_attend_blocks_0_fn_to_kv = paddle.nn.Linear(in_features=4096, out_features=65536, bias_attr=False) | ||
self.cross_attend_blocks_0_fn_to_out = paddle.nn.Linear(in_features=32768, out_features=4096, bias_attr=False) | ||
self.cross_attend_blocks_0_fn_to_q = paddle.nn.Linear(in_features=4096, out_features=32768, bias_attr=False) | ||
self.cross_attend_blocks_0_norm = paddle.nn.LayerNorm(4096) | ||
self.cross_attend_blocks_0_norm_context = paddle.nn.LayerNorm(4096) | ||
|
||
self.cross_attend_blocks_1_fn_net_0 = paddle.nn.Linear(in_features=4096, out_features=32768) | ||
self.cross_attend_blocks_1_fn_net_2 = paddle.nn.Linear(in_features=16384, out_features=4096) | ||
self.cross_attend_blocks_1_norm = paddle.nn.LayerNorm(4096) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个模型里面的参数大小为什么是写死的? 既然是基于Mistral,应该基于MistralConfig里面的大小
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改为:使用config.json中的参数值
``` | ||
export CUDA_VISIBLE_DEVICES=0 | ||
python eval_mteb.py \ | ||
--base_model_name_or_path NV-Embed-v1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个NV-Embed-v1 是怎么得到的呢?从torch 转过来的吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,陆老师发您的文件就是从torch转过来的paddle版本的NV-Embed-v1模型权重
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR types
New features
PR changes
Models
Description
add paddle nv-embed-v1 embedding model, and integrate it into the MTEB evaluation framework