Instructions to use KexuanShi/Megatron-LM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use KexuanShi/Megatron-LM with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
| # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | |
| from dataclasses import dataclass | |
| import torch.distributed as dist | |
| from torch import Tensor | |
| class PackedSeqParams: | |
| ''' | |
| parameters to TEDotProductAttention and fused rope kernels for the | |
| `thd` (packed) sequence format | |
| ''' | |
| qkv_format: str = None | |
| cu_seqlens_q: Tensor = None | |
| cu_seqlens_kv: Tensor = None | |
| cu_seqlens_q_padded: Tensor = None | |
| cu_seqlens_kv_padded: Tensor = None | |
| max_seqlen_q: int = None | |
| max_seqlen_kv: int = None | |
| local_cp_size: int = None | |
| cp_group: dist.ProcessGroup = None | |