NLPJCL / RAG-Retrieval

Unify Efficient Fine-tuning of RAG Retrieval, including Embedding, ColBERT, ReRanker.
MIT License
506 stars 45 forks source link

怎么更直观的查看模型效果 #6

Closed breath1124 closed 6 months ago

breath1124 commented 7 months ago

在embedding给出的加载模型进行预测示例中,把input编码后打印出张量,我该如何判断我的模型效果 embedding = Embedding.from_pretrained( ckpt_path, ) embedding.to(cuda_device) input_lst = ['我喜欢中国','我爱爬泰山'] embedding = embedding.encode(input_lst,device=cuda_device) print(embedding.tolist())

NLPJCL commented 7 months ago

您好,可以计算下两个向量的余弦相似度,代表两个文本的相似程度。