Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9794654
[ad-v4][step1] Add trtllm_mxfp4_w4a16_moe_fused custom op
taylor-yb-lee May 6, 2026
0216f83
[ad-v4][step2] Add MXFP4 weight-prep helper for trtllm-gen kernel
taylor-yb-lee May 6, 2026
9de99b0
[ad-v4][step1.1] Move topk routing inside trtllm_mxfp4_w4a16 op
taylor-yb-lee May 6, 2026
9472e77
[ad-v4][step3] Add quantize_mxfp4_moe_trtllm_gen transform
taylor-yb-lee May 6, 2026
3d26122
[fix] Bf16MxE2m1 get_valid_tactics arg order
taylor-yb-lee May 7, 2026
79960a0
[ad-v4][step4] Match PT MXFP4 weight prep + add block_scale_interleave
taylor-yb-lee May 7, 2026
12e1bc3
[ad-v5] Add modeling_gpt_oss_ir.py for sharding-IR attention TP
taylor-yb-lee May 7, 2026
467e56e
[ad-v6][step5] Implement TP-MoE for trtllm_mxfp4_w4a16_moe_fused
taylor-yb-lee May 7, 2026
1fc48bf
Update gpt-oss-120b acc ref value
taylor-yb-lee May 7, 2026
fdbf3b9
[ad-v4][fix] Shuffle MXFP4 expert biases to match trtllm-gen kernel l…
taylor-yb-lee May 7, 2026
27e7dce
[ad-v4] Switch gpt-oss-120b standalone config to single-GPU + trtllm-…
taylor-yb-lee May 7, 2026
f3ed53c
[ad-v4][fix] Pin gpt-oss-120b activation dtype to bf16
taylor-yb-lee May 14, 2026
28446f4
[ad-fusion] fuse_gemms: handle linear with bias (Q/K/V projections)
taylor-yb-lee May 7, 2026
9e3277c
[ad-cudagraph] Fix _inject_out_param for ops with mid-schema 'out' param
taylor-yb-lee May 8, 2026
eddc448
[None][fix] AD gpt-oss: use get_hf_rope_theta() for transformers 5.x
taylor-yb-lee May 15, 2026
5a915e4
[None][fix] AD W4A16 MoE: pass router_logits to kernel, drop precompu…
taylor-yb-lee May 15, 2026
2932448
[None][fix] AD gpt-oss: enable fuse_rope_into_trtllm_attention for Ro…
taylor-yb-lee May 15, 2026
142f3f4
[ad-mxfp4-moe] Add W4A8 (MXFP8 activation) MoE op + transform config
taylor-yb-lee May 8, 2026
db48c67
[ad-mxfp4-moe] AD W4A8 MoE: always use fused-routing path
taylor-yb-lee May 9, 2026
f57795f
[ad-mxfp4-moe] AD gpt-oss-120b: enable W4A8 (mxfp8 activation) MoE path
taylor-yb-lee May 15, 2026
4d084f4
[ad-mxfp4-moe] Fix post-MoE AR placement for fuse_allreduce_residual_…
taylor-yb-lee May 8, 2026
a058338
[ad-mxfp4-moe] AD test: add 120b-tp2 GSM8K parametrization
taylor-yb-lee May 15, 2026
492bf4f
[ad-mxfp4-moe] AD gpt-oss: replace legacy modeling with sharding-IR v…
taylor-yb-lee May 16, 2026
73f0154
[ad-mxfp4-moe] Add load-hook helper for trtllm-gen MXFP4 weight prep
taylor-yb-lee May 16, 2026
cd34ab2
[ad-mxfp4-moe] AD gpt-oss: modeling-side MXFP4 trtllm-gen path with l…
taylor-yb-lee May 16, 2026
c1fd1b0
[ad-mxfp4-moe] AD gpt-oss-120b TP=2: unconditional MoE AR + dist_mapp…
taylor-yb-lee May 16, 2026
a4fdd46
[ad-mxfp4-moe] EP-aware MXFP4 trtllm-gen load hook via DistConfig con…
taylor-yb-lee May 16, 2026
31f7fee
[ad-mxfp4-moe] AD gpt-oss-20b yaml: pin activation dtype to bf16
taylor-yb-lee May 16, 2026
16a69b4
gpt-oss-120b tp2 sharding
taylor-yb-lee May 16, 2026
d442595
Update yaml
taylor-yb-lee May 18, 2026
c0f77a7
add rms norm fusion
taylor-yb-lee May 18, 2026
cc97ab8
pw cudagraph & cleanup
taylor-yb-lee May 18, 2026
d0b04c4
Revert "[ad-cudagraph] Fix _inject_out_param for ops with mid-schema …
taylor-yb-lee May 18, 2026
5147e5f
[ad-gpt-oss] linear: route bf16 GEMM to trtllm::cublas_mm on sm>=100
taylor-yb-lee May 19, 2026
612f816
[ad-mxfp4-moe] Consolidate trtllm-gen path into quantize_mxfp4_moe tr…
May 19, 2026
35569b8
[ad-mxfp4-moe] Add refactor handoff doc for cross-machine continuation
May 19, 2026
d1c24c6
Fix unittest failure for fuse_gemms
taylor-yb-lee May 19, 2026
4bb31c4
[ad-mxfp4-moe] Move MXFP4 kernel-layout prep from CPU load hook to GP…
taylor-yb-lee May 19, 2026
bed63cc
[ad-mxfp4-moe] Share scratch buffers across MoE layers in fuse_mxfp4_…
taylor-yb-lee May 20, 2026
b23d129
precommit error fix
taylor-yb-lee May 20, 2026
8ee919a
[ad-mxfp4-moe] Drop dead load-hook + move sharding hook + clarify naming
taylor-yb-lee May 20, 2026
9ee24e3
[ad-mxfp4-moe] Refactor prepare_trtllm_gen_moe_mxfp4_weights for read…
taylor-yb-lee May 20, 2026
6d76dc1
[ad-mxfp4-moe] Trim docstrings + move make_swiglu_param_tensors + inl…
taylor-yb-lee May 20, 2026
6602db4
[ad-mxfp4-moe] Rename mxfp4_moe.py -> fused_moe_mxfp4.py
taylor-yb-lee May 20, 2026
7e43a9c
[ad-mxfp4-moe] Align class names with fused_moe.py convention + trim …
taylor-yb-lee May 20, 2026
ad3ed1e
[ad-mxfp4-moe] yaml cleanup: gpt-oss example configs + drop legacy NO…
taylor-yb-lee May 20, 2026
2e95fc9
[ad-mxfp4-moe] Rename trtllm_mxfp4_* ops -> trtllm_quant_mxfp4_trtllm…
taylor-yb-lee May 20, 2026
f970e47
[ad-mxfp4-moe] Collapse W4A16/W4A8 MXFP4 ops + minor comment cleanups
taylor-yb-lee May 20, 2026
1e02439
[ad-mxfp4-moe] Drop unused use_dist_config / get_active_dist_config h…
taylor-yb-lee May 20, 2026
aae31a2
[ad-mxfp4-moe] modeling_gpt_oss.py: restore architecture/op-level com…
taylor-yb-lee May 20, 2026
fb0a471
[ad-mxfp4-moe] Add unit tests for FuseGemms bias-fusion path
taylor-yb-lee May 20, 2026
68a9980
[ad-mxfp4-moe] Drop dead _dtype_protected_params / GptOssExperts._app…
taylor-yb-lee May 20, 2026
b8e3fb1
[ad-mxfp4-moe] test_llm_api_autodeploy.py: drop redundant + commented…
taylor-yb-lee May 20, 2026
e60c0a7
[ad-mxfp4-moe] test_mxfp4_gsm8k: registry-driven world_size, override…
taylor-yb-lee May 20, 2026
43e8ac6
[ad-mxfp4-moe] Unit tests for trtllm-gen MXFP4 MoE prep + unified op
taylor-yb-lee May 20, 2026
e38d996
[ad-mxfp4-moe] Unit tests for FuseMXFP4Moe transform
taylor-yb-lee May 20, 2026
9633529
[ad-mxfp4-moe] gpt_oss_120b.yaml: drop dead detect_sharding / shardin…
taylor-yb-lee May 20, 2026
287567f
[ad-mxfp4-moe] Unify gpt_oss_{20b,120b}.yaml into a shared gpt_oss.yaml
taylor-yb-lee May 21, 2026
12e4b2f
[ad-mxfp4-moe] linear: drop redundant _sm_version() wrapper
taylor-yb-lee May 21, 2026
df4c398
[ad-mxfp4-moe] Drop intermediate_size % tp_size guard in trtllm-gen M…
taylor-yb-lee May 21, 2026
2a6014a
- _flatten_block_dim: contiguous().view() -> reshape() (downstream ca…
taylor-yb-lee May 21, 2026
9ce9649
Keep MXFP4 placeholders on existing param device
taylor-yb-lee May 21, 2026
0afd059
Revert "Keep MXFP4 placeholders on existing param device"
taylor-yb-lee May 21, 2026
80636a2
[ad-mxfp4-moe] Keep SwiGLU constants on CPU; meta-device placeholders…
taylor-yb-lee May 22, 2026
739c895
[ad-mxfp4-moe] _compute_padded_dims: use pad_up helper
taylor-yb-lee May 22, 2026
456d515
[ad-mxfp4-moe] gpt_oss.yaml: move sharding-path invariants out of tes…
taylor-yb-lee May 22, 2026
c452108
Add acc test to CI
taylor-yb-lee May 22, 2026
0f2eec1
remove redundant configs
taylor-yb-lee May 25, 2026
4c55168
[fix] AutoDeploy trtllm: revert SWA pool split to unblock non-uniform…
taylor-yb-lee Jun 1, 2026
6d02d12
[None][fix] AutoDeploy: keep mxfp4 MoE transforms standalone-importable
taylor-yb-lee Jun 2, 2026
02bda4a
[None][fix] AutoDeploy: import get_sm_version from _compat in linear op
taylor-yb-lee Jun 3, 2026
9210625
[None][test] AutoDeploy: enable gpt-oss registry accuracy tests
taylor-yb-lee Jun 4, 2026
a5c75d0
Revert "[fix] AutoDeploy trtllm: revert SWA pool split to unblock non…
taylor-yb-lee Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 2 additions & 38 deletions examples/auto_deploy/cookbooks/gpt_oss_trtllm_cookbook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,48 +100,12 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## OpenAI-Compatible Server\n",
"\n",
"Start a local OpenAI-compatible server with TensorRT-LLM via the terminal, within the running docker container.\n",
"\n",
"Each gpt-oss size has its own AutoDeploy YAML under `examples/auto_deploy/model_registry/configs/`:\n",
"- `gpt_oss_20b.yaml` (world_size=2)\n",
"- `gpt_oss_120b.yaml` (world_size=8)\n",
"\n",
"Pick the YAML that matches the model size you want to deploy."
]
"source": "## OpenAI-Compatible Server\n\nStart a local OpenAI-compatible server with TensorRT-LLM via the terminal, within the running docker container.\n\nBoth gpt-oss sizes share a single AutoDeploy YAML at `examples/auto_deploy/model_registry/configs/gpt_oss.yaml`. The same file is reused for 20B and 120B — only the HuggingFace model id changes between launches."
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Load `gpt-oss-20b`\n",
"\n",
"Launch the TensorRT-LLM server on 2 GPUs:\n",
"\n",
"```shell\n",
"trtllm-serve \"openai/gpt-oss-20b\" \\\n",
" --host 0.0.0.0 \\\n",
" --port 8000 \\\n",
" --backend _autodeploy \\\n",
" --extra_llm_api_options examples/auto_deploy/model_registry/configs/gpt_oss_20b.yaml\n",
"```\n",
"\n",
"### Load `gpt-oss-120b`\n",
"\n",
"Launch the TensorRT-LLM server on 8 GPUs:\n",
"\n",
"```shell\n",
"trtllm-serve \"openai/gpt-oss-120b\" \\\n",
" --host 0.0.0.0 \\\n",
" --port 8000 \\\n",
" --backend _autodeploy \\\n",
" --extra_llm_api_options examples/auto_deploy/model_registry/configs/gpt_oss_120b.yaml\n",
"```\n",
"\n",
"Both YAMLs are self-contained — they include the compile backend, attention backend, world size, KV-cache settings and the CUDA-graph batch-size buckets needed for serving."
]
"source": "### Load `gpt-oss-20b`\n\nLaunch the TensorRT-LLM server:\n\n```shell\ntrtllm-serve \"openai/gpt-oss-20b\" \\\n --host 0.0.0.0 \\\n --port 8000 \\\n --backend _autodeploy \\\n --extra_llm_api_options examples/auto_deploy/model_registry/configs/gpt_oss.yaml\n```\n\n### Load `gpt-oss-120b`\n\nLaunch the TensorRT-LLM server:\n\n```shell\ntrtllm-serve \"openai/gpt-oss-120b\" \\\n --host 0.0.0.0 \\\n --port 8000 \\\n --backend _autodeploy \\\n --extra_llm_api_options examples/auto_deploy/model_registry/configs/gpt_oss.yaml\n```\n\nThe shared YAML is self-contained — it includes the compile backend, attention backend, KV-cache settings and the CUDA-graph batch-size buckets needed for serving. `world_size` is supplied separately via the registry (e.g., `world_size_1.yaml`); pass it explicitly via `--extra_llm_api_options` when launching outside the registry."
},
{
"cell_type": "markdown",
Expand Down
4 changes: 4 additions & 0 deletions examples/auto_deploy/llmc/create_standalone_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@
# Imports utils.util.skip_pre_blackwell (not shipped in standalone) and exercises
# fuse_finegrained_fp8_swiglu which depends on TRT-LLM runtime.
"test_finegrained_fp8_swiglu.py",
# Exercise trtllm-gen MXFP4 MoE kernels (Blackwell-only) and import the
# prepare_trtllm_gen_moe_mxfp4_weights / utils.util helpers not in standalone.
"test_fuse_mxfp4_moe.py",
"test_trtllm_quant_mxfp4_trtllm_gen_moe.py",
}

