文件最后提交记录最后更新时间
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
fix link validity Co-authored-by: frozenleaves<914814442@qq.com> # message auto-generated for no-merge-commit merge: !7517 merge master into master fix link validity Created-by: frozenn Commit-by: frozenleaves Merged-by: ascend-robot Description: ## Motivation Please describe the motivation of this PR and the goal you want to achieve through this PR. ## Modification Please briefly describe what modification is made in this PR. ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [ ] The new code needs to comply with the Clean Code specification. - [ ] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/ModelZoo-PyTorch!75171 个月前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
fix link validity Co-authored-by: frozenleaves<914814442@qq.com> # message auto-generated for no-merge-commit merge: !7517 merge master into master fix link validity Created-by: frozenn Commit-by: frozenleaves Merged-by: ascend-robot Description: ## Motivation Please describe the motivation of this PR and the goal you want to achieve through this PR. ## Modification Please briefly describe what modification is made in this PR. ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [ ] The new code needs to comply with the Clean Code specification. - [ ] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/ModelZoo-PyTorch!75171 个月前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
!6057 [fix] Add automatic profiling to some models Merge pull request !6057 from 蓝泽顺/master-lzs 2 年前
规避scatter算子 2 年前
!5476 [自研][PyTorch][DLRM_for_PyTorch]-源码提交 * add source code for DLRM 2 年前
fix link validity Co-authored-by: frozenleaves<914814442@qq.com> # message auto-generated for no-merge-commit merge: !7517 merge master into master fix link validity Created-by: frozenn Commit-by: frozenleaves Merged-by: ascend-robot Description: ## Motivation Please describe the motivation of this PR and the goal you want to achieve through this PR. ## Modification Please briefly describe what modification is made in this PR. ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [ ] The new code needs to comply with the Clean Code specification. - [ ] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/ModelZoo-PyTorch!75171 个月前
!5480 [自研][PyTorch][DLRM_for_PyTorch]-NPU适配 * adapt DLRM on NPU 2 年前
README.md

DLRM for PyTorch

概述

简述

DLRM(Deep Learning Recommendation Model)是深度学习推荐模型的实现,用于个性化推荐。该模型的输入分为稀疏特征和密集特征,同时该模型使用embedding来处理稀疏特征,使用多层感知机(MLP)来处理密集特征;并将这两个结果融合后再输入到多层感知机(MLP)中,来得到最终的结果。

  • 参考实现:

    url=https://github.com/facebookresearch/dlrm
    commit_id=adb39923b2e670bf8b7bde694de2a84396e818fa
    
  • 适配昇腾 AI 处理器的实现:

    url=https://gitcode.com/ascend/ModelZoo-PyTorch.git
    code_path=PyTorch/contrib/others/
    

准备训练环境

该模型为随版本演进模型(随版本演进模型范围可在此处查看),您可以根据下面提供的安装指导选择匹配的CANN等软件下载使用。

准备环境

准备数据集

  1. 获取数据集

    用户自行获取原始数据集,数据集为kaggle所提供的Criteo数据集,将获得的数据集上传到服务器的任意路径,数据集目录结构参考如下:

     $data_path
       └── day_0
       └── day_1
       
    

    说明: 该数据集的训练过程脚本只作为一种参考示例。

开始训练

训练模型

  1. 进入解压后的源码包根目录。

     cd /${模型文件名称} 
    
  2. 运行训练脚本。

    该模型支持单机单卡训练。

    • 单机单卡训练

      启动单卡训练。

      bash ./test/train_full_8p.sh --data_path=$data_path  # 8卡精度训练
      bash ./test/train_performance_8p.sh --data_path=$data_path  # 8卡性能 
      

--data_path参数填写数据集的路径,需写到数据集的一级目录。

模型训练脚本参数说明如下。

公共参数:
--data_path                     //训练集路径
--test-freq                     //每多少step进行eval
--loss-function                 //损失函数
--learning-rate                 //学习率 
--mini-batch-size               //batchsize
--print-freq                    //每多少step打印一次
--nepochs                       //训练的epoch数
--local_rank                    //使用哪张卡进行训练
--use-npu                       //是否使用NPU进行训练

训练完成后,权重文件保存在当前路径下,并输出模型训练精度和性能信息。

训练结果展示

表 2 训练结果展示表

NAME AUC FPS Epoch Torch_Version
8p-竞品V 0.7989 555389 1 1.11
8p-NPU 0.7988 585142 1 1.11

版本说明

变更

2023.09.06:首次发布。

FAQ

无。