Agent skill

Nemotron 3 5 Lightning Text2sql Lora

by NVIDIA-NeMo in NVIDIA-NeMo/Nemotron

Run the Nemotron-3.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B…

Apache-2.0Auto-check passedAI & LLM Engineering

Install Nemotron 3 5 Lightning Text2sql Lora

skills CLI
$ npx skills add NVIDIA-NeMo/Nemotron --skill nemotron-3-5-lightning-text2sql-lora -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NVIDIA-NeMo/Nemotron nemotron-3-5-lightning-text2sql-lora --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NVIDIA-NeMo/Nemotron.git skills-src && mkdir -p .claude/skills && cp -r skills-src/usage-cookbook/Nemotron-3.5-Lightning/lora-text2sql/nemo-megatron-bridge .claude/skills/nemotron-3-5-lightning-text2sql-lora && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nemotron-3-5-lightning-text2sql-lora
GitHub stars
2.1k
Token cost
~1.9k tokens
SKILL.md length
1,013 words
Files
9
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run the Nemotron-3.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B…

  • Works in 4 steps: Data prep (CPU, ~2 min) — builds a BIRD… → Convert (CPU, ~4 min) — imports the… → LoRA fine-tune (GPU) — packed-sequence… → …
  • The user wants to run this cookbook
  • SKILL.md covers What the tutorial does, Information to gather from the…, Choosing the GPU configuration and How to run it, plus 4 more sections
  • Runs Python scripts from its folder; calls docker; needs HF_TOKEN

What it does

Nemotron 3 5 Lightning Text2sql Lora is an agent skill from NVIDIA-NeMo/Nemotron. Run the Nemotron-3.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B hybrid Mamba-Transformer MoE, and merging the adapter back to a Hugging Face checkpoint. Use when the user wants to run this cookbook, fine-tune Nemotron-3.5 Lightning with LoRA, or adapt the notebook to their own machine.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `README.md`, `base_sft_dataset.py` and `convert.py`).

It sits in AI & LLM Engineering, covering Fine-tuning. It works with NVIDIA AI Platform and Hugging Face. The repository describes itself as: Developer Asset Hub for NVIDIA Nemotron — A one-stop resource for training recipes, usage cookbooks, datasets, and full end-to-end reference examples to build with Nemotron models. The licence is Apache-2.0.

When your agent uses it

  • The user wants to run this cookbook
  • Fine-tune Nemotron-3.5 Lightning with LoRA
  • Adapt the notebook to their own machine

Example prompts

  • “/nemotron-3-5-lightning-text2sql-lora”

Requirements

  • Python 3
  • Docker

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Data prep (CPU, ~2 min) — builds a BIRD Text2SQL training.jsonl from the no-reasoning and
  2. Convert (CPU, ~4 min) — imports the Hugging Face checkpoint into Megatron-Bridge format.
  3. LoRA fine-tune (GPU) — packed-sequence LoRA training; saves an adapter.
  4. Merge & export (CPU) — merges the adapter into the base weights, writing a standard Hugging

What it can do on your machine

Read from SKILL.md and the folder at commit ca8c409. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nemotron 3 5 Lightning Text2sql Lora loads about 1.9k tokens when it runs. Until then it costs about 114 tokens; SKILL.md has 1,013 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NVIDIA-NeMo/Nemotron at commit ca8c409, republished under its Apache-2.0 licence (© NVIDIA-NeMo). 1,013 words, ~1,885 tokens.

Download SKILL.mdSave it as .claude/skills/nemotron-3-5-lightning-text2sql-lora/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
nemotron-3-5-lightning-text2sql-lora
description
Run the Nemotron-3.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B hybrid Mamba-Transformer MoE, and merging the adapter back to a Hugging Face checkpoint. Use when the user wants to run this cookbook, fine-tune Nemotron-3.5 Lightning with LoRA, or adapt the notebook to their own machine.

Nemotron-3.5 Lightning Text2SQL LoRA — runbook for a coding agent

This skill helps you run the cookbook in this directory (mbridge_lora_cookbook.ipynb) on the user's behalf. Your job is to gather a few environment details, pick a GPU configuration that fits their hardware, run the four steps in order, and confirm each one produced what it should.

What the tutorial does