# Import path rewrite: old -> new (applied to test files only).
Expand Down
47 changes: 47 additions & 0 deletions examples/auto_deploy/model_registry/configs/gpt_oss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# OpenAI GPT-OSS (20B / 120B, MXFP4 quantized) — shared AD serving config.
# - 20B: 24 layers, 32 experts, top-4
# - 120B: 36 layers, 128 experts, top-4
# Both share GQA (64 Q / 8 KV heads), head_dim=64, hidden=2880, and MXFP4
# weights on HF that AD's `quantize_mxfp4_moe` transform handles.
# world_size is set via the registry's `world_size_N.yaml` overlay — not here.
model_factory: AutoModelForCausalLM
model_kwargs:
dtype: bfloat16
attn_backend: trtllm
compile_backend: torch-cudagraph
skip_loading_weights: false
max_batch_size: 128
max_seq_len: 4096
max_num_tokens: 8192
enable_chunked_prefill: true
cuda_graph_config:
batch_sizes: [1, 2, 4, 8, 16, 32, 64, 128]
kv_cache_config:
enable_block_reuse: false
free_gpu_memory_fraction: 0.8
transforms:
detect_sharding:
enabled: false
sharding_transform_executor:
enabled: false
apply_sharding_hints:
enabled: true
requires_shape_prop: true
shard_layers: ["mha", "moe", "lm_head"] # V3: vocab-parallel lm_head (colwise + all_gather)
# TP2 trial: AUTO -> tunable_allreduce picks oneshot-lamport fused AR.
# NCCL has no fused residual+rmsnorm kernel -> RING_LL + separate rmsnorm.
allreduce_strategy: AUTO
quantize_mxfp4_moe:
backend: trtllm
trtllm_quant_act: mxfp8
fuse_gemms_mixed_children:
enabled: true
fuse_gemms:
enabled: true
fuse_rope_into_trtllm_attention:
enabled: true
fuse_add_rms_norm:
enabled: true
21 changes: 0 additions & 21 deletions examples/auto_deploy/model_registry/configs/gpt_oss_120b.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions examples/auto_deploy/model_registry/configs/gpt_oss_20b.yaml

