华为昇腾-MindX 推荐SDK
| Files | Last commit | Last update |
|---|---|---|
| 5 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 1 year ago | ||
| 7 months ago | ||
| 6 months ago | ||
| 4 months ago | ||
| 5 months ago | ||
| 6 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 1 year ago | ||
| 3 years ago | ||
| 4 months ago | ||
| 3 years ago | ||
| 1 year ago | ||
| 7 months ago | ||
| 1 year ago | ||
| 1 year ago |
Rec SDK
What's New
- [20260224] Documentation restructuring and updated Roadmap (2026Q1)
Roadmap
Introduction
Rec SDK offers an SDK for search, recommendation, and advertising services in the Internet market. It offers a framework for these services based on the Ascend platform to meet related model training requirements, thus supporting large-scale search-recommendation-advertising scenarios and facilitating efficient training of models for such scenarios.
Rec SDK provides the following features:
- Basic model training functions: Rec SDK supports single-node, single-card training and multi-node, multi-card distributed training.
- Recommendation-specific functions: Based on the sparse table solution, Rec SDK provides essential functions such as feature saving and loading, feature admission, and feature eviction.
- Large-scale sparse table functions: Rec SDK supports multi-level storage across accelerator card memory, host memory, and host drive. It also supports multi-node storage and dynamic scaling, with capacities exceeding 10 TB.
Directory Structure
RecSDK/ # Project root directory
|-- build/ # Build scripts, generated wheel packages, and more
|
|-- cust_op/
| |-- ascendc_op # Operators written in Ascend C and executed on the AI Core after compilation, along with their build scripts
| |-- framework # Operator adaptation layer
| |-- hkv # HKV submodule code from https://gitcode.com/Ascend/HierarchicalKV-ascend.git
| |-- test # Operator test cases
| |-- tf_cpu_op # CPU operators
|
|-- docs/ # Project documentation, image build scripts, public network/email addresses, and communication matrix documents
|
|-- training
|-- common # Common components
|-- tf_rec_v1 # Non-fully-offloaded sparse recommendation framework based on TensorFlow, adapted for NPU devices
|-- tf_rec_v2 # Fully-offloaded sparse recommendation framework based on TensorFlow, adapted for NPU devices (PoC)
|-- torch_rec_v1 # Non-fully-offloaded sparse recommendation framework based on open-source PyTorch and TorchRec, adapted for NPU devices
|-- torch_rec_v2 # Fully-offloaded sparse recommendation framework based on open-source PyTorch and TorchRec, adapted for NPU devices (PoC)
Component Description
| Component | Base Framework | Adaptation Status | Framework Type | Description |
|---|---|---|---|---|
| tf_rec_v1 | TensorFlow | Non-fully-offloaded | Sparse recommendation framework | Non-fully-offloaded sparse recommendation framework based on TensorFlow, adapted for NPU devices |
| tf_rec_v2 | TensorFlow | Fully-offloaded | Sparse recommendation framework | Fully-offloaded sparse recommendation framework based on TensorFlow, adapted for NPU devices (PoC) |
| torch_rec_v1 | PyTorch + TorchRec | Non-fully-offloaded | Sparse recommendation framework | Non-fully-offloaded sparse recommendation framework based on open-source PyTorch and TorchRec, adapted for NPU devices |
| torch_rec_v2 | PyTorch + TorchRec | Fully-offloaded | Sparse recommendation framework | Fully-offloaded sparse recommendation framework based on open-source PyTorch and TorchRec, adapted for NPU devices (PoC) |
Key Terminology
- Non-fully-offloaded: A hybrid mode in which some computing tasks are executed on the NPU and others on the CPU
- Fully-offloaded: A mode where all computing tasks are offloaded to the NPU for better performance
- PoC: Proof of concept, indicating that the component is still in the experimental verification phase and features may be incomplete or unstable
Versioning
Typically, Rec SDK has four official release versions per year.
For details about the version updates, see:
Environment Deployment
The following product models are supported:
- Atlas 200T A2 Box16
- Atlas 800T A2 training server
- Atlas 900 A3 SuperPoD
For details about the component deployment methods, see:
Installation from Source
Refer to specific components:
Quick Start
Refer to specific components:
Features
Refer to specific components:
API Reference
Refer to specific components:
Mode Adaptation Examples
| Model | Framework | Component | Description |
|---|---|---|---|
| DIN | PyTorch | torch_rec_v1 | Code link |
| DLRM(DCNv2) | PyTorch | torch_rec_v1 | Code link |
| GR | PyTorch | torch_rec_v1 | Facebook GR model: code Link |
| GR | PyTorch | torch_rec_v1 | NVIDIA recsys-GR model: code Link |
| MMOE, ETA | PyTorch | torch_rec_v1 | Code Link |
| GR | PyTorch | torch_rec_v2 | NVIDIA recsys-GR model: Code Link |
Branch Maintenance Strategy
| Branch | Description | Maintenance Status |
|---|---|---|
| develop | Main development branch | Long-term maintenance |
| develop_examples_and_tools | Demos, model examples, and model-related tools | Active maintenance |
| develop_torch_benchmark | Benchmark model adaptation | Active maintenance |
FAQ
Refer to specific components:
How to Contribute
Before contributing, sign the Open Project Contributor License Agreement (CLA).
- If you encounter a bug, submit an issue.
- If you plan to contribute bug fixes, submit a pull request (PR). See Contribution Requirements.
- If you plan to contribute new features or functionality, create an issue to discuss it with us first. Describe the background or purpose of the requirement, the design, and its impact on existing APIs. Submitting a PR without prior discussion may lead to rejection, as the evolution direction of the project might differ from your ideas.
Contact Us
For more detailed information on communication and contribution, see Contribution Guidelines.
Security Statement
You should re-evaluate the network security posture of the entire system based on specific service requirements. When necessary, consult industry best practices and security experts.
For specific security hardening measures, see specific components:
Disclaimer
This repository contains multiple development branches, which may include unfinished, experimental, or untested features. These branches should not be used in any production environment or service-critical projects before an official release. Ensure you use our official release versions to guarantee stability and security. This project and its contributors are not responsible for any issues, losses, or data corruption resulting from the use of development branches. For official versions, see the release page.
License
Apache License Version 2.0. See the LICENSE file for details.
Documents in the docs directory of the Rec SDK are licensed under CC-BY 4.0. For details, see the LICENSE file.
Acknowledgments
The Rec SDK is jointly developed by the following Huawei departments:
- Ascend Computing Application Enablement Development Dept
- Software Platform Dept, Computing Product Line
- UnifiedBus Computing Cluster Development Dept
- Technology Development Dept, Computing Product Line
- Poisson Lab
Thank you to everyone in the community for your PRs. We warmly welcome your contributions to Rec SDK.