[booster] implemented mixed precision class (#3151)

* [booster] implemented mixed precision class

* polish code
This commit is contained in:
Frank Lee
2023-03-17 11:00:15 +08:00
committed by GitHub
parent ecd643f1e4
commit ed19290560
13 changed files with 410 additions and 40 deletions

View File

@@ -6,7 +6,7 @@ from ..registry import ModelAttribute, model_zoo
# ===============================
# Register single-sentence GPT
# ===============================
BATCH_SIZE = 2
BATCH_SIZE = 1 # it can only be 1 as GPT cannot handle batch sizes > 1 if no padding token is defined.
SEQ_LENGTH = 16