> ## Documentation Index
> Fetch the complete documentation index at: https://starforge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# sf export

> Convert a checkpoint to HuggingFace format

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf export my-grpo \
  --checkpoint checkpoints/step_500 \
  --checkpoint-format nemo-dcp
```

把训练 checkpoint 转成 HuggingFace 格式——Playground、模型部署，以及这个平台之外的一切，
能加载的都是这个格式。

`--checkpoint` 填产物登记表里记录的那个路径，从作业的 Artifacts 页或
[`sf job status`](/zh-Hans/cli/job) 读。`--checkpoint-format` 必须和框架实际写出的格式一致；
填错会尽早失败，并列出它接受哪些格式。

## 推到 Hub

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf export my-grpo \
  --checkpoint checkpoints/step_500 --checkpoint-format nemo-dcp \
  --push-repo alice/qwen-support-v3
```

需要先关联 Hugging Face 账号，见 [Hugging Face](/zh-Hans/integrations/huggingface)。

## 训练后自动导出

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf submit my-grpo --profile h200:8 --then export
```

run 一成功就导出最后一个 checkpoint，不用谁去记着这件事。

## `sf export`

Convert a checkpoint to HuggingFace format

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf export <EXP> [options]
```

| 参数    | 说明                               |
| ----- | -------------------------------- |
| `EXP` | Experiment name or path (**必填**) |

| 选项                    | 说明                                                                                        |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `--checkpoint`        | Checkpoint path as recorded in the artifact registry (**必填**)                             |
| `--checkpoint-format` | nemo-dcp \| nemo-megatron \| verl-fsdp \| verl-megatron \| huggingface (**必填**)           |
| `--push-repo`         | Upload the converted weights to this HF Hub repo (user/name, needs HF\_TOKEN)             |
| `--profile`           | Hardware profile (managed by the server registry; `sf status` lists the available values) |
| `--allow-dirty`       | Allow uncommitted changes in the working tree                                             |
| `--dry-run`           | Only print the command that would be submitted                                            |
