跳到主要内容
Open on GitHub

Ascend

昇腾 (Ascend) 是华为提供的自然处理单元。

本页面介绍如何在 LangChain 中使用昇腾 (Ascend) NPU。

安装

使用 torch-npu 进行安装

pip install torch-npu

请按照下方指定的安装说明进行操作

  • 请按照此处所示安装 CANN。

嵌入模型

请参阅使用示例

from langchain_community.embeddings import AscendEmbeddings
API 参考:AscendEmbeddings
© . This site is unofficial and not affiliated with LangChain, Inc.
这些文档随着 LangChain v1.0 在 2025 年 10 月的发布而弃用,并且不再维护。 请访问 v1.0 文档