Skip to main content

unofficial-ascend-tools

Project description

Ascend NPU accelerate Embedding model

Please ensure that you haved installed CANN and torch_npu.

Example:

  1. source the environment
source /usr/local/Ascend/ascend-toolkit/env.sh
  1. install torch and torch_npu

  2. now use like bellow

from unofficial_ascend_tools.embeddings import AscendEmbeddings
model = AscendEmbeddings(model_path=<path_to_model>,
    device_id=0,
    query_instruction="Represend this sentence for searching relevant passages: "
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

unofficial_ascend_tools-0.0.3-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page