Four steps, in order. Only step 3 needs a GPU — this is the single most useful thing to know when planning the run.

  1. Data prep (CPU, ~2 min) — builds a BIRD Text2SQL training.jsonl from the no-reasoning and reasoning splits, formatted with Nemotron-3.5's chat template.
  2. Convert (CPU, ~4 min) — imports the Hugging Face checkpoint into Megatron-Bridge format.
  3. LoRA fine-tune (GPU) — packed-sequence LoRA training; saves an adapter.
  4. Merge & export (CPU) — merges the adapter into the base weights, writing a standard Hugging Face checkpoint.

Information to gather from the user

Ask for these up front, in one batch:

  • Path to the Nemotron-3.5 Lightning checkpoint (already downloaded), or confirmation that you should download it and where to put it. It is ~62 GB.
  • How many GPUs they want to use, and what kind. Drives the whole training config.
  • Where to write outputs — needs ~130 GB free.
  • A Hugging Face token ($HF_TOKEN) so BIRD can be downloaded during data prep. Reference it by environment variable; never print it.
  • The container image to use, if it differs from the one in the notebook.

Choosing the GPU configuration

The model's 128 experts are split across GPUs with expert parallelism, so n_devices is the only knob that really matters — set EP = n_devices. Measured peak memory per GPU on 80GB H100s at seq_length=2048:

GPUsPeak/GPUOne epochRecommendation
178.8 GB~62 minWorks only with REDUCE_MTP_HEADS=1. ~0.4 GB margin — fine if that is all they have.
251.0 GB~34 minDefault to this when available. Stock recipe, ~28 GB margin.
434.8 GB~18 minGood if available.
826.8 GB~8 minFastest.

All measured over a full epoch (189 iterations, GBS 32, seq_length=2048) on the complete 12,544-example dataset. Final loss lands within ~2% across all four, so choose on hardware availability and how long the user is willing to wait — not on expected quality.

If the user has GPUs smaller than 80 GB, scale by the same logic: peak memory is roughly (model weights ÷ EP) + ~12 GB of overhead. Spare memory is best spent raising seq_length, which increases how much of the dataset survives the length filter — not just headroom.

How to run it

  1. Launch the container with the notebook directory and the checkpoint path mounted, and $HF_TOKEN exposed. Use the docker run invocation in the notebook's first cell as the template.
  2. Fill in the notebook's Configuration cell (paths, n_devices) — it is the only cell that should need editing.
  3. Run the steps in order. After each, run its sanity-check cell before moving on.
  4. Training is the long step. Run it in the background and poll; do not hold a blocking session open, and do not stream the full log.

You can also run the steps directly rather than through the notebook — each is a plain script driven by environment variables (MODEL_ID, MAX_SEQ_LEN, DATAPREP_OUTPUT_DIR for data prep; HF_MODEL, MEGATRON_MODEL_PATH for convert; and N_DEVICES, EP, DATASET_DIR, TRAINING_OUTPUT_DIR, EXPERIMENT_NAME for training).

Verifying success per step

  • Data prep: $DATAPREP_OUTPUT_DIR/training.jsonl exists with ~12,500 rows at seq_length=2048. Spot-check one record: input should end with <think>\n (reasoning) or <think></think> (non-reasoning), and output should continue directly from there.
  • Convert: $MEGATRON_MODEL_PATH/latest_checkpointed_iteration.txt plus an iter_* directory exist (~62 GB).
  • Train: an iter_* adapter checkpoint under $TRAINING_OUTPUT_DIR/$EXPERIMENT_NAME, and the log shows lm loss trending down.
  • Merge: the output directory contains model-*.safetensors shards, config.json, and the tokenizer files, and the log ends with Success: All tensors from the original checkpoint were written.

Report per-step status, wall-clock time, and the final training loss.

Show full SKILL.md (371 more words)Show less

Things already handled — do not change them

  • The recipe supplies everything model-specific. train.py calls the shipped PEFT recipe and overrides only local paths, parallelism, dataset, and schedule. Don't hand-write LoRA target modules — the recipe's already cover the Mamba projections, attention, and both routed and shared experts.
  • The MoE dispatcher is set to alltoall rather than the recipe's default flex/DeepEP, for portability. Only change this if DeepEP is known good on the user's system.
  • Synchronous checkpoint saving (async_save=False) is deliberate.
  • Steps are idempotent: data prep skips if training.jsonl exists; convert skips if the checkpoint exists.

