nextrec 0.4.4__tar.gz → 0.4.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. {nextrec-0.4.4 → nextrec-0.4.6}/.github/workflows/tests.yml +0 -4
  2. nextrec-0.4.6/PKG-INFO +371 -0
  3. nextrec-0.4.4/README_zh.md → nextrec-0.4.6/README.md +19 -5
  4. nextrec-0.4.4/README.md → nextrec-0.4.6/README_en.md +21 -5
  5. nextrec-0.4.6/dataset/ecommerce_task.csv +10001 -0
  6. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/conf.py +1 -1
  7. nextrec-0.4.6/nextrec/__version__.py +1 -0
  8. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/features.py +4 -0
  9. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/layers.py +103 -24
  10. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/metrics.py +71 -1
  11. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/model.py +11 -13
  12. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/data_processing.py +1 -3
  13. nextrec-0.4.6/nextrec/models/generative/__init__.py +16 -0
  14. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/generative/hstu.py +110 -57
  15. nextrec-0.4.6/nextrec/models/generative/rqvae.py +826 -0
  16. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/masknet.py +1 -1
  17. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/config.py +38 -1
  18. nextrec-0.4.6/nextrec/utils/embedding.py +46 -0
  19. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/initializer.py +5 -5
  20. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/synthetic_data.py +19 -0
  21. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/NextRec-CLI.md +4 -4
  22. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/NextRec-CLI_zh.md +2 -2
  23. {nextrec-0.4.4 → nextrec-0.4.6}/pyproject.toml +3 -1
  24. {nextrec-0.4.4 → nextrec-0.4.6}/requirements.txt +2 -0
  25. nextrec-0.4.6/test/test_generative_models.py +890 -0
  26. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_layers.py +80 -0
  27. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/example_ranking_din.py +0 -1
  28. nextrec-0.4.6/tutorials/notebooks/en/Build semantic ID with RQ-VAE.ipynb +827 -0
  29. nextrec-0.4.6/tutorials/notebooks/zh//344/275/277/347/224/250RQ-VAE/346/236/204/345/273/272/350/257/255/344/271/211ID.ipynb +827 -0
  30. nextrec-0.4.4/PKG-INFO +0 -357
  31. nextrec-0.4.4/nextrec/__version__.py +0 -1
  32. nextrec-0.4.4/nextrec/models/ranking/__init__.py +0 -0
  33. nextrec-0.4.4/nextrec/utils/embedding.py +0 -18
  34. {nextrec-0.4.4 → nextrec-0.4.6}/.github/workflows/publish.yml +0 -0
  35. {nextrec-0.4.4 → nextrec-0.4.6}/.gitignore +0 -0
  36. {nextrec-0.4.4 → nextrec-0.4.6}/.readthedocs.yaml +0 -0
  37. {nextrec-0.4.4 → nextrec-0.4.6}/CODE_OF_CONDUCT.md +0 -0
  38. {nextrec-0.4.4 → nextrec-0.4.6}/CONTRIBUTING.md +0 -0
  39. {nextrec-0.4.4 → nextrec-0.4.6}/LICENSE +0 -0
  40. {nextrec-0.4.4 → nextrec-0.4.6}/MANIFEST.in +0 -0
  41. {nextrec-0.4.4 → nextrec-0.4.6}/assets/Feature Configuration.png +0 -0
  42. {nextrec-0.4.4 → nextrec-0.4.6}/assets/Model Parameters.png +0 -0
  43. {nextrec-0.4.4 → nextrec-0.4.6}/assets/Training Configuration.png +0 -0
  44. {nextrec-0.4.4 → nextrec-0.4.6}/assets/Training logs.png +0 -0
  45. {nextrec-0.4.4 → nextrec-0.4.6}/assets/logo.png +0 -0
  46. {nextrec-0.4.4 → nextrec-0.4.6}/assets/mmoe_tutorial.png +0 -0
  47. {nextrec-0.4.4 → nextrec-0.4.6}/assets/nextrec_diagram_en.png +0 -0
  48. {nextrec-0.4.4 → nextrec-0.4.6}/assets/nextrec_diagram_zh.png +0 -0
  49. {nextrec-0.4.4 → nextrec-0.4.6}/assets/test data.png +0 -0
  50. {nextrec-0.4.4 → nextrec-0.4.6}/dataset/ctcvr_task.csv +0 -0
  51. {nextrec-0.4.4 → nextrec-0.4.6}/dataset/match_task.csv +0 -0
  52. {nextrec-0.4.4 → nextrec-0.4.6}/dataset/movielens_100k.csv +0 -0
  53. {nextrec-0.4.4 → nextrec-0.4.6}/dataset/multitask_task.csv +0 -0
  54. {nextrec-0.4.4 → nextrec-0.4.6}/dataset/ranking_task.csv +0 -0
  55. {nextrec-0.4.4 → nextrec-0.4.6}/docs/en/Getting started guide.md +0 -0
  56. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/Makefile +0 -0
  57. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/index.md +0 -0
  58. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/make.bat +0 -0
  59. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/modules.rst +0 -0
  60. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/nextrec.basic.rst +0 -0
  61. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/nextrec.data.rst +0 -0
  62. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/nextrec.loss.rst +0 -0
  63. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/nextrec.rst +0 -0
  64. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/nextrec.utils.rst +0 -0
  65. {nextrec-0.4.4 → nextrec-0.4.6}/docs/rtd/requirements.txt +0 -0
  66. {nextrec-0.4.4 → nextrec-0.4.6}/docs/zh//345/277/253/351/200/237/344/270/212/346/211/213.md" +0 -0
  67. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/__init__.py +0 -0
  68. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/__init__.py +0 -0
  69. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/activation.py +0 -0
  70. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/callback.py +0 -0
  71. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/loggers.py +0 -0
  72. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/basic/session.py +0 -0
  73. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/cli.py +0 -0
  74. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/__init__.py +0 -0
  75. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/batch_utils.py +0 -0
  76. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/data_utils.py +0 -0
  77. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/dataloader.py +0 -0
  78. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/data/preprocessor.py +0 -0
  79. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/loss/__init__.py +0 -0
  80. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/loss/listwise.py +0 -0
  81. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/loss/loss_utils.py +0 -0
  82. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/loss/pairwise.py +0 -0
  83. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/loss/pointwise.py +0 -0
  84. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/generative/tiger.py +0 -0
  85. {nextrec-0.4.4/nextrec/models/generative → nextrec-0.4.6/nextrec/models/match}/__init__.py +0 -0
  86. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/match/dssm.py +0 -0
  87. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/match/dssm_v2.py +0 -0
  88. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/match/mind.py +0 -0
  89. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/match/sdm.py +0 -0
  90. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/match/youtube_dnn.py +0 -0
  91. {nextrec-0.4.4/nextrec/models/match → nextrec-0.4.6/nextrec/models/multi_task}/__init__.py +0 -0
  92. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/multi_task/esmm.py +0 -0
  93. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/multi_task/mmoe.py +0 -0
  94. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/multi_task/ple.py +0 -0
  95. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/multi_task/poso.py +0 -0
  96. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/multi_task/share_bottom.py +0 -0
  97. {nextrec-0.4.4/nextrec/models/multi_task → nextrec-0.4.6/nextrec/models/ranking}/__init__.py +0 -0
  98. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/afm.py +0 -0
  99. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/autoint.py +0 -0
  100. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/dcn.py +0 -0
  101. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/dcn_v2.py +0 -0
  102. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/deepfm.py +0 -0
  103. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/dien.py +0 -0
  104. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/din.py +0 -0
  105. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/fibinet.py +0 -0
  106. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/fm.py +0 -0
  107. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/pnn.py +0 -0
  108. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/widedeep.py +0 -0
  109. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/models/ranking/xdeepfm.py +0 -0
  110. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/__init__.py +0 -0
  111. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/device.py +0 -0
  112. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/distributed.py +0 -0
  113. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/feature.py +0 -0
  114. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/file.py +0 -0
  115. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/model.py +0 -0
  116. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/optimizer.py +0 -0
  117. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec/utils/tensor.py +0 -0
  118. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/feature_config.yaml +0 -0
  119. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/afm.yaml +0 -0
  120. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/autoint.yaml +0 -0
  121. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/dcn.yaml +0 -0
  122. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/deepfm.yaml +0 -0
  123. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/din.yaml +0 -0
  124. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/esmm.yaml +0 -0
  125. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/fibinet.yaml +0 -0
  126. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/fm.yaml +0 -0
  127. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/masknet.yaml +0 -0
  128. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/mmoe.yaml +0 -0
  129. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/ple.yaml +0 -0
  130. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/pnn.yaml +0 -0
  131. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/poso.yaml +0 -0
  132. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/share_bottom.yaml +0 -0
  133. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/widedeep.yaml +0 -0
  134. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/model_configs/xdeepfm.yaml +0 -0
  135. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/predict_config.yaml +0 -0
  136. {nextrec-0.4.4 → nextrec-0.4.6}/nextrec_cli_preset/train_config.yaml +0 -0
  137. {nextrec-0.4.4 → nextrec-0.4.6}/pytest.ini +0 -0
  138. {nextrec-0.4.4 → nextrec-0.4.6}/scripts/format_code.py +0 -0
  139. {nextrec-0.4.4 → nextrec-0.4.6}/test/__init__.py +0 -0
  140. {nextrec-0.4.4 → nextrec-0.4.6}/test/conftest.py +0 -0
  141. {nextrec-0.4.4 → nextrec-0.4.6}/test/run_tests.py +0 -0
  142. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_losses.py +0 -0
  143. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_match_models.py +0 -0
  144. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_multitask_models.py +0 -0
  145. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_preprocessor.py +0 -0
  146. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_ranking_models.py +0 -0
  147. {nextrec-0.4.4 → nextrec-0.4.6}/test/test_utils.py +0 -0
  148. {nextrec-0.4.4 → nextrec-0.4.6}/test_requirements.txt +0 -0
  149. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/distributed/example_distributed_training.py +0 -0
  150. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/distributed/example_distributed_training_large_dataset.py +0 -0
  151. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/example_match_dssm.py +0 -0
  152. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/example_multitask.py +0 -0
  153. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/movielen_match_dssm.py +0 -0
  154. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/movielen_ranking_deepfm.py +0 -0
  155. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/notebooks/en/Hands on dataprocessor.ipynb +0 -0
  156. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/notebooks/en/Hands on nextrec.ipynb +0 -0
  157. /nextrec-0.4.4/tutorials/notebooks/zh/Hands on dataprocessor.ipynb → /nextrec-0.4.6/tutorials/notebooks/zh//345/246/202/344/275/225/344/275/277/347/224/250DataProcessor/350/277/233/350/241/214/351/242/204/345/244/204/347/220/206.ipynb" +0 -0
  158. /nextrec-0.4.4/tutorials/notebooks/zh/Hands on nextrec.ipynb → /nextrec-0.4.6/tutorials/notebooks/zh//345/277/253/351/200/237/345/205/245/351/227/250nextrec.ipynb" +0 -0
  159. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/run_all_match_models.py +0 -0
  160. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/run_all_multitask_models.py +0 -0
  161. {nextrec-0.4.4 → nextrec-0.4.6}/tutorials/run_all_ranking_models.py +0 -0