This file was deleted.

14 changes: 6 additions & 8 deletions examples/auto_deploy/model_registry/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,9 @@ models:
- name: nvidia/Mistral-NeMo-Minitron-8B-Base
config_id: default_ws_2
yaml_extra: ['dashboard_default.yaml', 'world_size_2.yaml']
# OOM during AutoDeploy run.
# - name: openai/gpt-oss-20b
# config_id: gpt_oss_20b
# yaml_extra: ['gpt_oss_20b.yaml']
- name: openai/gpt-oss-20b
config_id: gpt_oss
yaml_extra: ['gpt_oss.yaml', 'world_size_1.yaml']
- name: ibm-granite/granite-3.0-8b-instruct
config_id: default_ws_1
yaml_extra: ['dashboard_default.yaml', 'world_size_1.yaml']
Expand Down Expand Up @@ -333,10 +332,9 @@ models:
# - name: meta-llama/Llama-3.2-90B-Vision-Instruct
# config_id: multimodal
# yaml_extra: ['dashboard_default.yaml', 'world_size_8.yaml', 'multimodal.yaml']
# torch.distributed.DistStoreError: Timed out after 601 seconds waiting for clients. 1/4 clients joined.
# - name: openai/gpt-oss-120b
# config_id: gpt_oss_120b
# yaml_extra: ['gpt_oss_120b.yaml']
- name: openai/gpt-oss-120b
config_id: gpt_oss
yaml_extra: ['gpt_oss.yaml', 'world_size_2.yaml']
# [RANK 3] Error querying confidential compute state: Function Not Found
# - name: meta-llama/Llama-4-Scout-17B-16E-Instruct
# config_id: multimodal__llama4_scout
Expand Down
3 changes: 3 additions & 0 deletions tensorrt_llm/_torch/auto_deploy/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ transforms:
fuse_finegrained_fp8_linear:
stage: post_load_fusion
backend: trtllm
fuse_mxfp4_moe:
stage: post_load_fusion
expect_mem_change: true # adds padding for trtllm-gen kernel alignment during weight repack
fuse_moe:
stage: post_load_fusion
expect_mem_change: true
Expand Down
Loading
Loading