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
Copy file name to clipboardExpand all lines: torchtitan/models/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,14 +39,16 @@ The folder should be organized as follows
39
39
- Include other util files if necessary.
40
40
-`__init__.py`
41
41
- A dictionary of the actual model configurations, of the type `[str: ModelArgs]`.
42
-
-Call `register_train_spec` to specify a [`TrainSpec`](/torchtitan/protocols/train_spec.py), consisting a tuple of
42
+
-Define `get_train_spec` to return a [`TrainSpec`](/torchtitan/protocols/train_spec.py), consisting a tuple of
43
43
- model name, model class, model args
44
+
- Model name should be the same as the folder name, which should be added to `torchtitan/models/__init__.py` or ``torchtitan/experiments/__init__.py``.
44
45
- parallelizing function, pipelining function
45
46
- builder functions for optimizer, lr scheduler, data loader, tokenizer, and loss function
46
47
- More often than not, existing components can be reused.
47
48
- Adding new datasets requires the `torchtitan` team’s review and legal approval.
48
49
- Try to have minimal dependency on external libraries, if any.
49
50
- state dict adapter
51
+
- If developing outside of torchtitan, one can call `register_train_spec` to register a `TrainSpec` so that `train.py` can be reused.
50
52
- Read [more](/docs/extension.md#trainspec) on `TrainSpec`.
51
53
-`README.md`
52
54
- Include [instructions](/README.md#downloading-a-tokenizer) to download tokenizers / encoders.
0 commit comments