Skip to content
Back to skills

Checkpoint Export

ASecurity

"Guides Huatuo-Llama-Med-Chinese LoRA adapter checkpoint export

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
tools

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill checkpoint-export --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Checkpoint Export?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Checkpoint Export
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-checkpoint-export-arex-skill/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-checkpoint-export-arex-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: checkpoint-export
description: "Guides Huatuo-Llama-Med-Chinese LoRA adapter checkpoint export
  into Hugging Face and original LLaMA layouts."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# checkpoint-export

Use this sub-skill when the task is to merge a Huatuo-Llama-Med-Chinese LoRA adapter with its base model and export the result as either a Hugging Face checkpoint or an original LLaMA-style state-dict checkpoint.

## Read first

- [references/workflows.md](references/workflows.md) for supported export modes, required inputs, adapter assumptions, output layouts, and the LLaMA-7B state-dict mapping.
- [references/troubleshooting.md](references/troubleshooting.md) for `BASE_MODEL` assertion failures, hard-coded adapter defaults, missing local files, architecture mismatches, memory/storage pressure, and PEFT/Transformers compatibility issues.
- [scripts/build_export_command.py](scripts/build_export_command.py) to build a dry-run, self-contained export command template without importing Torch or Transformers in the helper itself.

## Route here

Route here for:

- LoRA adapter merge/export planning.
- Building a safe dry-run command for Hugging Face `hf_ckpt/` output.
- Building a safe dry-run command for original LLaMA `ckpt/` output.
- Explaining why state-dict export is limited to LLaMA-7B-compatible models.

## Route elsewhere

- Training or re-training LoRA adapters belongs to `finetuning`.
- Running inference from an unmerged adapter belongs to `inference`.
- Prompt templates, instruction data, and adapter training data formats belong to `prompt-data-formats`.

## Minimal operating checklist

1. Confirm the base model is a local path or Hugging Face model id compatible with the adapter.
2. Confirm the adapter path or Hugging Face adapter id points to a PEFT LoRA adapter directory with `adapter_config.json` and `adapter_model.bin`.
3. Use Hugging Face export unless the downstream consumer explicitly requires the original LLaMA `consolidated.00.pth` plus `params.json` layout.
4. Use state-dict export only for LLaMA-7B-compatible checkpoints; do not apply it to Bloom, Huozi, ChatGLM, or other architectures.
5. Build the dry-run command with the bundled helper, review the emitted warnings, then execute only in an environment with compatible `torch`, `transformers`, `peft`, and enough RAM/storage.

Files in this skill

  • SKILL.md2.3 KB
  • references/troubleshooting.md4.5 KB
  • references/workflows.md5.6 KB
  • scripts/build_export_command.py11.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.