@@ -45,10 +45,6 @@ jobs:
45
45
  run: |
46
46
  python -c "import torch; print(f'PyTorch version: {torch.__version__}')"
47
47
  python -c "import nextrec; print('NextRec imported successfully')"
48
-
49
- - name: Format codebase
50
- run: |
51
- python scripts/format_code.py
52
48
 
53
49
  - name: Run tutorial multi-task models
54
50
  run: |
nextrec-0.4.6/PKG-INFO ADDED
@@ -0,0 +1,371 @@
1
+ Metadata-Version: 2.4
2
+ Name: nextrec
3
+ Version: 0.4.6
4
+ Summary: A comprehensive recommendation library with match, ranking, and multi-task learning models
5
+ Project-URL: Homepage, https://github.com/zerolovesea/NextRec
6
+ Project-URL: Repository, https://github.com/zerolovesea/NextRec
7
+ Project-URL: Documentation, https://github.com/zerolovesea/NextRec/blob/main/README.md
8
+ Project-URL: Issues, https://github.com/zerolovesea/NextRec/issues
9
+ Author-email: zerolovesea <zyaztec@gmail.com>
10
+ License-File: LICENSE
11
+ Keywords: ctr,deep-learning,match,pytorch,ranking,recommendation
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: numpy<2.0,>=1.21; sys_platform == 'linux' and python_version < '3.12'
23
+ Requires-Dist: numpy<3.0,>=1.26; sys_platform == 'linux' and python_version >= '3.12'
24
+ Requires-Dist: numpy>=1.23.0; sys_platform == 'win32'
25
+ Requires-Dist: numpy>=1.24.0; sys_platform == 'darwin'
26
+ Requires-Dist: pandas<2.0,>=1.5; sys_platform == 'linux' and python_version < '3.12'
27
+ Requires-Dist: pandas<2.3.0,>=2.1.0; sys_platform == 'win32'
28
+ Requires-Dist: pandas>=2.0.0; sys_platform == 'darwin'
29
+ Requires-Dist: pandas>=2.1.0; sys_platform == 'linux' and python_version >= '3.12'
30
+ Requires-Dist: pyarrow<13.0.0,>=10.0.0; sys_platform == 'linux' and python_version < '3.12'
31
+ Requires-Dist: pyarrow<15.0.0,>=12.0.0; sys_platform == 'win32'
32
+ Requires-Dist: pyarrow>=12.0.0; sys_platform == 'darwin'
33
+ Requires-Dist: pyarrow>=16.0.0; sys_platform == 'linux' and python_version >= '3.12'
34
+ Requires-Dist: pyyaml>=6.0
35
+ Requires-Dist: scikit-learn<2.0,>=1.2; sys_platform == 'linux' and python_version < '3.12'
36
+ Requires-Dist: scikit-learn>=1.3.0; sys_platform == 'darwin'
37
+ Requires-Dist: scikit-learn>=1.3.0; sys_platform == 'linux' and python_version >= '3.12'
38
+ Requires-Dist: scikit-learn>=1.3.0; sys_platform == 'win32'
39
+ Requires-Dist: scipy<1.12,>=1.8; sys_platform == 'linux' and python_version < '3.12'
40
+ Requires-Dist: scipy>=1.10.0; sys_platform == 'darwin'
41
+ Requires-Dist: scipy>=1.10.0; sys_platform == 'win32'
42
+ Requires-Dist: scipy>=1.11.0; sys_platform == 'linux' and python_version >= '3.12'
43
+ Requires-Dist: torch>=2.0.0
44
+ Requires-Dist: torchvision>=0.15.0
45
+ Requires-Dist: tqdm>=4.65.0
46
+ Requires-Dist: transformers>=4.38.0
47
+ Provides-Extra: dev
48
+ Requires-Dist: jupyter>=1.0.0; extra == 'dev'
49
+ Requires-Dist: matplotlib>=3.7.0; extra == 'dev'
50
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
51
+ Requires-Dist: pytest-html>=3.2.0; extra == 'dev'
52
+ Requires-Dist: pytest-mock>=3.11.0; extra == 'dev'
53
+ Requires-Dist: pytest-timeout>=2.1.0; extra == 'dev'
54
+ Requires-Dist: pytest-xdist>=3.3.0; extra == 'dev'
55
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
56
+ Requires-Dist: seaborn>=0.12.0; extra == 'dev'
57
+ Description-Content-Type: text/markdown
58
+
59
+ <p align="center">
60
+ <img align="center" src="assets/logo.png" width="40%">
61
+ <p>
62
+
63
+ <div align="center">
64
+
65
+ ![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
66
+ ![PyTorch](https://img.shields.io/badge/PyTorch-1.10+-ee4c2c.svg)
67
+ ![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)
68
+ ![Version](https://img.shields.io/badge/Version-0.4.6-orange.svg)
69
+
70
+ 中文文档 | [English Version](README_en.md) |
71
+
72
+ **统一、高效、可扩展的推荐系统框架**
73
+
74
+ </div>
75
+
76
+ ## 目录
77
+
78
+ - [简介](#简介)
79
+ - [NextRec进展](#NextRec进展)
80
+ - [安装](#安装)
81
+ - [架构](#架构)
82
+ - [5分钟快速上手](#5分钟快速上手)
83
+ - [命令行工具](#命令行工具)
84
+ - [兼容平台](#兼容平台)
85
+ - [支持模型](#支持模型)
86
+ - [贡献指南](#贡献指南)
87
+
88
+ ## 简介
89
+
90
+ NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程团队提供快速的建模、训练与评估流。框架内置丰富的模型库、数据处理工具和工程化训练组件。此外提供了易上手的接口,命令行工具及教程,推荐算法学习者能以最快速度了解模型架构,复现学术论文并进行训练和部署。
91
+
92
+ ## Why NextRec
93
+
94
+ - **统一的特征工程与数据流水线**:NextRec框架提供了统一的特征定义、可持久化的数据处理、并对批处理进行了优化,符合工业大数据Spark/Hive场景下,基于离线特征的模型训练推理流程。
95
+ - **多场景推荐能力**:覆盖排序(CTR/CVR)、召回、多任务学习、生成式召回等推荐/营销模型,持续跟进业界进展。
96
+ - **友好的工程体验**:支持各种格式数据(`csv/parquet/pathlike`)的流式预处理/分布式训练/推理,GPU加速与可视化指标监控,方便业务算法工程师和推荐算法学习者快速复现实验。
97
+ - **灵活的命令行工具**:支持通过命令行和配置文件,一键启动训练和推理进程,方便快速实验迭代和敏捷部署。
98
+ - **高效训练与评估**:内置多种优化器、学习率调度、早停、模型检查点与详细的日志管理,开箱即用。
99
+
100
+ ## NextRec近期进展
101
+
102
+ - **12/12/2025** 在v0.4.6中加入了生成式召回中常见的[RQ-VAE](/nextrec/models/generative/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynby)已经同步在仓库中
103
+ - **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
104
+ - **03/12/2025** NextRec获得100颗🌟,感谢大家的支持
105
+ - **06/12/2025** 在v0.4.1中支持了单机多卡的分布式DDP训练,并且提供了配套的[代码](tutorials/distributed)
106
+ - **23/11/2025** 在v0.2.2中对basemodel进行了逻辑上的大幅重构和流程统一,并且对listwise/pairwise/pointwise损失进行了统一
107
+ - **11/11/2025** NextRec v0.1.0发布,我们提供了10余种Ranking模型,4种多任务模型和4种召回模型,以及统一的训练/日志/指标管理系统
108
+
109
+ ## 架构
110
+
111
+ NextRec采用模块化工程设计,核心组件包括:Feature Spec驱动的Embedding架构;模型基类BaseModel;独立Layer模块;支持训练和推理的统一的DataLoader;开箱即用的模型库等。
112
+
113
+ ![NextRec架构](assets/nextrec_diagram_zh.png)
114
+
115
+ > 项目的架构借鉴了一些优秀的开源推荐算法库,例如DataWhaleChina社区的[torch-rechub](https://github.com/datawhalechina/torch-rechub)。torch-rechub在开发架构和模型实现上相对成熟,本人也参与了其中一小部分的维护,欢迎感兴趣的开发者前往了解。
116
+
117
+ ---
118
+
119
+ ## 安装
120
+
121
+ 开发者可以通过`pip install nextrec`快速安装NextRec的最新版本,环境要求为Python 3.10+。如果需要执行示例代码,则需要先拉取仓库:
122
+
123
+ ```bash
124
+ git clone https://github.com/zerolovesea/NextRec.git
125
+ cd NextRec/
126
+ pip install nextrec # or pip install -e .
127
+ ```
128
+
129
+ ## 示例代码
130
+
131
+ 我们在`tutorials/` 目录提供了多个示例,覆盖排序、召回、多任务、数据处理等场景:
132
+
133
+ - [movielen_ranking_deepfm.py](/tutorials/movielen_ranking_deepfm.py) - movielen 100k数据集上的 DeepFM 模型训练示例
134
+ - [example_ranking_din.py](/tutorials/example_ranking_din.py) - 电商数据集上的DIN 深度兴趣网络训练示例
135
+ - [example_multitask.py](/tutorials/example_multitask.py) - 电商数据集上的ESMM多任务学习训练示例
136
+ - [movielen_match_dssm.py](/tutorials/example_match_dssm.py) - 基于movielen 100k数据集训练的 DSSM 召回模型示例
137
+
138
+ - [example_distributed_training.py](/tutorials/distributed/example_distributed_training.py) - 使用NextRec进行单机多卡训练的代码示例
139
+
140
+ - [run_all_ranking_models.py](/tutorials/run_all_ranking_models.py) - 快速校验所有排序模型的可用性
141
+ - [run_all_multitask_models.py](/tutorials/run_all_multitask_models.py) - 快速校验所有多任务模型的可用性
142
+ - [run_all_match_models.py](/tutorials/run_all_match_models.py) - 快速校验所有召回模型的可用性
143
+
144
+ 如果想了解更多NextRec框架的细节,我们还提供了Jupyter notebook来帮助你了解:
145
+
146
+ - [如何上手NextRec框架](/tutorials/notebooks/zh/Hands%20on%20nextrec.ipynb)
147
+ - [如何使用数据处理器进行数据预处理](/tutorials/notebooks/zh/Hands%20on%20dataprocessor.ipynb)
148
+ - [使用RQ-VAE构建语义ID](/tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynb)
149
+
150
+ ## 5分钟快速上手
151
+
152
+ 我们提供了详细的上手指南和配套数据集,帮助您熟悉NextRec框架的不同功能。我们在`datasets/`路径下提供了一个来自电商场景的测试数据集,数据示例如下:
153
+
154
+ | user_id | item_id | dense_0 | dense_1 | dense_2 | dense_3 | dense_4 | dense_5 | dense_6 | dense_7 | sparse_0 | sparse_1 | sparse_2 | sparse_3 | sparse_4 | sparse_5 | sparse_6 | sparse_7 | sparse_8 | sparse_9 | sequence_0 | sequence_1 | label |
155
+ |--------|---------|-------------|-------------|-------------|------------|-------------|-------------|-------------|-------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|-----------------------------------------------------------|-----------------------------------------------------------|-------|
156
+ | 1 | 7817 | 0.14704075 | 0.31020382 | 0.77780896 | 0.944897 | 0.62315375 | 0.57124174 | 0.77009535 | 0.3211029 | 315 | 260 | 379 | 146 | 168 | 161 | 138 | 88 | 5 | 312 | [170,175,97,338,105,353,272,546,175,545,463,128,0,0,0] | [368,414,820,405,548,63,327,0,0,0,0,0,0,0,0] | 0 |
157
+ | 1 | 3579 | 0.77811223 | 0.80359334 | 0.5185201 | 0.91091245 | 0.043562356 | 0.82142705 | 0.8803686 | 0.33748195 | 149 | 229 | 442 | 6 | 167 | 252 | 25 | 402 | 7 | 168 | [179,48,61,551,284,165,344,151,0,0,0,0,0,0,0] | [814,0,0,0,0,0,0,0,0,0,0,0,0,0,0] | 1 |
158
+
159
+ 接下来我们将用一个简短的示例,展示如何使用NextRec训练一个DIN(Deep Interest Network)模型。您也可以直接执行`python tutorials/example_ranking_din.py`来执行训练推理代码。
160
+
161
+ 开始训练以后,你可以在`nextrec_logs/din_tutorial`路径下查看详细的训练日志。
162
+
163
+ ```python
164
+ import pandas as pd
165
+ from nextrec.models.ranking.din import DIN
166
+ from nextrec.basic.features import DenseFeature, SparseFeature, SequenceFeature
167
+
168
+ df = pd.read_csv('dataset/ranking_task.csv')
169
+
170
+ for col in df.columns and 'sequence' in col: # csv默认将列表读取成文本,我们需要将其转化为对象
171
+ df[col] = df[col].apply(lambda x: eval(x) if isinstance(x, str) else x)
172
+
173
+ # 我们需要将不同特征进行定义
174
+ dense_features = [DenseFeature(name=f'dense_{i}', input_dim=1) for i in range(8)]
175
+
176
+ sparse_features = [SparseFeature(name='user_id', embedding_name='user_emb', vocab_size=int(df['user_id'].max() + 1), embedding_dim=32), SparseFeature(name='item_id', embedding_name='item_emb', vocab_size=int(df['item_id'].max() + 1), embedding_dim=32),]
177
+
178
+ sparse_features.extend([SparseFeature(name=f'sparse_{i}', embedding_name=f'sparse_{i}_emb', vocab_size=int(df[f'sparse_{i}'].max() + 1), embedding_dim=32) for i in range(10)])
179
+
180
+ sequence_features = [
181
+ SequenceFeature(name='sequence_0', vocab_size=int(df['sequence_0'].apply(lambda x: max(x)).max() + 1), embedding_dim=32, padding_idx=0, embedding_name='item_emb'),
182
+ SequenceFeature(name='sequence_1', vocab_size=int(df['sequence_1'].apply(lambda x: max(x)).max() + 1), embedding_dim=16, padding_idx=0, embedding_name='sparse_0_emb'),]
183
+
184
+ mlp_params = {
185
+ "dims": [256, 128, 64],
186
+ "activation": "relu",
187
+ "dropout": 0.3,
188
+ }
189
+
190
+ model = DIN(
191
+ dense_features=dense_features,
192
+ sparse_features=sparse_features,
193
+ sequence_features=sequence_features,
194
+ mlp_params=mlp_params,
195
+ attention_hidden_units=[80, 40],
196
+ attention_activation='sigmoid',
197
+ attention_use_softmax=True,
198
+ target=['label'], # 目标变量
199
+ device='mps',
200
+ embedding_l1_reg=1e-6,
201
+ embedding_l2_reg=1e-5,
202
+ dense_l1_reg=1e-5,
203
+ dense_l2_reg=1e-4,
204
+ session_id="din_tutorial", # 实验id,用于存放训练日志
205
+ )
206
+
207
+ # 编译模型,设置优化器和损失函数
208
+ model.compile(
209
+ optimizer = "adam",
210
+ optimizer_params = {"lr": 1e-3, "weight_decay": 1e-5},
211
+ loss = "focal",
212
+ loss_params={"gamma": 2.0, "alpha": 0.25},
213
+ )
214
+
215
+ model.fit(
216
+ train_data=df,
217
+ metrics=['auc', 'gauc', 'logloss'], # 添加需要查看的指标
218
+ epochs=3,
219
+ batch_size=512,
220
+ shuffle=True,
221
+ user_id_column='user_id' # 用于计算GAUC的id列
222
+ )
223
+
224
+ # 训练完成后进行指标评估
225
+ metrics = model.evaluate(
226
+ df,
227
+ metrics=['auc', 'gauc', 'logloss'],
228
+ batch_size=512,
229
+ user_id_column='user_id'
230
+ )
231
+ ```
232
+
233
+ ## 命令行工具
234
+
235
+ NextRec 提供了强大的命令行界面,支持通过 YAML 配置文件进行模型训练和预测。详细的 CLI 文档请参见:
236
+
237
+ - [NextRec CLI 使用指南](/nextrec_cli_preset/NextRec-CLI_zh.md) - 完整的 CLI 使用文档
238
+ - [NextRec CLI 配置文件示例](/nextrec_cli_preset/) - CLI 使用配置文件示例
239
+
240
+ ```bash
241
+ # 训练模型
242
+ nextrec --mode=train --train_config=path/to/train_config.yaml
243
+
244
+ # 运行预测
245
+ nextrec --mode=predict --predict_config=path/to/predict_config.yaml
246
+ ```
247
+
248
+ > 截止当前版本0.4.6,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
249
+
250
+ ## 兼容平台
251
+
252
+ 当前最新版本为0.4.6,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
253
+
254
+ | 平台 | 配置 |
255
+ |------|------|
256
+ | MacOS latest| MacBook Pro M4 Pro 24G内存 |
257
+ | Ubuntu latest| AutoDL 4070D 双卡 |
258
+ | Ubuntu 24.04| NVIDIA TITAN V 5卡 |
259
+ | CentOS 7 | Intel Xeon 5138Y 96核 377G内存 |
260
+
261
+ ## 支持模型
262
+
263
+ ### 排序模型
264
+
265
+ | 模型 | 论文 | 年份 | 状态 |
266
+ |------|------|------|------|
267
+ | [FM](nextrec/models/ranking/fm.py) | Factorization Machines | ICDM 2010 | 已支持 |
268
+ | [AFM](nextrec/models/ranking/afm.py) | Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks | IJCAI 2017 | 已支持 |
269
+ | [DeepFM](nextrec/models/ranking/deepfm.py) | DeepFM: A Factorization-Machine based Neural Network for CTR Prediction | IJCAI 2017 | 已支持 |
270
+ | [Wide&Deep](nextrec/models/ranking/widedeep.py) | Wide & Deep Learning for Recommender Systems | DLRS 2016 | 已支持 |
271
+ | [xDeepFM](nextrec/models/ranking/xdeepfm.py) | xDeepFM: Combining Explicit and Implicit Feature Interactions | KDD 2018 | 已支持 |
272
+ | [FiBiNET](nextrec/models/ranking/fibinet.py) | FiBiNET: Combining Feature Importance and Bilinear Feature Interaction for CTR Prediction | RecSys 2019 | 已支持 |
273
+ | [PNN](nextrec/models/ranking/pnn.py) | Product-based Neural Networks for User Response Prediction | ICDM 2016 | 已支持 |
274
+ | [AutoInt](nextrec/models/ranking/autoint.py) | AutoInt: Automatic Feature Interaction Learning | CIKM 2019 | 已支持 |
275
+ | [DCN](nextrec/models/ranking/dcn.py) | Deep & Cross Network for Ad Click Predictions | ADKDD 2017 | 已支持 |
276
+ | [DCN v2](nextrec/models/ranking/dcn_v2.py) | DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems | KDD 2021 | 开发中 |
277
+ | [DIN](nextrec/models/ranking/din.py) | Deep Interest Network for Click-Through Rate Prediction | KDD 2018 | 已支持 |
278
+ | [DIEN](nextrec/models/ranking/dien.py) | Deep Interest Evolution Network for Click-Through Rate Prediction | AAAI 2019 | 已支持 |
279
+ | [MaskNet](nextrec/models/ranking/masknet.py) | MaskNet: Introducing Feature-wise Gating Blocks for High-dimensional Sparse Recommendation Data | 2020 | 已支持 |
280
+
281
+ ### 召回模型
282
+
283
+ | 模型 | 论文 | 年份 | 状态 |
284
+ |------|------|------|------|
285
+ | [DSSM](nextrec/models/match/dssm.py) | Learning Deep Structured Semantic Models | CIKM 2013 | 已支持 |
286
+ | [DSSM v2](nextrec/models/match/dssm_v2.py) | DSSM with pairwise BPR-style optimization | - | 已支持 |
287
+ | [YouTube DNN](nextrec/models/match/youtube_dnn.py) | Deep Neural Networks for YouTube Recommendations | RecSys 2016 | 已支持 |
288
+ | [MIND](nextrec/models/match/mind.py) | Multi-Interest Network with Dynamic Routing | CIKM 2019 | 已支持 |
289
+ | [SDM](nextrec/models/match/sdm.py) | Sequential Deep Matching Model | - | 已支持 |
290
+
291
+ ### 多任务模型
292
+
293
+ | 模型 | 论文 | 年份 | 状态 |
294
+ |------|------|------|------|
295
+ | [MMOE](nextrec/models/multi_task/mmoe.py) | Modeling Task Relationships in Multi-task Learning | KDD 2018 | 已支持 |
296
+ | [PLE](nextrec/models/multi_task/ple.py) | Progressive Layered Extraction | RecSys 2020 | 已支持 |
297
+ | [ESMM](nextrec/models/multi_task/esmm.py) | Entire Space Multi-Task Model | SIGIR 2018 | 已支持 |
298
+ | [ShareBottom](nextrec/models/multi_task/share_bottom.py) | Multitask Learning | - | 已支持 |
299
+ | [POSO](nextrec/models/multi_task/poso.py) | POSO: Personalized Cold-start Modules for Large-scale Recommender Systems | 2021 | 已支持 |
300
+
301
+ ### 生成式模型
302
+
303
+ | 模型 | 论文 | 年份 | 状态 |
304
+ |------|------|------|------|
305
+ | [TIGER](nextrec/models/generative/tiger.py) | Recommender Systems with Generative Retrieval | NeurIPS 2023 | 开发中 |
306
+ | [HSTU](nextrec/models/generative/hstu.py) | Hierarchical Sequential Transduction Units | - | 已支持 |
307
+
308
+ ---
309
+
310
+ ## 贡献指南
311
+
312
+ 我们欢迎任何形式的贡献!
313
+
314
+ ### 如何贡献
315
+
316
+ 1. Fork 本仓库
317
+ 2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
318
+ 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
319
+ 4. 推送到分支 (`git push origin feature/AmazingFeature`)
320
+ 5. 创建 Pull Request
321
+
322
+ > 在提交 PR 之前,请运行 `python test/run_tests.py` 和 `python scripts/format_code.py` 确保所有测试通过并统一代码风格。
323
+
324
+ ### 代码规范
325
+
326
+ - 遵循 PEP 8 Python 代码风格
327
+ - 为新增功能补充单元测试
328
+ - 同步更新相关文档
329
+
330
+ ### 报告错误
331
+
332
+ 在 [Issues](https://github.com/zerolovesea/NextRec/issues) 页面提交问题时,请包含:
333
+
334
+ - 错误描述
335
+ - 重现步骤
336
+ - 期望行为
337
+ - 实际行为
338
+ - 环境信息(Python 版本、PyTorch 版本等)
339
+
340
+ ---
341
+
342
+ ## 许可证
343
+
344
+ 本项目采用 [Apache 2.0 许可证](./LICENSE)。
345
+
346
+ ---
347
+
348
+ ## 联系方式
349
+
350
+ - **GitHub Issues**: [提交问题](https://github.com/zerolovesea/NextRec/issues)
351
+ - **邮箱**: zyaztec@gmail.com
352
+
353
+ ---
354
+
355
+ ## 致谢
356
+
357
+ NextRec 的开发受到以下优秀项目的启发:
358
+
359
+ - [torch-rechub](https://github.com/datawhalechina/torch-rechub) - 灵活且易于扩展的推荐系统框架
360
+ - [FuxiCTR](https://github.com/reczoo/FuxiCTR) - 可配置、可调优、可复现的 CTR 预测库
361
+ - [RecBole](https://github.com/RUCAIBox/RecBole) - 统一、全面、高效的推荐库
362
+
363
+ 感谢开源社区的所有贡献者!
364
+
365
+ ---
366
+
367
+ <div align="center">
368
+
369
+ **[返回顶部](#nextrec)**
370
+
371
+ </div>
@@ -7,9 +7,9 @@
7
7
  ![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
8
8
  ![PyTorch](https://img.shields.io/badge/PyTorch-1.10+-ee4c2c.svg)
9
9
  ![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)
10
- ![Version](https://img.shields.io/badge/Version-0.4.4-orange.svg)
10
+ ![Version](https://img.shields.io/badge/Version-0.4.6-orange.svg)
11
11
 
12
- [English Version](README.md) | 中文文档
12
+ 中文文档 | [English Version](README_en.md) |
13
13
 
14
14
  **统一、高效、可扩展的推荐系统框架**
15
15
 
@@ -18,6 +18,7 @@
18
18
  ## 目录
19
19
 
20
20
  - [简介](#简介)
21
+ - [NextRec进展](#NextRec进展)
21
22
  - [安装](#安装)
22
23
  - [架构](#架构)
23
24
  - [5分钟快速上手](#5分钟快速上手)
@@ -28,7 +29,7 @@
28
29
 
29
30
  ## 简介
30
31
 
31
- NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究与工程团队提供快速的建模、训练与评估流程。框架内置丰富的模型实现、数据处理工具和工程化训练组件,覆盖多种推荐场景。此外提供了易上手的接口,命令行工具及教程,推荐算法学习者能以最快速度了解模型架构,复现学术论文并进行训练和部署。
32
+ NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程团队提供快速的建模、训练与评估流。框架内置丰富的模型库、数据处理工具和工程化训练组件。此外提供了易上手的接口,命令行工具及教程,推荐算法学习者能以最快速度了解模型架构,复现学术论文并进行训练和部署。
32
33
 
33
34
  ## Why NextRec
34
35
 
@@ -38,6 +39,15 @@ NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究与工
38
39
  - **灵活的命令行工具**:支持通过命令行和配置文件,一键启动训练和推理进程,方便快速实验迭代和敏捷部署。
39
40
  - **高效训练与评估**:内置多种优化器、学习率调度、早停、模型检查点与详细的日志管理,开箱即用。
40
41
 
42
+ ## NextRec近期进展
43
+
44
+ - **12/12/2025** 在v0.4.6中加入了生成式召回中常见的[RQ-VAE](/nextrec/models/generative/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynby)已经同步在仓库中
45
+ - **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
46
+ - **03/12/2025** NextRec获得100颗🌟,感谢大家的支持
47
+ - **06/12/2025** 在v0.4.1中支持了单机多卡的分布式DDP训练,并且提供了配套的[代码](tutorials/distributed)
48
+ - **23/11/2025** 在v0.2.2中对basemodel进行了逻辑上的大幅重构和流程统一,并且对listwise/pairwise/pointwise损失进行了统一
49
+ - **11/11/2025** NextRec v0.1.0发布,我们提供了10余种Ranking模型,4种多任务模型和4种召回模型,以及统一的训练/日志/指标管理系统
50
+
41
51
  ## 架构
42
52
 
43
53
  NextRec采用模块化工程设计,核心组件包括:Feature Spec驱动的Embedding架构;模型基类BaseModel;独立Layer模块;支持训练和推理的统一的DataLoader;开箱即用的模型库等。
@@ -67,6 +77,8 @@ pip install nextrec # or pip install -e .
67
77
  - [example_multitask.py](/tutorials/example_multitask.py) - 电商数据集上的ESMM多任务学习训练示例
68
78
  - [movielen_match_dssm.py](/tutorials/example_match_dssm.py) - 基于movielen 100k数据集训练的 DSSM 召回模型示例
69
79
 
80
+ - [example_distributed_training.py](/tutorials/distributed/example_distributed_training.py) - 使用NextRec进行单机多卡训练的代码示例
81
+
70
82
  - [run_all_ranking_models.py](/tutorials/run_all_ranking_models.py) - 快速校验所有排序模型的可用性
71
83
  - [run_all_multitask_models.py](/tutorials/run_all_multitask_models.py) - 快速校验所有多任务模型的可用性
72
84
  - [run_all_match_models.py](/tutorials/run_all_match_models.py) - 快速校验所有召回模型的可用性
@@ -75,6 +87,7 @@ pip install nextrec # or pip install -e .
75
87
 
76
88
  - [如何上手NextRec框架](/tutorials/notebooks/zh/Hands%20on%20nextrec.ipynb)
77
89
  - [如何使用数据处理器进行数据预处理](/tutorials/notebooks/zh/Hands%20on%20dataprocessor.ipynb)
90
+ - [使用RQ-VAE构建语义ID](/tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynb)
78
91
 
79
92
  ## 5分钟快速上手
80
93
 
@@ -174,16 +187,17 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
174
187
  nextrec --mode=predict --predict_config=path/to/predict_config.yaml
175
188
  ```
176
189
 
177
- > 截止当前版本0.4.4,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
190
+ > 截止当前版本0.4.6,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
178
191
 
179
192
  ## 兼容平台
180
193
 
181
- 当前最新版本为0.4.4,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
194
+ 当前最新版本为0.4.6,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
182
195
 
183
196
  | 平台 | 配置 |
184
197
  |------|------|
185
198
  | MacOS latest| MacBook Pro M4 Pro 24G内存 |
186
199
  | Ubuntu latest| AutoDL 4070D 双卡 |
200
+ | Ubuntu 24.04| NVIDIA TITAN V 5卡 |
187
201
  | CentOS 7 | Intel Xeon 5138Y 96核 377G内存 |
188
202
 
189
203
  ## 支持模型
@@ -7,9 +7,9 @@
7
7
  ![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
8
8
  ![PyTorch](https://img.shields.io/badge/PyTorch-1.10+-ee4c2c.svg)
9
9
  ![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)
10
- ![Version](https://img.shields.io/badge/Version-0.4.4-orange.svg)
10
+ ![Version](https://img.shields.io/badge/Version-0.4.6-orange.svg)
11
11
 
12
- English | [中文文档](README_zh.md)
12
+ English | [中文文档](README.md)
13
13
 
14
14
  **A Unified, Efficient, and Scalable Recommendation System Framework**
15
15
 
@@ -18,8 +18,10 @@ English | [中文文档](README_zh.md)
18
18
  ## Table of Contents
19
19
 
20
20
  - [Introduction](#introduction)
21
+ - [NextRec Progress](#nextrec-progress)
21
22
  - [Installation](#installation)
22
23
  - [Architecture](#architecture)
24
+ - [Tutorials](#tutorials)
23
25
  - [5-Minute Quick Start](#5-minute-quick-start)
24
26
  - [CLI Usage](#cli-usage)
25
27
  - [Platform Compatibility](#platform-compatibility)
@@ -28,15 +30,25 @@ English | [中文文档](README_zh.md)
28
30
 
29
31
  ## Introduction
30
32
 
31
- NextRec is a modern recommendation framework built on PyTorch, delivering a unified experience for modeling, training, and evaluation. Design with rich model implementations, data-processing utilities, and engineering-ready training components. NextRec focuses on large-scale industrial recommendation scenarios on Spark clusters, training on massive offline features(`parquet/csv`).
33
+ NextRec is a modern recommendation framework built on PyTorch, delivering a unified experience for modeling, training, and evaluation. Designed with rich model implementations, data-processing utilities, engineering-ready training components, and easy-to-use CLI/tools/tutorials, NextRec helps research/engineering teams quickly build, train, reproduce, and deploy recommendation models.
32
34
 
33
35
  ## Why NextRec
34
36
 
35
37
  - **Unified feature engineering & data pipeline**: NextRec provide unified Dense/Sparse/Sequence feature definitions, DataProcessor, and batch-optimized RecDataLoader, matching offline feature training/inference in industrial big-data settings.
36
38
  - **Multi-scenario coverage**: Ranking (CTR/CVR), retrieval, multi-task learning, and more marketing/rec models, with a continuously expanding model zoo.
37
39
  - **Developer-friendly experience**: `Stream processing/distributed training/inference` for `csv/parquet/pathlike` data, plus GPU/MPS acceleration and visualization support.
40
+ - **Flexible CLI tooling**: Start training and inference via command line and config files for rapid experiment iteration and agile deployment.
38
41
  - **Efficient training & evaluation**: Standardized engine with optimizers, LR schedulers, early stopping, checkpoints, and detailed logging out of the box.
39
42
 
43
+ ## NextRec Progress
44
+
45
+ - **12/12/2025** Added [RQ-VAE](/nextrec/models/generative/rqvae.py), a common module for generative retrieval. Paired [dataset](/dataset/ecommerce_task.csv) and [notebook code](tutorials/notebooks/en/Build%20semantic%20ID%20with%20RQ-VAE.ipynb) are available.
46
+ - **07/12/2025** Released the NextRec CLI tool to run training/inference from configs. See the [guide](/nextrec_cli_preset/NextRec-CLI.md) and [reference code](/nextrec_cli_preset).
47
+ - **03/12/2025** NextRec reached 100 ⭐—thanks for the support!
48
+ - **06/12/2025** Added single-machine multi-GPU DDP training in v0.4.1 with supporting [code](tutorials/distributed).
49
+ - **23/11/2025** Major logical refactor of basemodel and unification of listwise/pairwise/pointwise losses in v0.2.2.
50
+ - **11/11/2025** NextRec v0.1.0 released with 10+ ranking models, 4 multi-task models, 4 retrieval models, and a unified training/logging/metrics system.
51
+
40
52
  ## Architecture
41
53
 
42
54
  NextRec adopts a modular design, enabling full-pipeline reusability and scalability across data processing → model construction → training & evaluation → inference & deployment. Its core components include: a Feature-Spec-driven Embedding architecture, the BaseModel abstraction, a set of independent reusable Layers, a unified DataLoader for both training and inference, and a ready-to-use Model Zoo.
@@ -66,6 +78,8 @@ See `tutorials/` for examples covering ranking, retrieval, multi-task learning,
66
78
  - [example_multitask.py](/tutorials/example_multitask.py) — ESMM multi-task learning training on e-commerce dataset
67
79
  - [movielen_match_dssm.py](/tutorials/example_match_dssm.py) — DSSM retrieval model training on MovieLens 100k dataset
68
80
 
81
+ - [example_distributed_training.py](/tutorials/distributed/example_distributed_training.py) — Single-machine multi-GPU training with NextRec
82
+
69
83
  - [run_all_ranking_models.py](/tutorials/run_all_ranking_models.py) — Quickly validate availability of all ranking models
70
84
  - [run_all_multitask_models.py](/tutorials/run_all_multitask_models.py) — Quickly validate availability of all multi-task models
71
85
  - [run_all_match_models.py](/tutorials/run_all_match_models.py) — Quickly validate availability of all retrieval models
@@ -74,6 +88,7 @@ To dive deeper into NextRec framework details, Jupyter notebooks are available:
74
88
 
75
89
  - [Hands on the NextRec framework](/tutorials/notebooks/en/Hands%20on%20nextrec.ipynb)
76
90
  - [Using the data processor for preprocessing](/tutorials/notebooks/en/Hands%20on%20dataprocessor.ipynb)
91
+ - [Build semantic ID with RQ-VAE](/tutorials/notebooks/en/Build%20semantic%20ID%20with%20RQ-VAE.ipynb)
77
92
 
78
93
  ## 5-Minute Quick Start
79
94
 
@@ -174,16 +189,17 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
174
189
  nextrec --mode=predict --predict_config=path/to/predict_config.yaml
175
190
  ```
176
191
 
177
- > As of version 0.4.4, NextRec CLI supports single-machine training; distributed training features are currently under development.
192
+ > As of version 0.4.6, NextRec CLI supports single-machine training; distributed training features are currently under development.
178
193
 
179
194
  ## Platform Compatibility
180
195
 
181
- The current version is 0.4.4. All models and test code have been validated on the following platforms. If you encounter compatibility issues, please report them in the issue tracker with your system version:
196
+ The current version is 0.4.6. All models and test code have been validated on the following platforms. If you encounter compatibility issues, please report them in the issue tracker with your system version:
182
197
 
183
198
  | Platform | Configuration |
184
199
  |----------|---------------|
185
200
  | MacOS latest | MacBook Pro M4 Pro 24GB RAM |
186
201
  | Ubuntu latest | AutoDL 4070D Dual GPU |
202
+ | Ubuntu 24.04 | NVIDIA TITAN V x5 |
187
203
  | CentOS 7 | Intel Xeon 5138Y 96 cores 377GB RAM |
188
204
 
189
205
  ---