-
I'm currently working on convert official BGE_M3 in hf into mindspore, but I got problem in converting the model weights from hf. 请问在你们的适配中,如何从mindnlp适配的bge_m3对应的hf模型参数中,得到mindspore的模型参数?我试图使用mindconverter,但是因为有太多算子不对应而导致转化失败。 |
Beta Was this translation helpful? Give feedback.
Answered by
lvyufeng
May 21, 2024
Replies: 1 comment
-
用这个代码:https://github.com/mindspore-lab/mindnlp/blob/master/llm/inference/bge_m3/run_bge_m3.py 在拿到model之后,直接保存: import mindspore
......
# Trust remote code is required to load the model
tokenizer = AutoTokenizer.from_pretrained('liuyanyi/bge-m3-hf')
model = AutoModel.from_pretrained('liuyanyi/bge-m3-hf')
mindspore.save_checkpoint(model, 'bge-m3.ckpt') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lvyufeng
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
用这个代码:https://github.com/mindspore-lab/mindnlp/blob/master/llm/inference/bge_m3/run_bge_m3.py
在拿到model之后,直接保存: