You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift export \
--adapters /workspace/output/v1/checkpoint-800 \
--merge_lora true
合并后使用SentenceTransformer进行推理
from sentence_transformers import SentenceTransformer
# model = SentenceTransformer("iic/gte_Qwen2-1.5B-instruct", trust_remote_code=True)
model = SentenceTransformer("/workspace/output/v1/checkpoint-800-merged", trust_remote_code=True)
# In case you want to reduce the maximum length:
model.max_seq_length = 8192
queries = [...]
documents = [...]
query_embeddings = model.encode(queries, prompt_name="query")
document_embeddings = model.encode(documents)
scores = (query_embeddings @ document_embeddings.T)
lora微调gte embedding, 使用merge后的模型进行推理,结果跟微调的结果相差很大,甚至比初始模型效果还差
shell
merge
合并后使用SentenceTransformer进行推理
使用iic/gte_Qwen2-1.5B-instruct模型,对测试集前十条数据计算得到的分数

使用lora微调iic/gte_Qwen2-1.5B-instruc后合并的模型,对测试集前十条数据计算得到的分数

The text was updated successfully, but these errors were encountered: