Updated some explanations
This commit is contained in:
parent
39423c6a14
commit
9093519c37
@ -120,7 +120,6 @@ def init_distributed_mode():
|
|||||||
DEVICE = f"cuda:{ddp_local_rank}"
|
DEVICE = f"cuda:{ddp_local_rank}"
|
||||||
torch.cuda.set_device(DEVICE)
|
torch.cuda.set_device(DEVICE)
|
||||||
|
|
||||||
|
|
||||||
# torchrun --nproc_per_node 2 1-pretrain.py
|
# torchrun --nproc_per_node 2 1-pretrain.py
|
||||||
# I/O
|
# I/O
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -375,7 +375,6 @@ class Transformer(PreTrainedModel):
|
|||||||
|
|
||||||
self.OUT.__setitem__('logits', logits)
|
self.OUT.__setitem__('logits', logits)
|
||||||
self.OUT.__setitem__('last_loss', self.last_loss)
|
self.OUT.__setitem__('last_loss', self.last_loss)
|
||||||
|
|
||||||
return self.OUT
|
return self.OUT
|
||||||
|
|
||||||
@torch.inference_mode()
|
@torch.inference_mode()
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
感谢[@chuanzhubin](https://github.com/chuanzhubin)贡献此部分内容
|
感谢[@chuanzhubin](https://github.com/chuanzhubin)贡献此部分内容
|
||||||
|
|
||||||
很大程度方便了学习者快速理解!
|
很大程度方便了学习者快速理解
|
Loading…
x
Reference in New Issue
Block a user