[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-nemo-mbridge-perf-sequence-packing":3,"mdc--6c1628-key":31,"related-org-nvidia-nemo-mbridge-perf-sequence-packing":1515,"related-repo-nvidia-nemo-mbridge-perf-sequence-packing":1673},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":29,"mdContent":30},"nemo-mbridge-perf-sequence-packing","validate sequence packing for Megatron-Bridge","Validate and use packed sequences and long-context training in Megatron-Bridge, distinguishing offline packed SFT for LLMs from in-batch packing for VLMs, and applying the right CP constraints.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,19],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Machine Learning","machine-learning",{"name":9,"slug":8,"type":15},2473,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills","2026-07-17T05:29:06.902654","Apache-2.0",281,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":28},[],"AI agent skills published by NVIDIA","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fnemo-mbridge-perf-sequence-packing","---\nname: nemo-mbridge-perf-sequence-packing\ndescription: Validate and use packed sequences and long-context training in Megatron-Bridge, distinguishing offline packed SFT for LLMs from in-batch packing for VLMs, and applying the right CP constraints.\nlicense: Apache-2.0\nwhen_to_use: Enabling sequence packing or long-context SFT, or investigating a commit that broke sequence packing or changed packing behavior; 'packed sequences', 'sequence packing', 'PackedSequenceSpecs', 'enable_in_batch_packing', 'CP with packing'.\n---\n\n# Sequence Packing Skill\n\nFor stable background and recommendation level, see:\n\n- @docs\u002Ftraining\u002Fpacked-sequences.md\n- @skills\u002Fnemo-mbridge-perf-sequence-packing\u002Fcard.yaml\n\n## Enablement\n\nOffline packed SFT for LLM finetuning:\n\n```python\nfrom megatron.bridge.data.datasets.packed_sequence import PackedSequenceSpecs\n\ncfg.train.micro_batch_size = 1\ncfg.dataset.seq_length = 4096\ncfg.model.seq_length = 4096\ncfg.dataset.dataset_kwargs = {\"pad_to_max_length\": True}\ncfg.dataset.enable_offline_packing = True\ncfg.dataset.offline_packing_specs = PackedSequenceSpecs(\n    packed_sequence_size=4096,\n    pad_seq_to_mult=1,\n)\n```\n\nIf CP is enabled:\n\n```python\ncfg.model.context_parallel_size = 2\ncfg.model.calculate_per_token_loss = True\ncfg.ddp.average_in_collective = False\ncfg.dataset.offline_packing_specs.pad_seq_to_mult = cfg.model.context_parallel_size * 2\n\n# Offline packing is not finalized by ConfigContainer. If sequence_parallel is\n# also enabled, align offline samples to both constraints explicitly:\n# import math\n# cfg.dataset.offline_packing_specs.pad_seq_to_mult = math.lcm(2 * CP, CP * TP)\n# ConfigContainer computes this CP\u002FSP LCM automatically for in-batch packing only.\n```\n\nIf CUDA graphs are enabled for this packed path:\n\n```python\ncfg.dataset.offline_packing_specs.pad_cu_seqlens = True\ncfg.dataset.dataset_kwargs[\"pad_to_max_length\"] = True\n```\n\n**Note:** `pad_cu_seqlens = True` also requires a metadata JSON file alongside\nthe packed dataset (asserted in `src\u002Fmegatron\u002Fbridge\u002Fdata\u002Fdatasets\u002Fsft.py`).\nCustom packed datasets that omit the metadata file will hit an assertion at\ndataset initialization.\n\nIn-batch packing for VLM finetuning:\n\n```python\ncfg.dataset.enable_in_batch_packing = True\ncfg.train.micro_batch_size = 2\n```\n\nLong-context baseline:\n\n```python\ncfg.model.seq_length = 16384\ncfg.dataset.seq_length = 16384\ncfg.model.context_parallel_size = 2\n```\n\n## Code Anchors\n\nLLM packed SFT config surface:\n\n```128:143:src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Futils\u002Fdataset_utils.py\ndataset_kwargs = {}\noffline_packing_specs = None\nif enable_offline_packing:\n    dataset_kwargs[\"pad_to_max_length\"] = True\n    offline_packing_specs = PackedSequenceSpecs(packed_sequence_size=seq_length, pad_seq_to_mult=pad_seq_to_mult)\n\nreturn _text_hf_dataset_config(\n    source=HFDatasetSourceConfig(dataset_name=\"squad\"),\n    preprocessing=PromptCompletionSFTPreprocessingConfig(separator=\" \"),\n    seq_length=seq_length,\n    enable_offline_packing=enable_offline_packing,\n    offline_packing_specs=offline_packing_specs,\n    dataset_kwargs=dataset_kwargs,\n    val_proportion=0.1,\n    num_workers=1,\n)\n```\n\nBridge validation:\n\n```1220:1248:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nenable_in_batch_packing = getattr(self.dataset, \"enable_in_batch_packing\", False)\nenable_offline_packing = getattr(self.dataset, \"enable_offline_packing\", False)\noffline_packing_specs = getattr(self.dataset, \"offline_packing_specs\", None)\n\nif enable_offline_packing and enable_in_batch_packing:\n    raise ValueError(\"enable_offline_packing and enable_in_batch_packing are mutually exclusive.\")\nif enable_offline_packing and offline_packing_specs is None:\n    raise ValueError(\"offline_packing_specs must be set when enable_offline_packing=True.\")\n...\nif enable_in_batch_packing:\n    ...\n    cp_multiple = 2 * cp_size if cp_size > 1 else 1\n    sp_multiple = cp_size * tp_size if has_sp and tp_size > 1 else 1\n    self.dataset.in_batch_packing_pad_to_multiple_of = math.lcm(cp_multiple, sp_multiple)\n```\n\n```1400:1442:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py\nif self.model.context_parallel_size > 1:\n    assert self.model.seq_length % (self.model.context_parallel_size * 2) == 0, ...\n    if isinstance(self.dataset, FinetuningDatasetConfig):\n        assert self.model.calculate_per_token_loss, ...\n        assert not self.ddp.average_in_collective, ...\n...\nif enable_offline_packing and self.train.micro_batch_size > 1:\n    raise ValueError(...)\n...\nif enable_in_batch_packing and self.train.micro_batch_size == 1:\n    raise ValueError(...)\n```\n\nCollate-time in-batch runtime used by VLM providers:\n\n```397:449:src\u002Fmegatron\u002Fbridge\u002Fdata\u002Fsequence_batching.py\ndef prepare_padded_or_packed_sequence_batch(\n    batch,\n    *,\n    sequence_length,\n    ...\n    enable_in_batch_packing=False,\n    in_batch_packing_pad_to_multiple_of=1,\n    ...\n):\n    ...\n    if enable_in_batch_packing:\n        pack_right_padded_sequence_batch_to_mcore_thd(\n            batch,\n            sequence_length=sequence_length,\n            pad_to_multiple_of=in_batch_packing_pad_to_multiple_of,\n            ...\n        )\n        return\n```\n\nPacked THD runtime constraint:\n\n```94:108:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fgpt_step.py\nif batch.get(\"cu_seqlens_q\") is not None:\n    cu_seqlens = batch.get(\"cu_seqlens_q_padded\")\n    if cu_seqlens is None:\n        cu_seqlens = batch[\"cu_seqlens_q\"]\n    if cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n        raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n    return cu_seqlens.squeeze()\n\ncu_seqlens = batch[\"cu_seqlens\"]\nif cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n    raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n```\n\n## Pitfalls\n\n1. Offline packed SFT and VLM in-batch packing are different features with opposite micro-batch rules.\n2. When CP is enabled, packed sequence lengths must respect `2 * context_parallel_size` divisibility.\n3. For finetuning with CP, `calculate_per_token_loss=True` and `ddp.average_in_collective=False` are required.\n4. `pad_cu_seqlens=True` also requires `pad_to_max_length=True`.\n5. Packing support is model-family-specific. `Qwen3-Next`, `GLM-4.5`, and `Qwen3.5-VL` contain explicit opt-outs in different paths.\n6. MTP finetuning is documented as incompatible with packed sequences.\n7. Synthetic padding rows, including negative indices remapped through `samples_mapping`, must retain an all-zero loss mask.\n\n## Verification\n\nUse the checked-in unit coverage:\n\n```bash\nuv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Futils\u002Ftest_packed_seq_utils.py -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Ftest_config.py -k \"packed_sequence or enable_in_batch_packing or offline_and_in_batch_packing_are_mutually_exclusive or context_parallel_seq_length_divisibility or context_parallel_finetuning_validations\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fpacking\u002Ftest_in_batch.py -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Ftest_vlm_step.py -k \"deferred_in_batch_packing or packed_metadata\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_packed_parquet.py -k \"negative_index_zeroes_loss_mask\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_sft.py -k \"mapped_padding_rows_do_not_contribute_to_loss\" -v\n```\n\nSuccess criteria:\n\n- all selected tests pass\n- offline and in-batch configuration validation remains mutually exclusive\n- packed metadata reaches the training step in MCore THD form\n- mapped padding rows do not contribute to loss\n",{"data":32,"body":34},{"name":4,"description":6,"license":23,"when_to_use":33},"Enabling sequence packing or long-context SFT, or investigating a commit that broke sequence packing or changed packing behavior; 'packed sequences', 'sequence packing', 'PackedSequenceSpecs', 'enable_in_batch_packing', 'CP with packing'.",{"type":35,"children":36},"root",[37,46,52,67,74,79,193,198,284,289,312,339,344,367,372,402,408,413,553,558,678,772,777,929,934,1030,1036,1145,1151,1156,1481,1486,1509],{"type":38,"tag":39,"props":40,"children":42},"element","h1",{"id":41},"sequence-packing-skill",[43],{"type":44,"value":45},"text","Sequence Packing Skill",{"type":38,"tag":47,"props":48,"children":49},"p",{},[50],{"type":44,"value":51},"For stable background and recommendation level, see:",{"type":38,"tag":53,"props":54,"children":55},"ul",{},[56,62],{"type":38,"tag":57,"props":58,"children":59},"li",{},[60],{"type":44,"value":61},"@docs\u002Ftraining\u002Fpacked-sequences.md",{"type":38,"tag":57,"props":63,"children":64},{},[65],{"type":44,"value":66},"@skills\u002Fnemo-mbridge-perf-sequence-packing\u002Fcard.yaml",{"type":38,"tag":68,"props":69,"children":71},"h2",{"id":70},"enablement",[72],{"type":44,"value":73},"Enablement",{"type":38,"tag":47,"props":75,"children":76},{},[77],{"type":44,"value":78},"Offline packed SFT for LLM finetuning:",{"type":38,"tag":80,"props":81,"children":86},"pre",{"className":82,"code":83,"language":84,"meta":85,"style":85},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from megatron.bridge.data.datasets.packed_sequence import PackedSequenceSpecs\n\ncfg.train.micro_batch_size = 1\ncfg.dataset.seq_length = 4096\ncfg.model.seq_length = 4096\ncfg.dataset.dataset_kwargs = {\"pad_to_max_length\": True}\ncfg.dataset.enable_offline_packing = True\ncfg.dataset.offline_packing_specs = PackedSequenceSpecs(\n    packed_sequence_size=4096,\n    pad_seq_to_mult=1,\n)\n","python","",[87],{"type":38,"tag":88,"props":89,"children":90},"code",{"__ignoreMap":85},[91,102,112,121,130,139,148,157,166,175,184],{"type":38,"tag":92,"props":93,"children":96},"span",{"class":94,"line":95},"line",1,[97],{"type":38,"tag":92,"props":98,"children":99},{},[100],{"type":44,"value":101},"from megatron.bridge.data.datasets.packed_sequence import PackedSequenceSpecs\n",{"type":38,"tag":92,"props":103,"children":105},{"class":94,"line":104},2,[106],{"type":38,"tag":92,"props":107,"children":109},{"emptyLinePlaceholder":108},true,[110],{"type":44,"value":111},"\n",{"type":38,"tag":92,"props":113,"children":115},{"class":94,"line":114},3,[116],{"type":38,"tag":92,"props":117,"children":118},{},[119],{"type":44,"value":120},"cfg.train.micro_batch_size = 1\n",{"type":38,"tag":92,"props":122,"children":124},{"class":94,"line":123},4,[125],{"type":38,"tag":92,"props":126,"children":127},{},[128],{"type":44,"value":129},"cfg.dataset.seq_length = 4096\n",{"type":38,"tag":92,"props":131,"children":133},{"class":94,"line":132},5,[134],{"type":38,"tag":92,"props":135,"children":136},{},[137],{"type":44,"value":138},"cfg.model.seq_length = 4096\n",{"type":38,"tag":92,"props":140,"children":142},{"class":94,"line":141},6,[143],{"type":38,"tag":92,"props":144,"children":145},{},[146],{"type":44,"value":147},"cfg.dataset.dataset_kwargs = {\"pad_to_max_length\": True}\n",{"type":38,"tag":92,"props":149,"children":151},{"class":94,"line":150},7,[152],{"type":38,"tag":92,"props":153,"children":154},{},[155],{"type":44,"value":156},"cfg.dataset.enable_offline_packing = True\n",{"type":38,"tag":92,"props":158,"children":160},{"class":94,"line":159},8,[161],{"type":38,"tag":92,"props":162,"children":163},{},[164],{"type":44,"value":165},"cfg.dataset.offline_packing_specs = PackedSequenceSpecs(\n",{"type":38,"tag":92,"props":167,"children":169},{"class":94,"line":168},9,[170],{"type":38,"tag":92,"props":171,"children":172},{},[173],{"type":44,"value":174},"    packed_sequence_size=4096,\n",{"type":38,"tag":92,"props":176,"children":178},{"class":94,"line":177},10,[179],{"type":38,"tag":92,"props":180,"children":181},{},[182],{"type":44,"value":183},"    pad_seq_to_mult=1,\n",{"type":38,"tag":92,"props":185,"children":187},{"class":94,"line":186},11,[188],{"type":38,"tag":92,"props":189,"children":190},{},[191],{"type":44,"value":192},")\n",{"type":38,"tag":47,"props":194,"children":195},{},[196],{"type":44,"value":197},"If CP is enabled:",{"type":38,"tag":80,"props":199,"children":201},{"className":82,"code":200,"language":84,"meta":85,"style":85},"cfg.model.context_parallel_size = 2\ncfg.model.calculate_per_token_loss = True\ncfg.ddp.average_in_collective = False\ncfg.dataset.offline_packing_specs.pad_seq_to_mult = cfg.model.context_parallel_size * 2\n\n# Offline packing is not finalized by ConfigContainer. If sequence_parallel is\n# also enabled, align offline samples to both constraints explicitly:\n# import math\n# cfg.dataset.offline_packing_specs.pad_seq_to_mult = math.lcm(2 * CP, CP * TP)\n# ConfigContainer computes this CP\u002FSP LCM automatically for in-batch packing only.\n",[202],{"type":38,"tag":88,"props":203,"children":204},{"__ignoreMap":85},[205,213,221,229,237,244,252,260,268,276],{"type":38,"tag":92,"props":206,"children":207},{"class":94,"line":95},[208],{"type":38,"tag":92,"props":209,"children":210},{},[211],{"type":44,"value":212},"cfg.model.context_parallel_size = 2\n",{"type":38,"tag":92,"props":214,"children":215},{"class":94,"line":104},[216],{"type":38,"tag":92,"props":217,"children":218},{},[219],{"type":44,"value":220},"cfg.model.calculate_per_token_loss = True\n",{"type":38,"tag":92,"props":222,"children":223},{"class":94,"line":114},[224],{"type":38,"tag":92,"props":225,"children":226},{},[227],{"type":44,"value":228},"cfg.ddp.average_in_collective = False\n",{"type":38,"tag":92,"props":230,"children":231},{"class":94,"line":123},[232],{"type":38,"tag":92,"props":233,"children":234},{},[235],{"type":44,"value":236},"cfg.dataset.offline_packing_specs.pad_seq_to_mult = cfg.model.context_parallel_size * 2\n",{"type":38,"tag":92,"props":238,"children":239},{"class":94,"line":132},[240],{"type":38,"tag":92,"props":241,"children":242},{"emptyLinePlaceholder":108},[243],{"type":44,"value":111},{"type":38,"tag":92,"props":245,"children":246},{"class":94,"line":141},[247],{"type":38,"tag":92,"props":248,"children":249},{},[250],{"type":44,"value":251},"# Offline packing is not finalized by ConfigContainer. If sequence_parallel is\n",{"type":38,"tag":92,"props":253,"children":254},{"class":94,"line":150},[255],{"type":38,"tag":92,"props":256,"children":257},{},[258],{"type":44,"value":259},"# also enabled, align offline samples to both constraints explicitly:\n",{"type":38,"tag":92,"props":261,"children":262},{"class":94,"line":159},[263],{"type":38,"tag":92,"props":264,"children":265},{},[266],{"type":44,"value":267},"# import math\n",{"type":38,"tag":92,"props":269,"children":270},{"class":94,"line":168},[271],{"type":38,"tag":92,"props":272,"children":273},{},[274],{"type":44,"value":275},"# cfg.dataset.offline_packing_specs.pad_seq_to_mult = math.lcm(2 * CP, CP * TP)\n",{"type":38,"tag":92,"props":277,"children":278},{"class":94,"line":177},[279],{"type":38,"tag":92,"props":280,"children":281},{},[282],{"type":44,"value":283},"# ConfigContainer computes this CP\u002FSP LCM automatically for in-batch packing only.\n",{"type":38,"tag":47,"props":285,"children":286},{},[287],{"type":44,"value":288},"If CUDA graphs are enabled for this packed path:",{"type":38,"tag":80,"props":290,"children":292},{"className":82,"code":291,"language":84,"meta":85,"style":85},"cfg.dataset.offline_packing_specs.pad_cu_seqlens = True\ncfg.dataset.dataset_kwargs[\"pad_to_max_length\"] = True\n",[293],{"type":38,"tag":88,"props":294,"children":295},{"__ignoreMap":85},[296,304],{"type":38,"tag":92,"props":297,"children":298},{"class":94,"line":95},[299],{"type":38,"tag":92,"props":300,"children":301},{},[302],{"type":44,"value":303},"cfg.dataset.offline_packing_specs.pad_cu_seqlens = True\n",{"type":38,"tag":92,"props":305,"children":306},{"class":94,"line":104},[307],{"type":38,"tag":92,"props":308,"children":309},{},[310],{"type":44,"value":311},"cfg.dataset.dataset_kwargs[\"pad_to_max_length\"] = True\n",{"type":38,"tag":47,"props":313,"children":314},{},[315,321,323,329,331,337],{"type":38,"tag":316,"props":317,"children":318},"strong",{},[319],{"type":44,"value":320},"Note:",{"type":44,"value":322}," ",{"type":38,"tag":88,"props":324,"children":326},{"className":325},[],[327],{"type":44,"value":328},"pad_cu_seqlens = True",{"type":44,"value":330}," also requires a metadata JSON file alongside\nthe packed dataset (asserted in ",{"type":38,"tag":88,"props":332,"children":334},{"className":333},[],[335],{"type":44,"value":336},"src\u002Fmegatron\u002Fbridge\u002Fdata\u002Fdatasets\u002Fsft.py",{"type":44,"value":338},").\nCustom packed datasets that omit the metadata file will hit an assertion at\ndataset initialization.",{"type":38,"tag":47,"props":340,"children":341},{},[342],{"type":44,"value":343},"In-batch packing for VLM finetuning:",{"type":38,"tag":80,"props":345,"children":347},{"className":82,"code":346,"language":84,"meta":85,"style":85},"cfg.dataset.enable_in_batch_packing = True\ncfg.train.micro_batch_size = 2\n",[348],{"type":38,"tag":88,"props":349,"children":350},{"__ignoreMap":85},[351,359],{"type":38,"tag":92,"props":352,"children":353},{"class":94,"line":95},[354],{"type":38,"tag":92,"props":355,"children":356},{},[357],{"type":44,"value":358},"cfg.dataset.enable_in_batch_packing = True\n",{"type":38,"tag":92,"props":360,"children":361},{"class":94,"line":104},[362],{"type":38,"tag":92,"props":363,"children":364},{},[365],{"type":44,"value":366},"cfg.train.micro_batch_size = 2\n",{"type":38,"tag":47,"props":368,"children":369},{},[370],{"type":44,"value":371},"Long-context baseline:",{"type":38,"tag":80,"props":373,"children":375},{"className":82,"code":374,"language":84,"meta":85,"style":85},"cfg.model.seq_length = 16384\ncfg.dataset.seq_length = 16384\ncfg.model.context_parallel_size = 2\n",[376],{"type":38,"tag":88,"props":377,"children":378},{"__ignoreMap":85},[379,387,395],{"type":38,"tag":92,"props":380,"children":381},{"class":94,"line":95},[382],{"type":38,"tag":92,"props":383,"children":384},{},[385],{"type":44,"value":386},"cfg.model.seq_length = 16384\n",{"type":38,"tag":92,"props":388,"children":389},{"class":94,"line":104},[390],{"type":38,"tag":92,"props":391,"children":392},{},[393],{"type":44,"value":394},"cfg.dataset.seq_length = 16384\n",{"type":38,"tag":92,"props":396,"children":397},{"class":94,"line":114},[398],{"type":38,"tag":92,"props":399,"children":400},{},[401],{"type":44,"value":212},{"type":38,"tag":68,"props":403,"children":405},{"id":404},"code-anchors",[406],{"type":44,"value":407},"Code Anchors",{"type":38,"tag":47,"props":409,"children":410},{},[411],{"type":44,"value":412},"LLM packed SFT config surface:",{"type":38,"tag":80,"props":414,"children":418},{"className":415,"code":416,"language":417,"meta":85,"style":85},"language-128:143:src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Futils\u002Fdataset_utils.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","dataset_kwargs = {}\noffline_packing_specs = None\nif enable_offline_packing:\n    dataset_kwargs[\"pad_to_max_length\"] = True\n    offline_packing_specs = PackedSequenceSpecs(packed_sequence_size=seq_length, pad_seq_to_mult=pad_seq_to_mult)\n\nreturn _text_hf_dataset_config(\n    source=HFDatasetSourceConfig(dataset_name=\"squad\"),\n    preprocessing=PromptCompletionSFTPreprocessingConfig(separator=\" \"),\n    seq_length=seq_length,\n    enable_offline_packing=enable_offline_packing,\n    offline_packing_specs=offline_packing_specs,\n    dataset_kwargs=dataset_kwargs,\n    val_proportion=0.1,\n    num_workers=1,\n)\n","128:143:src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Futils\u002Fdataset_utils.py",[419],{"type":38,"tag":88,"props":420,"children":421},{"__ignoreMap":85},[422,430,438,446,454,462,469,477,485,493,501,509,518,527,536,545],{"type":38,"tag":92,"props":423,"children":424},{"class":94,"line":95},[425],{"type":38,"tag":92,"props":426,"children":427},{},[428],{"type":44,"value":429},"dataset_kwargs = {}\n",{"type":38,"tag":92,"props":431,"children":432},{"class":94,"line":104},[433],{"type":38,"tag":92,"props":434,"children":435},{},[436],{"type":44,"value":437},"offline_packing_specs = None\n",{"type":38,"tag":92,"props":439,"children":440},{"class":94,"line":114},[441],{"type":38,"tag":92,"props":442,"children":443},{},[444],{"type":44,"value":445},"if enable_offline_packing:\n",{"type":38,"tag":92,"props":447,"children":448},{"class":94,"line":123},[449],{"type":38,"tag":92,"props":450,"children":451},{},[452],{"type":44,"value":453},"    dataset_kwargs[\"pad_to_max_length\"] = True\n",{"type":38,"tag":92,"props":455,"children":456},{"class":94,"line":132},[457],{"type":38,"tag":92,"props":458,"children":459},{},[460],{"type":44,"value":461},"    offline_packing_specs = PackedSequenceSpecs(packed_sequence_size=seq_length, pad_seq_to_mult=pad_seq_to_mult)\n",{"type":38,"tag":92,"props":463,"children":464},{"class":94,"line":141},[465],{"type":38,"tag":92,"props":466,"children":467},{"emptyLinePlaceholder":108},[468],{"type":44,"value":111},{"type":38,"tag":92,"props":470,"children":471},{"class":94,"line":150},[472],{"type":38,"tag":92,"props":473,"children":474},{},[475],{"type":44,"value":476},"return _text_hf_dataset_config(\n",{"type":38,"tag":92,"props":478,"children":479},{"class":94,"line":159},[480],{"type":38,"tag":92,"props":481,"children":482},{},[483],{"type":44,"value":484},"    source=HFDatasetSourceConfig(dataset_name=\"squad\"),\n",{"type":38,"tag":92,"props":486,"children":487},{"class":94,"line":168},[488],{"type":38,"tag":92,"props":489,"children":490},{},[491],{"type":44,"value":492},"    preprocessing=PromptCompletionSFTPreprocessingConfig(separator=\" \"),\n",{"type":38,"tag":92,"props":494,"children":495},{"class":94,"line":177},[496],{"type":38,"tag":92,"props":497,"children":498},{},[499],{"type":44,"value":500},"    seq_length=seq_length,\n",{"type":38,"tag":92,"props":502,"children":503},{"class":94,"line":186},[504],{"type":38,"tag":92,"props":505,"children":506},{},[507],{"type":44,"value":508},"    enable_offline_packing=enable_offline_packing,\n",{"type":38,"tag":92,"props":510,"children":512},{"class":94,"line":511},12,[513],{"type":38,"tag":92,"props":514,"children":515},{},[516],{"type":44,"value":517},"    offline_packing_specs=offline_packing_specs,\n",{"type":38,"tag":92,"props":519,"children":521},{"class":94,"line":520},13,[522],{"type":38,"tag":92,"props":523,"children":524},{},[525],{"type":44,"value":526},"    dataset_kwargs=dataset_kwargs,\n",{"type":38,"tag":92,"props":528,"children":530},{"class":94,"line":529},14,[531],{"type":38,"tag":92,"props":532,"children":533},{},[534],{"type":44,"value":535},"    val_proportion=0.1,\n",{"type":38,"tag":92,"props":537,"children":539},{"class":94,"line":538},15,[540],{"type":38,"tag":92,"props":541,"children":542},{},[543],{"type":44,"value":544},"    num_workers=1,\n",{"type":38,"tag":92,"props":546,"children":548},{"class":94,"line":547},16,[549],{"type":38,"tag":92,"props":550,"children":551},{},[552],{"type":44,"value":192},{"type":38,"tag":47,"props":554,"children":555},{},[556],{"type":44,"value":557},"Bridge validation:",{"type":38,"tag":80,"props":559,"children":563},{"className":560,"code":561,"language":562,"meta":85,"style":85},"language-1220:1248:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","enable_in_batch_packing = getattr(self.dataset, \"enable_in_batch_packing\", False)\nenable_offline_packing = getattr(self.dataset, \"enable_offline_packing\", False)\noffline_packing_specs = getattr(self.dataset, \"offline_packing_specs\", None)\n\nif enable_offline_packing and enable_in_batch_packing:\n    raise ValueError(\"enable_offline_packing and enable_in_batch_packing are mutually exclusive.\")\nif enable_offline_packing and offline_packing_specs is None:\n    raise ValueError(\"offline_packing_specs must be set when enable_offline_packing=True.\")\n...\nif enable_in_batch_packing:\n    ...\n    cp_multiple = 2 * cp_size if cp_size > 1 else 1\n    sp_multiple = cp_size * tp_size if has_sp and tp_size > 1 else 1\n    self.dataset.in_batch_packing_pad_to_multiple_of = math.lcm(cp_multiple, sp_multiple)\n","1220:1248:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py",[564],{"type":38,"tag":88,"props":565,"children":566},{"__ignoreMap":85},[567,575,583,591,598,606,614,622,630,638,646,654,662,670],{"type":38,"tag":92,"props":568,"children":569},{"class":94,"line":95},[570],{"type":38,"tag":92,"props":571,"children":572},{},[573],{"type":44,"value":574},"enable_in_batch_packing = getattr(self.dataset, \"enable_in_batch_packing\", False)\n",{"type":38,"tag":92,"props":576,"children":577},{"class":94,"line":104},[578],{"type":38,"tag":92,"props":579,"children":580},{},[581],{"type":44,"value":582},"enable_offline_packing = getattr(self.dataset, \"enable_offline_packing\", False)\n",{"type":38,"tag":92,"props":584,"children":585},{"class":94,"line":114},[586],{"type":38,"tag":92,"props":587,"children":588},{},[589],{"type":44,"value":590},"offline_packing_specs = getattr(self.dataset, \"offline_packing_specs\", None)\n",{"type":38,"tag":92,"props":592,"children":593},{"class":94,"line":123},[594],{"type":38,"tag":92,"props":595,"children":596},{"emptyLinePlaceholder":108},[597],{"type":44,"value":111},{"type":38,"tag":92,"props":599,"children":600},{"class":94,"line":132},[601],{"type":38,"tag":92,"props":602,"children":603},{},[604],{"type":44,"value":605},"if enable_offline_packing and enable_in_batch_packing:\n",{"type":38,"tag":92,"props":607,"children":608},{"class":94,"line":141},[609],{"type":38,"tag":92,"props":610,"children":611},{},[612],{"type":44,"value":613},"    raise ValueError(\"enable_offline_packing and enable_in_batch_packing are mutually exclusive.\")\n",{"type":38,"tag":92,"props":615,"children":616},{"class":94,"line":150},[617],{"type":38,"tag":92,"props":618,"children":619},{},[620],{"type":44,"value":621},"if enable_offline_packing and offline_packing_specs is None:\n",{"type":38,"tag":92,"props":623,"children":624},{"class":94,"line":159},[625],{"type":38,"tag":92,"props":626,"children":627},{},[628],{"type":44,"value":629},"    raise ValueError(\"offline_packing_specs must be set when enable_offline_packing=True.\")\n",{"type":38,"tag":92,"props":631,"children":632},{"class":94,"line":168},[633],{"type":38,"tag":92,"props":634,"children":635},{},[636],{"type":44,"value":637},"...\n",{"type":38,"tag":92,"props":639,"children":640},{"class":94,"line":177},[641],{"type":38,"tag":92,"props":642,"children":643},{},[644],{"type":44,"value":645},"if enable_in_batch_packing:\n",{"type":38,"tag":92,"props":647,"children":648},{"class":94,"line":186},[649],{"type":38,"tag":92,"props":650,"children":651},{},[652],{"type":44,"value":653},"    ...\n",{"type":38,"tag":92,"props":655,"children":656},{"class":94,"line":511},[657],{"type":38,"tag":92,"props":658,"children":659},{},[660],{"type":44,"value":661},"    cp_multiple = 2 * cp_size if cp_size > 1 else 1\n",{"type":38,"tag":92,"props":663,"children":664},{"class":94,"line":520},[665],{"type":38,"tag":92,"props":666,"children":667},{},[668],{"type":44,"value":669},"    sp_multiple = cp_size * tp_size if has_sp and tp_size > 1 else 1\n",{"type":38,"tag":92,"props":671,"children":672},{"class":94,"line":529},[673],{"type":38,"tag":92,"props":674,"children":675},{},[676],{"type":44,"value":677},"    self.dataset.in_batch_packing_pad_to_multiple_of = math.lcm(cp_multiple, sp_multiple)\n",{"type":38,"tag":80,"props":679,"children":683},{"className":680,"code":681,"language":682,"meta":85,"style":85},"language-1400:1442:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","if self.model.context_parallel_size > 1:\n    assert self.model.seq_length % (self.model.context_parallel_size * 2) == 0, ...\n    if isinstance(self.dataset, FinetuningDatasetConfig):\n        assert self.model.calculate_per_token_loss, ...\n        assert not self.ddp.average_in_collective, ...\n...\nif enable_offline_packing and self.train.micro_batch_size > 1:\n    raise ValueError(...)\n...\nif enable_in_batch_packing and self.train.micro_batch_size == 1:\n    raise ValueError(...)\n","1400:1442:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fconfig.py",[684],{"type":38,"tag":88,"props":685,"children":686},{"__ignoreMap":85},[687,695,703,711,719,727,734,742,750,757,765],{"type":38,"tag":92,"props":688,"children":689},{"class":94,"line":95},[690],{"type":38,"tag":92,"props":691,"children":692},{},[693],{"type":44,"value":694},"if self.model.context_parallel_size > 1:\n",{"type":38,"tag":92,"props":696,"children":697},{"class":94,"line":104},[698],{"type":38,"tag":92,"props":699,"children":700},{},[701],{"type":44,"value":702},"    assert self.model.seq_length % (self.model.context_parallel_size * 2) == 0, ...\n",{"type":38,"tag":92,"props":704,"children":705},{"class":94,"line":114},[706],{"type":38,"tag":92,"props":707,"children":708},{},[709],{"type":44,"value":710},"    if isinstance(self.dataset, FinetuningDatasetConfig):\n",{"type":38,"tag":92,"props":712,"children":713},{"class":94,"line":123},[714],{"type":38,"tag":92,"props":715,"children":716},{},[717],{"type":44,"value":718},"        assert self.model.calculate_per_token_loss, ...\n",{"type":38,"tag":92,"props":720,"children":721},{"class":94,"line":132},[722],{"type":38,"tag":92,"props":723,"children":724},{},[725],{"type":44,"value":726},"        assert not self.ddp.average_in_collective, ...\n",{"type":38,"tag":92,"props":728,"children":729},{"class":94,"line":141},[730],{"type":38,"tag":92,"props":731,"children":732},{},[733],{"type":44,"value":637},{"type":38,"tag":92,"props":735,"children":736},{"class":94,"line":150},[737],{"type":38,"tag":92,"props":738,"children":739},{},[740],{"type":44,"value":741},"if enable_offline_packing and self.train.micro_batch_size > 1:\n",{"type":38,"tag":92,"props":743,"children":744},{"class":94,"line":159},[745],{"type":38,"tag":92,"props":746,"children":747},{},[748],{"type":44,"value":749},"    raise ValueError(...)\n",{"type":38,"tag":92,"props":751,"children":752},{"class":94,"line":168},[753],{"type":38,"tag":92,"props":754,"children":755},{},[756],{"type":44,"value":637},{"type":38,"tag":92,"props":758,"children":759},{"class":94,"line":177},[760],{"type":38,"tag":92,"props":761,"children":762},{},[763],{"type":44,"value":764},"if enable_in_batch_packing and self.train.micro_batch_size == 1:\n",{"type":38,"tag":92,"props":766,"children":767},{"class":94,"line":186},[768],{"type":38,"tag":92,"props":769,"children":770},{},[771],{"type":44,"value":749},{"type":38,"tag":47,"props":773,"children":774},{},[775],{"type":44,"value":776},"Collate-time in-batch runtime used by VLM providers:",{"type":38,"tag":80,"props":778,"children":782},{"className":779,"code":780,"language":781,"meta":85,"style":85},"language-397:449:src\u002Fmegatron\u002Fbridge\u002Fdata\u002Fsequence_batching.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","def prepare_padded_or_packed_sequence_batch(\n    batch,\n    *,\n    sequence_length,\n    ...\n    enable_in_batch_packing=False,\n    in_batch_packing_pad_to_multiple_of=1,\n    ...\n):\n    ...\n    if enable_in_batch_packing:\n        pack_right_padded_sequence_batch_to_mcore_thd(\n            batch,\n            sequence_length=sequence_length,\n            pad_to_multiple_of=in_batch_packing_pad_to_multiple_of,\n            ...\n        )\n        return\n","397:449:src\u002Fmegatron\u002Fbridge\u002Fdata\u002Fsequence_batching.py",[783],{"type":38,"tag":88,"props":784,"children":785},{"__ignoreMap":85},[786,794,802,810,818,825,833,841,848,856,863,871,879,887,895,903,911,920],{"type":38,"tag":92,"props":787,"children":788},{"class":94,"line":95},[789],{"type":38,"tag":92,"props":790,"children":791},{},[792],{"type":44,"value":793},"def prepare_padded_or_packed_sequence_batch(\n",{"type":38,"tag":92,"props":795,"children":796},{"class":94,"line":104},[797],{"type":38,"tag":92,"props":798,"children":799},{},[800],{"type":44,"value":801},"    batch,\n",{"type":38,"tag":92,"props":803,"children":804},{"class":94,"line":114},[805],{"type":38,"tag":92,"props":806,"children":807},{},[808],{"type":44,"value":809},"    *,\n",{"type":38,"tag":92,"props":811,"children":812},{"class":94,"line":123},[813],{"type":38,"tag":92,"props":814,"children":815},{},[816],{"type":44,"value":817},"    sequence_length,\n",{"type":38,"tag":92,"props":819,"children":820},{"class":94,"line":132},[821],{"type":38,"tag":92,"props":822,"children":823},{},[824],{"type":44,"value":653},{"type":38,"tag":92,"props":826,"children":827},{"class":94,"line":141},[828],{"type":38,"tag":92,"props":829,"children":830},{},[831],{"type":44,"value":832},"    enable_in_batch_packing=False,\n",{"type":38,"tag":92,"props":834,"children":835},{"class":94,"line":150},[836],{"type":38,"tag":92,"props":837,"children":838},{},[839],{"type":44,"value":840},"    in_batch_packing_pad_to_multiple_of=1,\n",{"type":38,"tag":92,"props":842,"children":843},{"class":94,"line":159},[844],{"type":38,"tag":92,"props":845,"children":846},{},[847],{"type":44,"value":653},{"type":38,"tag":92,"props":849,"children":850},{"class":94,"line":168},[851],{"type":38,"tag":92,"props":852,"children":853},{},[854],{"type":44,"value":855},"):\n",{"type":38,"tag":92,"props":857,"children":858},{"class":94,"line":177},[859],{"type":38,"tag":92,"props":860,"children":861},{},[862],{"type":44,"value":653},{"type":38,"tag":92,"props":864,"children":865},{"class":94,"line":186},[866],{"type":38,"tag":92,"props":867,"children":868},{},[869],{"type":44,"value":870},"    if enable_in_batch_packing:\n",{"type":38,"tag":92,"props":872,"children":873},{"class":94,"line":511},[874],{"type":38,"tag":92,"props":875,"children":876},{},[877],{"type":44,"value":878},"        pack_right_padded_sequence_batch_to_mcore_thd(\n",{"type":38,"tag":92,"props":880,"children":881},{"class":94,"line":520},[882],{"type":38,"tag":92,"props":883,"children":884},{},[885],{"type":44,"value":886},"            batch,\n",{"type":38,"tag":92,"props":888,"children":889},{"class":94,"line":529},[890],{"type":38,"tag":92,"props":891,"children":892},{},[893],{"type":44,"value":894},"            sequence_length=sequence_length,\n",{"type":38,"tag":92,"props":896,"children":897},{"class":94,"line":538},[898],{"type":38,"tag":92,"props":899,"children":900},{},[901],{"type":44,"value":902},"            pad_to_multiple_of=in_batch_packing_pad_to_multiple_of,\n",{"type":38,"tag":92,"props":904,"children":905},{"class":94,"line":547},[906],{"type":38,"tag":92,"props":907,"children":908},{},[909],{"type":44,"value":910},"            ...\n",{"type":38,"tag":92,"props":912,"children":914},{"class":94,"line":913},17,[915],{"type":38,"tag":92,"props":916,"children":917},{},[918],{"type":44,"value":919},"        )\n",{"type":38,"tag":92,"props":921,"children":923},{"class":94,"line":922},18,[924],{"type":38,"tag":92,"props":925,"children":926},{},[927],{"type":44,"value":928},"        return\n",{"type":38,"tag":47,"props":930,"children":931},{},[932],{"type":44,"value":933},"Packed THD runtime constraint:",{"type":38,"tag":80,"props":935,"children":939},{"className":936,"code":937,"language":938,"meta":85,"style":85},"language-94:108:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fgpt_step.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","if batch.get(\"cu_seqlens_q\") is not None:\n    cu_seqlens = batch.get(\"cu_seqlens_q_padded\")\n    if cu_seqlens is None:\n        cu_seqlens = batch[\"cu_seqlens_q\"]\n    if cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n        raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n    return cu_seqlens.squeeze()\n\ncu_seqlens = batch[\"cu_seqlens\"]\nif cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n    raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n","94:108:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Fgpt_step.py",[940],{"type":38,"tag":88,"props":941,"children":942},{"__ignoreMap":85},[943,951,959,967,975,983,991,999,1006,1014,1022],{"type":38,"tag":92,"props":944,"children":945},{"class":94,"line":95},[946],{"type":38,"tag":92,"props":947,"children":948},{},[949],{"type":44,"value":950},"if batch.get(\"cu_seqlens_q\") is not None:\n",{"type":38,"tag":92,"props":952,"children":953},{"class":94,"line":104},[954],{"type":38,"tag":92,"props":955,"children":956},{},[957],{"type":44,"value":958},"    cu_seqlens = batch.get(\"cu_seqlens_q_padded\")\n",{"type":38,"tag":92,"props":960,"children":961},{"class":94,"line":114},[962],{"type":38,"tag":92,"props":963,"children":964},{},[965],{"type":44,"value":966},"    if cu_seqlens is None:\n",{"type":38,"tag":92,"props":968,"children":969},{"class":94,"line":123},[970],{"type":38,"tag":92,"props":971,"children":972},{},[973],{"type":44,"value":974},"        cu_seqlens = batch[\"cu_seqlens_q\"]\n",{"type":38,"tag":92,"props":976,"children":977},{"class":94,"line":132},[978],{"type":38,"tag":92,"props":979,"children":980},{},[981],{"type":44,"value":982},"    if cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n",{"type":38,"tag":92,"props":984,"children":985},{"class":94,"line":141},[986],{"type":38,"tag":92,"props":987,"children":988},{},[989],{"type":44,"value":990},"        raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n",{"type":38,"tag":92,"props":992,"children":993},{"class":94,"line":150},[994],{"type":38,"tag":92,"props":995,"children":996},{},[997],{"type":44,"value":998},"    return cu_seqlens.squeeze()\n",{"type":38,"tag":92,"props":1000,"children":1001},{"class":94,"line":159},[1002],{"type":38,"tag":92,"props":1003,"children":1004},{"emptyLinePlaceholder":108},[1005],{"type":44,"value":111},{"type":38,"tag":92,"props":1007,"children":1008},{"class":94,"line":168},[1009],{"type":38,"tag":92,"props":1010,"children":1011},{},[1012],{"type":44,"value":1013},"cu_seqlens = batch[\"cu_seqlens\"]\n",{"type":38,"tag":92,"props":1015,"children":1016},{"class":94,"line":177},[1017],{"type":38,"tag":92,"props":1018,"children":1019},{},[1020],{"type":44,"value":1021},"if cu_seqlens.dim() > 1 and cu_seqlens.size(0) != 1:\n",{"type":38,"tag":92,"props":1023,"children":1024},{"class":94,"line":186},[1025],{"type":38,"tag":92,"props":1026,"children":1027},{},[1028],{"type":44,"value":1029},"    raise ValueError(\"Packed THD batches expect micro-batch size 1 for context-parallel slicing (THD layout)\")\n",{"type":38,"tag":68,"props":1031,"children":1033},{"id":1032},"pitfalls",[1034],{"type":44,"value":1035},"Pitfalls",{"type":38,"tag":1037,"props":1038,"children":1039},"ol",{},[1040,1045,1058,1079,1098,1127,1132],{"type":38,"tag":57,"props":1041,"children":1042},{},[1043],{"type":44,"value":1044},"Offline packed SFT and VLM in-batch packing are different features with opposite micro-batch rules.",{"type":38,"tag":57,"props":1046,"children":1047},{},[1048,1050,1056],{"type":44,"value":1049},"When CP is enabled, packed sequence lengths must respect ",{"type":38,"tag":88,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":44,"value":1055},"2 * context_parallel_size",{"type":44,"value":1057}," divisibility.",{"type":38,"tag":57,"props":1059,"children":1060},{},[1061,1063,1069,1071,1077],{"type":44,"value":1062},"For finetuning with CP, ",{"type":38,"tag":88,"props":1064,"children":1066},{"className":1065},[],[1067],{"type":44,"value":1068},"calculate_per_token_loss=True",{"type":44,"value":1070}," and ",{"type":38,"tag":88,"props":1072,"children":1074},{"className":1073},[],[1075],{"type":44,"value":1076},"ddp.average_in_collective=False",{"type":44,"value":1078}," are required.",{"type":38,"tag":57,"props":1080,"children":1081},{},[1082,1088,1090,1096],{"type":38,"tag":88,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":44,"value":1087},"pad_cu_seqlens=True",{"type":44,"value":1089}," also requires ",{"type":38,"tag":88,"props":1091,"children":1093},{"className":1092},[],[1094],{"type":44,"value":1095},"pad_to_max_length=True",{"type":44,"value":1097},".",{"type":38,"tag":57,"props":1099,"children":1100},{},[1101,1103,1109,1111,1117,1119,1125],{"type":44,"value":1102},"Packing support is model-family-specific. ",{"type":38,"tag":88,"props":1104,"children":1106},{"className":1105},[],[1107],{"type":44,"value":1108},"Qwen3-Next",{"type":44,"value":1110},", ",{"type":38,"tag":88,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":44,"value":1116},"GLM-4.5",{"type":44,"value":1118},", and ",{"type":38,"tag":88,"props":1120,"children":1122},{"className":1121},[],[1123],{"type":44,"value":1124},"Qwen3.5-VL",{"type":44,"value":1126}," contain explicit opt-outs in different paths.",{"type":38,"tag":57,"props":1128,"children":1129},{},[1130],{"type":44,"value":1131},"MTP finetuning is documented as incompatible with packed sequences.",{"type":38,"tag":57,"props":1133,"children":1134},{},[1135,1137,1143],{"type":44,"value":1136},"Synthetic padding rows, including negative indices remapped through ",{"type":38,"tag":88,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":44,"value":1142},"samples_mapping",{"type":44,"value":1144},", must retain an all-zero loss mask.",{"type":38,"tag":68,"props":1146,"children":1148},{"id":1147},"verification",[1149],{"type":44,"value":1150},"Verification",{"type":38,"tag":47,"props":1152,"children":1153},{},[1154],{"type":44,"value":1155},"Use the checked-in unit coverage:",{"type":38,"tag":80,"props":1157,"children":1161},{"className":1158,"code":1159,"language":1160,"meta":85,"style":85},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","uv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Futils\u002Ftest_packed_seq_utils.py -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Ftest_config.py -k \"packed_sequence or enable_in_batch_packing or offline_and_in_batch_packing_are_mutually_exclusive or context_parallel_seq_length_divisibility or context_parallel_finetuning_validations\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fpacking\u002Ftest_in_batch.py -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Ftraining\u002Ftest_vlm_step.py -k \"deferred_in_batch_packing or packed_metadata\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_packed_parquet.py -k \"negative_index_zeroes_loss_mask\" -v && \\\nuv run python -m pytest tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_sft.py -k \"mapped_padding_rows_do_not_contribute_to_loss\" -v\n","bash",[1162],{"type":38,"tag":88,"props":1163,"children":1164},{"__ignoreMap":85},[1165,1217,1277,1317,1374,1431],{"type":38,"tag":92,"props":1166,"children":1167},{"class":94,"line":95},[1168,1174,1180,1185,1190,1195,1200,1205,1211],{"type":38,"tag":92,"props":1169,"children":1171},{"style":1170},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1172],{"type":44,"value":1173},"uv",{"type":38,"tag":92,"props":1175,"children":1177},{"style":1176},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1178],{"type":44,"value":1179}," run",{"type":38,"tag":92,"props":1181,"children":1182},{"style":1176},[1183],{"type":44,"value":1184}," python",{"type":38,"tag":92,"props":1186,"children":1187},{"style":1176},[1188],{"type":44,"value":1189}," -m",{"type":38,"tag":92,"props":1191,"children":1192},{"style":1176},[1193],{"type":44,"value":1194}," pytest",{"type":38,"tag":92,"props":1196,"children":1197},{"style":1176},[1198],{"type":44,"value":1199}," tests\u002Funit_tests\u002Ftraining\u002Futils\u002Ftest_packed_seq_utils.py",{"type":38,"tag":92,"props":1201,"children":1202},{"style":1176},[1203],{"type":44,"value":1204}," -v",{"type":38,"tag":92,"props":1206,"children":1208},{"style":1207},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1209],{"type":44,"value":1210}," &&",{"type":38,"tag":92,"props":1212,"children":1214},{"style":1213},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1215],{"type":44,"value":1216}," \\\n",{"type":38,"tag":92,"props":1218,"children":1219},{"class":94,"line":104},[1220,1224,1228,1232,1236,1240,1245,1250,1255,1260,1265,1269,1273],{"type":38,"tag":92,"props":1221,"children":1222},{"style":1170},[1223],{"type":44,"value":1173},{"type":38,"tag":92,"props":1225,"children":1226},{"style":1176},[1227],{"type":44,"value":1179},{"type":38,"tag":92,"props":1229,"children":1230},{"style":1176},[1231],{"type":44,"value":1184},{"type":38,"tag":92,"props":1233,"children":1234},{"style":1176},[1235],{"type":44,"value":1189},{"type":38,"tag":92,"props":1237,"children":1238},{"style":1176},[1239],{"type":44,"value":1194},{"type":38,"tag":92,"props":1241,"children":1242},{"style":1176},[1243],{"type":44,"value":1244}," tests\u002Funit_tests\u002Ftraining\u002Ftest_config.py",{"type":38,"tag":92,"props":1246,"children":1247},{"style":1176},[1248],{"type":44,"value":1249}," -k",{"type":38,"tag":92,"props":1251,"children":1252},{"style":1207},[1253],{"type":44,"value":1254}," \"",{"type":38,"tag":92,"props":1256,"children":1257},{"style":1176},[1258],{"type":44,"value":1259},"packed_sequence or enable_in_batch_packing or offline_and_in_batch_packing_are_mutually_exclusive or context_parallel_seq_length_divisibility or context_parallel_finetuning_validations",{"type":38,"tag":92,"props":1261,"children":1262},{"style":1207},[1263],{"type":44,"value":1264},"\"",{"type":38,"tag":92,"props":1266,"children":1267},{"style":1176},[1268],{"type":44,"value":1204},{"type":38,"tag":92,"props":1270,"children":1271},{"style":1207},[1272],{"type":44,"value":1210},{"type":38,"tag":92,"props":1274,"children":1275},{"style":1213},[1276],{"type":44,"value":1216},{"type":38,"tag":92,"props":1278,"children":1279},{"class":94,"line":114},[1280,1284,1288,1292,1296,1300,1305,1309,1313],{"type":38,"tag":92,"props":1281,"children":1282},{"style":1170},[1283],{"type":44,"value":1173},{"type":38,"tag":92,"props":1285,"children":1286},{"style":1176},[1287],{"type":44,"value":1179},{"type":38,"tag":92,"props":1289,"children":1290},{"style":1176},[1291],{"type":44,"value":1184},{"type":38,"tag":92,"props":1293,"children":1294},{"style":1176},[1295],{"type":44,"value":1189},{"type":38,"tag":92,"props":1297,"children":1298},{"style":1176},[1299],{"type":44,"value":1194},{"type":38,"tag":92,"props":1301,"children":1302},{"style":1176},[1303],{"type":44,"value":1304}," tests\u002Funit_tests\u002Fdata\u002Fpacking\u002Ftest_in_batch.py",{"type":38,"tag":92,"props":1306,"children":1307},{"style":1176},[1308],{"type":44,"value":1204},{"type":38,"tag":92,"props":1310,"children":1311},{"style":1207},[1312],{"type":44,"value":1210},{"type":38,"tag":92,"props":1314,"children":1315},{"style":1213},[1316],{"type":44,"value":1216},{"type":38,"tag":92,"props":1318,"children":1319},{"class":94,"line":123},[1320,1324,1328,1332,1336,1340,1345,1349,1353,1358,1362,1366,1370],{"type":38,"tag":92,"props":1321,"children":1322},{"style":1170},[1323],{"type":44,"value":1173},{"type":38,"tag":92,"props":1325,"children":1326},{"style":1176},[1327],{"type":44,"value":1179},{"type":38,"tag":92,"props":1329,"children":1330},{"style":1176},[1331],{"type":44,"value":1184},{"type":38,"tag":92,"props":1333,"children":1334},{"style":1176},[1335],{"type":44,"value":1189},{"type":38,"tag":92,"props":1337,"children":1338},{"style":1176},[1339],{"type":44,"value":1194},{"type":38,"tag":92,"props":1341,"children":1342},{"style":1176},[1343],{"type":44,"value":1344}," tests\u002Funit_tests\u002Ftraining\u002Ftest_vlm_step.py",{"type":38,"tag":92,"props":1346,"children":1347},{"style":1176},[1348],{"type":44,"value":1249},{"type":38,"tag":92,"props":1350,"children":1351},{"style":1207},[1352],{"type":44,"value":1254},{"type":38,"tag":92,"props":1354,"children":1355},{"style":1176},[1356],{"type":44,"value":1357},"deferred_in_batch_packing or packed_metadata",{"type":38,"tag":92,"props":1359,"children":1360},{"style":1207},[1361],{"type":44,"value":1264},{"type":38,"tag":92,"props":1363,"children":1364},{"style":1176},[1365],{"type":44,"value":1204},{"type":38,"tag":92,"props":1367,"children":1368},{"style":1207},[1369],{"type":44,"value":1210},{"type":38,"tag":92,"props":1371,"children":1372},{"style":1213},[1373],{"type":44,"value":1216},{"type":38,"tag":92,"props":1375,"children":1376},{"class":94,"line":132},[1377,1381,1385,1389,1393,1397,1402,1406,1410,1415,1419,1423,1427],{"type":38,"tag":92,"props":1378,"children":1379},{"style":1170},[1380],{"type":44,"value":1173},{"type":38,"tag":92,"props":1382,"children":1383},{"style":1176},[1384],{"type":44,"value":1179},{"type":38,"tag":92,"props":1386,"children":1387},{"style":1176},[1388],{"type":44,"value":1184},{"type":38,"tag":92,"props":1390,"children":1391},{"style":1176},[1392],{"type":44,"value":1189},{"type":38,"tag":92,"props":1394,"children":1395},{"style":1176},[1396],{"type":44,"value":1194},{"type":38,"tag":92,"props":1398,"children":1399},{"style":1176},[1400],{"type":44,"value":1401}," tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_packed_parquet.py",{"type":38,"tag":92,"props":1403,"children":1404},{"style":1176},[1405],{"type":44,"value":1249},{"type":38,"tag":92,"props":1407,"children":1408},{"style":1207},[1409],{"type":44,"value":1254},{"type":38,"tag":92,"props":1411,"children":1412},{"style":1176},[1413],{"type":44,"value":1414},"negative_index_zeroes_loss_mask",{"type":38,"tag":92,"props":1416,"children":1417},{"style":1207},[1418],{"type":44,"value":1264},{"type":38,"tag":92,"props":1420,"children":1421},{"style":1176},[1422],{"type":44,"value":1204},{"type":38,"tag":92,"props":1424,"children":1425},{"style":1207},[1426],{"type":44,"value":1210},{"type":38,"tag":92,"props":1428,"children":1429},{"style":1213},[1430],{"type":44,"value":1216},{"type":38,"tag":92,"props":1432,"children":1433},{"class":94,"line":141},[1434,1438,1442,1446,1450,1454,1459,1463,1467,1472,1476],{"type":38,"tag":92,"props":1435,"children":1436},{"style":1170},[1437],{"type":44,"value":1173},{"type":38,"tag":92,"props":1439,"children":1440},{"style":1176},[1441],{"type":44,"value":1179},{"type":38,"tag":92,"props":1443,"children":1444},{"style":1176},[1445],{"type":44,"value":1184},{"type":38,"tag":92,"props":1447,"children":1448},{"style":1176},[1449],{"type":44,"value":1189},{"type":38,"tag":92,"props":1451,"children":1452},{"style":1176},[1453],{"type":44,"value":1194},{"type":38,"tag":92,"props":1455,"children":1456},{"style":1176},[1457],{"type":44,"value":1458}," tests\u002Funit_tests\u002Fdata\u002Fdatasets\u002Ftest_sft.py",{"type":38,"tag":92,"props":1460,"children":1461},{"style":1176},[1462],{"type":44,"value":1249},{"type":38,"tag":92,"props":1464,"children":1465},{"style":1207},[1466],{"type":44,"value":1254},{"type":38,"tag":92,"props":1468,"children":1469},{"style":1176},[1470],{"type":44,"value":1471},"mapped_padding_rows_do_not_contribute_to_loss",{"type":38,"tag":92,"props":1473,"children":1474},{"style":1207},[1475],{"type":44,"value":1264},{"type":38,"tag":92,"props":1477,"children":1478},{"style":1176},[1479],{"type":44,"value":1480}," -v\n",{"type":38,"tag":47,"props":1482,"children":1483},{},[1484],{"type":44,"value":1485},"Success criteria:",{"type":38,"tag":53,"props":1487,"children":1488},{},[1489,1494,1499,1504],{"type":38,"tag":57,"props":1490,"children":1491},{},[1492],{"type":44,"value":1493},"all selected tests pass",{"type":38,"tag":57,"props":1495,"children":1496},{},[1497],{"type":44,"value":1498},"offline and in-batch configuration validation remains mutually exclusive",{"type":38,"tag":57,"props":1500,"children":1501},{},[1502],{"type":44,"value":1503},"packed metadata reaches the training step in MCore THD form",{"type":38,"tag":57,"props":1505,"children":1506},{},[1507],{"type":44,"value":1508},"mapped padding rows do not contribute to loss",{"type":38,"tag":1510,"props":1511,"children":1512},"style",{},[1513],{"type":44,"value":1514},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1516,"total":1672},[1517,1535,1552,1563,1575,1589,1602,1614,1627,1638,1652,1661],{"slug":1518,"name":1518,"fn":1519,"description":1520,"org":1521,"tags":1522,"stars":1532,"repoUrl":1533,"updatedAt":1534},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1523,1526,1529],{"name":1524,"slug":1525,"type":15},"Documentation","documentation",{"name":1527,"slug":1528,"type":15},"MCP","mcp",{"name":1530,"slug":1531,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":1536,"name":1536,"fn":1537,"description":1538,"org":1539,"tags":1540,"stars":1549,"repoUrl":1550,"updatedAt":1551},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1541,1544,1547],{"name":1542,"slug":1543,"type":15},"Containers","containers",{"name":1545,"slug":1546,"type":15},"Deployment","deployment",{"name":1548,"slug":84,"type":15},"Python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":1553,"name":1553,"fn":1554,"description":1555,"org":1556,"tags":1557,"stars":1549,"repoUrl":1550,"updatedAt":1562},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1558,1561],{"name":1559,"slug":1560,"type":15},"CI\u002FCD","ci-cd",{"name":1545,"slug":1546,"type":15},"2026-07-14T05:25:59.97109",{"slug":1564,"name":1564,"fn":1565,"description":1566,"org":1567,"tags":1568,"stars":1549,"repoUrl":1550,"updatedAt":1574},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1569,1570,1571],{"name":1559,"slug":1560,"type":15},{"name":1545,"slug":1546,"type":15},{"name":1572,"slug":1573,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":1576,"name":1576,"fn":1577,"description":1578,"org":1579,"tags":1580,"stars":1549,"repoUrl":1550,"updatedAt":1588},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1581,1584,1585],{"name":1582,"slug":1583,"type":15},"Debugging","debugging",{"name":1572,"slug":1573,"type":15},{"name":1586,"slug":1587,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":1590,"name":1590,"fn":1591,"description":1592,"org":1593,"tags":1594,"stars":1549,"repoUrl":1550,"updatedAt":1601},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1595,1598],{"name":1596,"slug":1597,"type":15},"Best Practices","best-practices",{"name":1599,"slug":1600,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":1603,"name":1603,"fn":1604,"description":1605,"org":1606,"tags":1607,"stars":1549,"repoUrl":1550,"updatedAt":1613},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1608,1609,1612],{"name":17,"slug":18,"type":15},{"name":1610,"slug":1611,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":1615,"name":1615,"fn":1616,"description":1617,"org":1618,"tags":1619,"stars":1549,"repoUrl":1550,"updatedAt":1626},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1620,1623],{"name":1621,"slug":1622,"type":15},"QA","qa",{"name":1624,"slug":1625,"type":15},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":1628,"name":1628,"fn":1629,"description":1630,"org":1631,"tags":1632,"stars":1549,"repoUrl":1550,"updatedAt":1637},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1633,1634],{"name":1545,"slug":1546,"type":15},{"name":1635,"slug":1636,"type":15},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":1639,"name":1639,"fn":1640,"description":1641,"org":1642,"tags":1643,"stars":1549,"repoUrl":1550,"updatedAt":1651},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1644,1647,1648],{"name":1645,"slug":1646,"type":15},"Code Review","code-review",{"name":1572,"slug":1573,"type":15},{"name":1649,"slug":1650,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":1653,"name":1653,"fn":1654,"description":1655,"org":1656,"tags":1657,"stars":1549,"repoUrl":1550,"updatedAt":1660},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1658,1659],{"name":1621,"slug":1622,"type":15},{"name":1624,"slug":1625,"type":15},"2026-07-14T05:25:54.928983",{"slug":1662,"name":1662,"fn":1663,"description":1664,"org":1665,"tags":1666,"stars":1549,"repoUrl":1550,"updatedAt":1671},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1667,1670],{"name":1668,"slug":1669,"type":15},"Automation","automation",{"name":1559,"slug":1560,"type":15},"2026-07-30T05:29:03.275638",496,{"items":1674,"total":1768},[1675,1690,1700,1714,1724,1739,1754],{"slug":1676,"name":1676,"fn":1677,"description":1678,"org":1679,"tags":1680,"stars":20,"repoUrl":21,"updatedAt":1689},"accelerated-computing-cudf","accelerate data processing with cuDF","Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV\u002FParquet I\u002FO, nullable semantics, and multi-GPU DataFrame workloads.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1681,1684,1687,1688],{"name":1682,"slug":1683,"type":15},"Data Analysis","data-analysis",{"name":1685,"slug":1686,"type":15},"Data Engineering","data-engineering",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-14T05:28:43.176466",{"slug":1691,"name":1691,"fn":1692,"description":1693,"org":1694,"tags":1695,"stars":20,"repoUrl":21,"updatedAt":1699},"aiq-deploy","deploy and manage NVIDIA AI-Q infrastructure","Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1696,1697,1698],{"name":1545,"slug":1546,"type":15},{"name":1635,"slug":1636,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:29:06.667109",{"slug":1701,"name":1701,"fn":1702,"description":1703,"org":1704,"tags":1705,"stars":20,"repoUrl":21,"updatedAt":1713},"aiq-research","conduct deep research with AI-Q","Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1706,1709,1710],{"name":1707,"slug":1708,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":1711,"slug":1712,"type":15},"Research","research","2026-07-14T05:28:06.816956",{"slug":1715,"name":1715,"fn":1716,"description":1717,"org":1718,"tags":1719,"stars":20,"repoUrl":21,"updatedAt":1723},"amc-run-sample-calibration","run AMC sample dataset calibration","Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1720,1721,1722],{"name":1682,"slug":1683,"type":15},{"name":9,"slug":8,"type":15},{"name":1624,"slug":1625,"type":15},"2026-07-17T05:29:03.913266",{"slug":1725,"name":1725,"fn":1726,"description":1727,"org":1728,"tags":1729,"stars":20,"repoUrl":21,"updatedAt":1738},"amc-run-video-calibration","calibrate video datasets with AutoMagicCalib","Calibrate a new dataset from pre-recorded video files via the AutoMagicCalib REST API. Use when user has local MP4s and says 'calibrate my videos', 'run AMC on these videos', or similar. For RTSP\u002Flive streams, use amc-run-rtsp-calibration instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1730,1731,1734,1735],{"name":1668,"slug":1669,"type":15},{"name":1732,"slug":1733,"type":15},"Imaging","imaging",{"name":9,"slug":8,"type":15},{"name":1736,"slug":1737,"type":15},"Video","video","2026-07-17T05:28:53.905004",{"slug":1740,"name":1740,"fn":1741,"description":1742,"org":1743,"tags":1744,"stars":20,"repoUrl":21,"updatedAt":1753},"amc-setup-calibration-stack","deploy AutoMagicCalib microservice with Docker","Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1745,1746,1749,1750],{"name":1545,"slug":1546,"type":15},{"name":1747,"slug":1748,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":1751,"slug":1752,"type":15},"Operations","operations","2026-07-17T05:28:56.913999",{"slug":1755,"name":1755,"fn":1756,"description":1757,"org":1758,"tags":1759,"stars":20,"repoUrl":21,"updatedAt":1767},"cudaq-guide","develop quantum applications with CUDA-Q","CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1760,1761,1764],{"name":9,"slug":8,"type":15},{"name":1762,"slug":1763,"type":15},"Quantum Computing","quantum-computing",{"name":1765,"slug":1766,"type":15},"Simulation","simulation","2026-07-14T05:26:58.898253",305]