You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you fail to install the megatron-core package, usually due to the python version incompatibility, please try to clone and then install the source code.
Copy file name to clipboardExpand all lines: examples/hstu/training/README.md
+49-3Lines changed: 49 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,43 @@
1
1
# HSTU Training example
2
-
We have supported both retrieval and ranking model whose backbones are HSTU layers. In this example collection, we allow user to specify the model structures via gin-config file. Supported datasets are listed below. Regarding the gin-config interface, please refer to [here](../utils/gin_args_doc.md) .
2
+
We have supported both retrieval and ranking model whose backbones are HSTU layers. In this example collection, we allow user to specify the model structures via gin-config file. Supported datasets are listed below. Regarding the gin-config interface, please refer to [inline comments](../utils/gin_config_args.py) .
3
+
## Environment Setup
4
+
### Start from dockerfile
3
5
4
-
## Dataset Introduction
6
+
We provide [dockerfile](./docker/Dockerfile) for users to build environment.
If you fail to install the megatron-core package, usually due to the python version incompatibility, please try to clone and then install the source code.
We provide our custom HSTU CUDA operators for enhanced performance. You need to install these operators using the following command:
35
+
36
+
```bash
37
+
cd /workspace/recsys-examples/examples/hstu && \
38
+
python setup.py install
39
+
```
40
+
### Dataset Introduction
5
41
6
42
We have supported several datasets as listed in the following sections:
7
43
@@ -20,8 +56,18 @@ refer to [KuaiRand](https://kuairand.com/) for details.
20
56
21
57
## Running the examples
22
58
23
-
Before getting started, please make sure that all pre-requisites are fulfilled. You can refer to [Get Started][../../../README] section in the root directory of the repo to set up the environment.****
59
+
Before getting started, please make sure that all pre-requisites are fulfilled. You can refer to [Get Started](../../../README) section in the root directory of the repo to set up the environment.
60
+
24
61
62
+
### Dataset preprocessing
63
+
64
+
In order to prepare the dataset for training, you can use our `preprocessor.py` under the hstu example folder of the project.
The entrypoint for training are `pretrain_gr_retrieval.py` or `pretrain_gr_ranking.py`. We use gin-config to specify the model structure, training arguments, hyper-params etc.
0 commit comments