Skip to content

Commit 3431865

Browse files
OlegSudakovyaoyu-33
authored andcommitted
Fix for one-liner and addition of helper script in model conversion doc
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
1 parent 84ad990 commit 3431865

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎docs/bridge-guide.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,25 @@ huggingface-cli login --token <your token>
239239
uv run python -c "from megatron.bridge import AutoBridge; AutoBridge.import_ckpt('meta-llama/Llama-3.2-1B','./megatron_checkpoints/llama32_1b')"
240240
```
241241

242+
Or with a helper script:
243+
244+
```bash
245+
huggingface-cli login --token <your token>
246+
uv run python examples/conversion/convert_checkpoints.py import --hf-model meta-llama/Llama-3.2-1B --megatron-path ./megatron_checkpoints/llama32_1b
247+
```
248+
242249
### Megatron → HF export (one call)
243250

244251
```bash
245252
uv run python -c "from megatron.bridge import AutoBridge; b=AutoBridge.from_hf_pretrained('meta-llama/Llama-3.2-1B'); b.export_ckpt('./megatron_checkpoints/llama32_1b','./hf_exports/llama32_1b')"
246253
```
247254

255+
Or with a helper script:
256+
257+
```bash
258+
uv run python examples/conversion/convert_checkpoints.py export --hf-model meta-llama/Llama-3.2-1B --megatron-path ./megatron_checkpoints/llama32_1b --hf-path ./hf_exports/llama32_1b
259+
```
260+
248261
### Create Megatron models and run locally
249262

250263
```bash

0 commit comments

Comments
 (0)