Commit 592a499
authored
[Bug Fix] Add metadata as input for sharded_state_dict to follow latest Megatron code change (#606)
## What does this PR do?
**Type of change:** ? <!-- Use one of the following: Bug fix, new
feature, new example, new tests, documentation. --> Bug fix
**Overview:**? Add metadata as input for sharded_state_dict to follow
latest Megatron Core [code
change](NVIDIA/Megatron-LM@a2a1c89)
## Usage
<!-- You can potentially add a usage example below. -->
```python
# Add a code snippet demonstrating how to use this
```
## Testing
<!-- Mention how have you tested your change if applicable. -->
under Megatron-Bridge repo, the command below could run smoothly
```
pytest tests/functional_tests/quantization/test_quantization_workflow.py -v -s
```
Before the fix, error is like
[this](https://github.com/NVIDIA-NeMo/Megatron-Bridge/actions/runs/19511909221/job/55906907649#step:3:7038)
## Before your PR is "*Ready for review*"
<!-- If you haven't finished some of the above items you can still open
`Draft` PR. -->
- **Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)**
and your commits are signed.
- **Is this change backward compatible?**: Yes/No <!--- If No, explain
why. -->
- **Did you write any new necessary tests?**: Yes/No
- **Did you add or update any necessary documentation?**: Yes/No
- **Did you update
[Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**:
Yes/No <!--- Only for new features, API changes, critical bug fixes or
bw breaking changes. -->
## Additional Information
<!-- E.g. related issue. -->
---------
Signed-off-by: James Shen <yueshen@nvidia.com>1 parent f06c3f9 commit 592a499
File tree
2 files changed
+58
-3
lines changed- modelopt/torch
- quantization/plugins
- sparsity/weight_sparsity/plugins
2 files changed
+58
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
233 | 257 | | |
234 | 258 | | |
235 | 259 | | |
| |||
285 | 309 | | |
286 | 310 | | |
287 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
288 | 315 | | |
289 | 316 | | |
290 | 317 | | |
| |||
294 | 321 | | |
295 | 322 | | |
296 | 323 | | |
297 | | - | |
| 324 | + | |
298 | 325 | | |
299 | 326 | | |
300 | 327 | | |
| |||
310 | 337 | | |
311 | 338 | | |
312 | 339 | | |
313 | | - | |
| 340 | + | |
314 | 341 | | |
315 | 342 | | |
316 | 343 | | |
| |||
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
28 | 53 | | |
29 | 54 | | |
30 | 55 | | |
31 | 56 | | |
32 | 57 | | |
33 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
34 | 62 | | |
35 | 63 | | |
36 | 64 | | |
| |||
0 commit comments