embedding太慢,解决方法
import torch
device = "mps" if torch.backends.mps.is_available() else "cpu"
embed_model = HuggingFaceEmbedding(
model_name="BAAI/bge-large-zh-v1.5",
device=device,
embed_batch_size=16,
)
同时确认
python - <<EOF
import torch
print(torch.backends.mps.is_available())
EOF
看到True
才说明你真的在用 Apple GPU
device = "mps" if torch.backends.mps.is_available() else "cpu"
embed_model = HuggingFaceEmbedding(
model_name="BAAI/bge-large-zh-v1.5",
device=device,
embed_batch_size=16,
)
同时确认
python - <<EOF
import torch
print(torch.backends.mps.is_available())
EOF
看到True
才说明你真的在用 Apple GPU
全部评论
苹果GPU炼丹日常踩坑
慢慢调,总会快的
相关推荐
01-16 11:50
浙江工商大学 Java 点赞 评论 收藏
分享
01-19 12:48
门头沟学院 C++
只想搞钱的鸽子很喜欢...:混账是很多的,还有那些在自己风华正茂的年纪说风凉话讥讽那些下岗前员工的。这些人都是现在职场环境这么烂的帮凶 点赞 评论 收藏
分享
查看5道真题和解析
阿里云成长空间 794人发布