Convert a grover_base checkpoint (encoder-only or encoder + vocab heads) into a hybrid checkpoint by adding a randomly-initialized cMIM decoder + latent_dist, then continue pretraining on the user's corpus as hybrid (vocab + contrast). Effectively kermt-continue-pretrain with a one-time ckpt-conversion step prepended.
Capabilities
Hardware requirements
Same as kermt-continue-pretrain (the cMIM decoder adds parameters but not
When to invoke
For continuing an existing hybrid or cmim ckpt: use kermt-continue-pretrain
Hard rules
Continue-pretraining the upgraded ckpt will train those new heads alongside
Common errors
Getting started
Full instructionsInstall the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.
Instructions: SKILL.mdv1.0.0
kermt-add-cmim-pretrain
Convert a grover_base checkpoint (legacy original-GROVER grover.encoders.*
or modern kermt.encoders.*, with or without vocab heads) into a fully-formed
hybrid (cMIM + vocab) checkpoint, then continue pretraining on the user's
corpus as hybrid.
This is a thin wrapper: upgrade_to_hybrid.py produces a new ckpt that
classifies as model_type: hybrid via check_checkpoint.py, and the rest of
the workflow is identical to kermt-continue-pretrain.
Status: experimental. This workflow is functional end-to-end but has not
been benchmarked against the manuscript's from-scratch hybrid training (which
produces the released checkpoint). Use as an experimental alternative to
kermt-pretrain-scratchwhen you want to extend an existing grover_base
checkpoint rather than restart from random init. Validate downstream
performance on your own benchmark before relying on the upgraded ckpt for
production work.
Hardware requirements
Same as kermt-continue-pretrain (the cMIM decoder adds parameters but not
substantially; VRAM headroom should be fine). The upgrade step itself is
fast (~5 s) and CPU-only — only the subsequent continue-pretrain consumes
GPU.
When to invoke
- User has a grover_base checkpoint (encoder-only or with vocab heads) and
wants to extend it into a hybrid (vocab + cMIM contrastive) pretrain. - Useful for adding the SMILES-reconstruction contrastive objective to a
pretrained encoder without restarting pretraining from scratch (which
kermt-pretrain-scratchwould do at days-scale).
For continuing an existing hybrid or cmim ckpt: use kermt-continue-pretrain
directly. For training a fresh model on a custom corpus: use
kermt-pretrain-scratch.
Inputs
Required:
--ckpt <path>— grover_base ckpt to upgrade. Validated via
check_checkpoint.py --mode upgrade_to_hybrid; rejected if the ckpt
already has a contrast head or task FFN.--csv <path>— pretrain corpus CSV. Same shape as
kermt-continue-pretrain's--csvinput.
Optional (same as kermt-continue-pretrain):
--val-csv <path>— separate validation CSV. Without it, prepare_data
auto-splits by--val-frac 0.1.- Training-hyperparameter overrides (
--epochs N,--batch-size N, lr triple,
--warmup-epochs F, etc.). --vocab-loss-weight F/--latent-dim N/--contrastive-temperature F.--wandb-project NAME/--wandb-run-name NAME— optional Weights & Biases
logging (run name honored only alongside a project). Off by default.--gpus 0,2.
Workflow
Let $KERMT_REPO be the path to your kermt repo checkout.
-
Pre-flight: check_system (same as
kermt-continue-pretrainstep 1). -
Compute run directory:
textRUN_DIR=$KERMT_REPO/runs/add-cmim-pretrain_$(date -u +%Y-%m-%dT%H-%M-%SZ) -
Validate the input ckpt with
check_checkpoint --mode upgrade_to_hybrid.
Abort onok: false. The validator rejects ckpts that already have
contrast head (suggestkermt-continue-pretrain) or task FFN heads
(the ckpt has been finetuned; suggest using the original pretrain
checkpoint). -
Validate the corpus via
check_data --mode pretrain. Abort on
ok: false. -
Prepare the data with
--mode pretrain— without--vocab-dir.
The upgrade builds fresh vocab heads sized to the corpus's vocab, so we
wantprepare_datato produce a new vocab from the corpus rather than
passing through the ckpt's old vocab (which may not even exist for
encoder-only legacy grover_base ckpts):text$KERMT_REPO/agent/scripts/kermt_container.sh run --data <user-csv> --run-dir $RUN_DIR -- \ "python agent/scripts/prepare_data.py --mode pretrain \\ --csv /data/<basename> --out /runs/data \\ [--val-csv /data/<val-basename>] [--val-frac 0.1] [--seed 0]"The output manifest has
vocab_source: "built_fresh"and includes a
smiles_vocab(built from the corpus, needed for the new decoder). -
Upgrade the ckpt.
text$KERMT_REPO/agent/scripts/kermt_container.sh run --ckpt <user-ckpt> --run-dir $RUN_DIR -- \ "python agent/scripts/upgrade_to_hybrid.py \\ --ckpt /ckpt \\ --prepare-manifest /runs/data/prepare_data.json \\ --out /runs/upgraded.pt"Surface the JSON summary to the user — especially
warnings[], which
includes any encoder-arch drift notes (e.g. legacy GROVER had two extra
act_func_*keys that modern KERMTEmbedding doesn't) and the
pretrain_ddp.py--backboneargparse-restriction note if the upgraded
ckpt's backbone is anything other thangtrans. -
Estimate runtime + confirm with the user. Same heuristic as
kermt-continue-pretrain(corpus size × epochs × GPU count → wall time). -
Launch the runner detached.
text$KERMT_REPO/agent/scripts/kermt_container.sh run_detached \\ --name kermt-add-cmim-pretrain-<ts> \\ --run-dir $RUN_DIR -- \\ "python agent/scripts/run_pretrain_local.py \\ --ckpt /runs/upgraded.pt \\ --prepare-manifest /runs/data/prepare_data.json \\ --out /runs \\ [--epochs N --batch-size N ...]"The runner sees the upgraded ckpt as
model_type: hybrid, so it auto-dispatches
--pretrain_mode hybrid --vocab_loss_weight 1.0with smiles_vocab plumbed
through. -
Report to the user with the upgraded ckpt path + the same run.json
pointer / log path / tensorboard URL pattern askermt-continue-pretrain.
Hard rules
- Never modify the user's input ckpt. The upgrade writes a new file at
<run_dir>/upgraded.pt; the source ckpt stays untouched. - Vocab heads are always fresh. Even if the input grover_base has vocab
heads, they're discarded and rebuilt sized to the new corpus's vocab.
Continue-pretraining the upgraded ckpt will train those new heads alongside
the decoder. - Don't auto-relax
--backbonechoices. If the upgrade warning fires
because the input ckpt's backbone isn'tgtrans(e.g. legacydualtrans),
surface the warning and ask the user. Do NOT silently modify parsing.py to
add the legacy backbone to the choices list.
Common errors
check_checkpoint rejected the ckptwith model_type=hybrid or cmim →
user's ckpt already has a contrast head. Redirect to
kermt-continue-pretrain.check_checkpoint rejected the ckptwith task_ffn=true → the ckpt has
been finetuned. The upgrade workflow only supports pretrain checkpoints.prepare manifest missing smiles_vocab→ prepare_data was invoked with
--skip-vocabor some equivalent that omitted the smiles vocab. Re-run
prepare without those flags.unexpected key(s) in encoder loadwarning → legacy GROVER architectures
saved a couple ofact_func_*weights that modern KERMTEmbedding doesn't
use. Benign; the rest of the encoder loaded correctly.
What's in run.json after a successful run
Same reproducibility fields as kermt-continue-pretrain, plus the upgrade step's
summary.json is captured under the inputs.upgrade_summary path so the
provenance of the upgraded ckpt is auditable.
Replayability
Same as kermt-continue-pretrain: cmd_replay rebuilds the
run_pretrain_local.py --ckpt <upgraded.pt> ... invocation. To redo the
full add-cmim flow end-to-end, the user also needs the input grover_base
ckpt and the corpus — both are captured in the prepare_data and upgrade
manifests by absolute path.
Explore more skills
Browse all- Web Performance AuditorAI-powered web performance auditor for frontend and web developers. Use it to audit a website or web app, diagnose poor…
- Deepstream DevNVIDIA DeepStream SDK development with Python pyservicemaker API. Use when building video analytics pipelines,…
- I4h Catheter NavigationOverview of `workflows/catheter_navigation/` (fluorosim DRR, XPBD physics, vasculature digital twin). Use when the user…
- Omniverse Content ServicesOmniverse Content Services, also discoverable as Omniverse Content Workspace or USD Content Workspace. Use for USD…
- Doca RmaxDOCA Rivermax (doca_rmax) receive streams for timing-precise media over IP (SMPTE ST 2110 video / audio, market data,…
- Tao Train SegformerSegFormer for semantic segmentation. Lightweight transformer-based architecture with hierarchical feature extraction,…
Security
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Reviews (0)
More from skills
View source →Frequently asked questions about kermt-add-cmim-pretrain
What does the kermt-add-cmim-pretrain skill do?
Convert a grover_base checkpoint (encoder-only or encoder + vocab heads) into a hybrid checkpoint by adding a randomly-initialized cMIM decoder + latent_dist, then continue pretraining on the user's corpus as hybrid (vocab + contrast). Effectively kermt-continue-pretrain with a one-time ckpt-conversion step prepended. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the kermt-add-cmim-pretrain skill?
Run `npx @skills-hub-ai/cli install skills-nvidia-bionemo-kermt-add-cmim-pretrain` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/skills-nvidia-bionemo-kermt-add-cmim-pretrain/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does kermt-add-cmim-pretrain work with?
kermt-add-cmim-pretrain runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the kermt-add-cmim-pretrain skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use kermt-add-cmim-pretrain after installing it?
In Claude Code, type `/skills-nvidia-bionemo-kermt-add-cmim-pretrain` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the kermt-add-cmim-pretrain skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/skills-nvidia-bionemo-kermt-add-cmim-pretrain)<a href="https://skills-hub.ai/skills/skills-nvidia-bionemo-kermt-add-cmim-pretrain"><img src="https://skills-hub.ai/api/badges/skill/skills-nvidia-bionemo-kermt-add-cmim-pretrain" alt="Install on Skills Hub"></a>More options in the badge docs.