Expected friction (so you don't misread it)

  • The first training iteration takes 1–2 minutes with no output while CUDA graphs are captured and the MoE warms up. Subsequent iterations are seconds. Do not cancel the job.
  • Startup log noise is not failure. Failed to import Triton kernels, MimoModelConfig is experimental, Unable to import torchao, and torch_dtype is deprecated all appear on healthy runs. Judge by the sanity checks.
  • Do not enable RECOMPUTE_ACTIVATIONS. It lowers memory but fails at iteration 2 with an assertion in Megatron's gradient buffer. If the user is out of memory, add a GPU or lower seq_length instead.
  • REDUCE_MTP_HEADS reduces to one head, it cannot disable MTP. The hybrid model asserts mtp_num_layers > 0.
  • If you point the recipe at local data, you must also clear its Hugging Face dataset fields — a dataset config accepts exactly one source. train.py already does this; preserve it if you refactor.
  • Serve with vLLM, not Transformers. vLLM supports this architecture natively and works. transformers.generate() currently fails inside the model's bundled remote code — on the base checkpoint too, so don't diagnose it as a fine-tuning problem.
  • Any vLLM script needs an if __name__ == "__main__": guard. vLLM spawns workers; without it the failure surfaces as Engine core initialization failed wrapping a multiprocessing bootstrap error that never mentions vLLM.

What success looks like at the end

Serving the merged checkpoint and prompting it the way data prep formatted training examples should yield bare SQL, e.g. SELECT T2.dept_name FROM employees AS T1 INNER JOIN .... The base model instead answers conversationally with fenced SQL and a prose explanation. If the fine-tuned model still explains itself, something upstream went wrong — suspect the chat-template format first.

© NVIDIA-NeMo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files in usage-cookbook/Nemotron-3.5-Lightning/lora-text2sql/nemo-megatron-bridge of NVIDIA-NeMo/Nemotron.

  • SKILL.md
  • README.md
  • base_sft_dataset.py
  • convert.py
  • dataprep.py
  • dataset_bird.py
  • dataset_bird_reasoning.py
  • mbridge_lora_cookbook.ipynb
  • train.py

Open the folder on GitHubat commit ca8c409

Compare with similar skills

Nemotron 3 5 Lightning Text2sql Lora next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nemotron 3 5 Lightning Text2sql Lora compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nemotron 3 5 Lightning Text2sql Lora this skillNVIDIA-NeMo/Nemotron2.1k—~1.9kAutomated safety check: PassApache-2.0
Tao Finetune Huggingface ModelNVIDIA/skills3.5k—~4.9kAutomated safety check: NotesApache-2.0
Dataset Transformationawslabs/agent-plugins9151 repos~3.5kAutomated safety check: PassApache-2.0
RuView Model Trainingruvnet/RuView97k—~1.3kAutomated safety check: NotesMIT
Hugging Face LLM Trainerhuggingface/skills11k1 repos~7.2kAutomated safety check: PassApache-2.0
Hugging Face Vision Trainerhuggingface/skills11k1 repos~7.5kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Fine-tune any HuggingFace CV / VLM / LLM model on local NVIDIA GPUs inside an NGC PyTorch container when no dedicated TAO model skill matches.

    3.5k GitHub stars~4.9k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Dataset Transformation

    awslabs/agent-plugins

    Official

    Generates code that transforms datasets between ML schemas for model training or evaluation.

    915 GitHub starsUsed in 1 repo~3.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Trains and evaluates several WiFi-signal-based pose and sensing models, from unsupervised pose estimation to domain adaptation and publishing.

    97k GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Hugging Face LLM Trainer

    huggingface/skills

    Official

    Trains or fine-tunes language and vision models with TRL or Unsloth on Hugging Face Jobs cloud GPUs, then converts the results to GGUF.

    11k GitHub starsUsed in 1 repo~7.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Hugging Face Vision Trainer

    huggingface/skills

    Official

    Trains and fine-tunes object detection, image classification and SAM or SAM2 segmentation models on Hugging Face Jobs cloud GPUs and saves the results to the Hub.

    11k GitHub starsUsed in 1 repo~7.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Huggingface LLM Trainer

    waybarrios/opencode-power-pack

    Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion.

    533 GitHub stars~3k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed

More from NVIDIA-NeMo/Nemotron

All 10 skills in this repo
  • Nemotron Add Model

    NVIDIA-NeMo/Nemotron

    Onboard a new model family (Nemotron or third-party) into skills/ — paper chunks, recipe summaries, context packs, and model card.

    2.1k GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Nemotron Add Pattern

    NVIDIA-NeMo/Nemotron

    Add a cross-cutting decision pattern under src/nemotron/steps/patterns/.

    2.1k GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Nemotron Add Step

    NVIDIA-NeMo/Nemotron

    Add a new step under src/nemotron/steps/<category/<stepid/ — manifest (step.toml), runner glue, configs, and per-step README.md.

    2.1k GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Nemotron Customizer Airgap

    NVIDIA-NeMo/Nemotron

    Prepare, validate, build, and use Nemotron Customizer airgap image bundles for offline clusters.

    2.1k GitHub stars~1.2k tokensUpdated 3 days ago
    Auto-check passed
  • Nemotron Nano3

    NVIDIA-NeMo/Nemotron

    Reference desk for Nemotron 3 Nano / Llama-Nemotron Nano 3 — architecture, training data, recipes, evaluation, quantization, deployment.

    2.1k GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed
  • Nemotron Super3

    NVIDIA-NeMo/Nemotron

    Reference desk for NVIDIA Nemotron 3 Super — architecture, training data, recipes (pretrain/SFT/RL/eval/quantization), and deployment notes.

    2.1k GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed

Questions about Nemotron 3 5 Lightning Text2sql Lora

What does Nemotron 3 5 Lightning Text2sql Lora do?

Run the Nemotron-3.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B…. Nemotron 3 5 Lightning Text2sql Lora is an agent skill from NVIDIA-NeMo/Nemotron.5 Lightning Text2SQL LoRA fine-tuning tutorial (NeMo Megatron-Bridge) end-to-end for the user on a single node: data prep, checkpoint conversion, LoRA fine-tuning of the 30B-A3B hybrid Mamba-Transformer MoE, and merging the adapter back to a Hugging Face checkpoint.

When should I use Nemotron 3 5 Lightning Text2sql Lora?

Nemotron 3 5 Lightning Text2sql Lora fits situations like: the user wants to run this cookbook; fine-tune Nemotron-3.5 Lightning with LoRA; adapt the notebook to their own machine.

How do I install Nemotron 3 5 Lightning Text2sql Lora in Claude Code?

Run `npx skills add NVIDIA-NeMo/Nemotron --skill nemotron-3-5-lightning-text2sql-lora -a claude-code`. Or copy the skill folder (usage-cookbook/Nemotron-3.5-Lightning/lora-text2sql/nemo-megatron-bridge in NVIDIA-NeMo/Nemotron) into .claude/skills/nemotron-3-5-lightning-text2sql-lora in your project. Claude Code loads it when a task matches its description.

How do I install Nemotron 3 5 Lightning Text2sql Lora in Codex?

Run `npx skills add NVIDIA-NeMo/Nemotron --skill nemotron-3-5-lightning-text2sql-lora -a codex`. Or copy the skill folder (usage-cookbook/Nemotron-3.5-Lightning/lora-text2sql/nemo-megatron-bridge in NVIDIA-NeMo/Nemotron) into .agents/skills/nemotron-3-5-lightning-text2sql-lora in your project. Codex loads it when a task matches its description.

Can I use Nemotron 3 5 Lightning Text2sql Lora in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NVIDIA-NeMo/Nemotron --skill nemotron-3-5-lightning-text2sql-lora -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nemotron-3-5-lightning-text2sql-lora, .gemini/skills/nemotron-3-5-lightning-text2sql-lora, .github/skills/nemotron-3-5-lightning-text2sql-lora and .opencode/skills/nemotron-3-5-lightning-text2sql-lora in your project.

What does Nemotron 3 5 Lightning Text2sql Lora need to run?

Going by SKILL.md and its folder, Nemotron 3 5 Lightning Text2sql Lora needs Python for the scripts in its folder, the command-line tools its instructions call (docker) and credentials named HF_TOKEN. Our summary lists: Python 3; Docker.

Does Nemotron 3 5 Lightning Text2sql Lora access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Nemotron 3 5 Lightning Text2sql Lora safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nemotron 3 5 Lightning Text2sql Lora use?

Nemotron 3 5 Lightning Text2sql Lora is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nemotron 3 5 Lightning Text2sql Lora use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nemotron 3 5 Lightning Text2sql Lora?

Skills that share tags, products or a category with Nemotron 3 5 Lightning Text2sql Lora: Tao Finetune Huggingface Model (NVIDIA/skills, 3.5k stars), Dataset Transformation (awslabs/agent-plugins, 915 stars), RuView Model Training (ruvnet/RuView, 97k stars) and Hugging Face LLM Trainer (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nemotron 3 5 Lightning Text2sql Lora?

NVIDIA-NeMo (a GitHub organization) maintains it in NVIDIA-NeMo/Nemotron, which has 2,139 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: NVIDIA-NeMo/Nemotron on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.