Skip to content

fix(smollm3): resolve the NoPE schedule from the shared ModelConfig - #1

Open
Moviw wants to merge 1 commit into
ruiling-smartbear:feat/smollm3from
Moviw:fix/smollm3-rope-schedule-shared-config
Open

fix(smollm3): resolve the NoPE schedule from the shared ModelConfig#1
Moviw wants to merge 1 commit into
ruiling-smartbear:feat/smollm3from
Moviw:fix/smollm3-rope-schedule-shared-config

Conversation

@Moviw

@Moviw Moviw commented Sep 4, 2026

Copy link
Copy Markdown

Background

Hi @ruiling-smartbear — huge thanks for the SmolLM3 family work; I'm not trying to duplicate it. While helping run the missing engine-build step on a real TensorRT box (RTX 3090, TensorRT 11.2.1.2), I hit a blocker in the builders and this is a small fix for it, offered against your feat/smollm3 branch so it can fold straight into NVIDIA#1158.

The engine builders call rope_layer_schedule() on the config object the production build pipeline hands them, which is the shared tensorrt_model_connect.config.ModelConfig (from engine_builder.py / build_cli.py), not the family-local copy where the method is defined. So both builders raise AttributeError: 'ModelConfig' object has no attribute 'rope_layer_schedule' before any engine is built.

What changed

  • families/smollm3/config.py: moved the schedule resolution into a module-level rope_layer_schedule(config) helper that reads config.raw / config.num_hidden_layers and therefore works on the shared ModelConfig too; the ModelConfig method now delegates to it.
  • standard_decoder_builder.py and dual_profile_decoder_builder.py: call the module-level helper instead of the family-local method.
  • build_routing.py: call the helper directly instead of getattr(config, "rope_layer_schedule", None), so malformed-schedule validation actually runs instead of silently no-oping.

No shared infrastructure is touched; all changes stay under families/smollm3/.

Validation

python3 tools/model_ci.py validate                                              # passes: 93 families, smollm3 present
pytest tests/e2e/models/smollm3/test_smollm3_standard_decoder.py -q             # 12 passed (was 11 failed / 1 passed)
pytest tests/e2e/models/smollm3/test_smollm3_builder_engine.py -q               # 16 passed (was 6 failed / 10 passed)
pytest tests/e2e/models/llama/test_llama_standard_decoder.py -q                 # 12 passed (control, same box)

The engine-building failures above are the same six the PR describes as "need a real TensorRT module" — on a TRT box they were not skipped, they were failing with the AttributeError above, and now pass.

Notes

  • Base: ruiling-smartbear:feat/smollm3 (this PR targets your branch, not NVIDIA:main).
  • The full test_model_e2e[smollm3-3b] parity run still needs the 3B checkpoint + engine build; I did not run it (needs /mnt/storage + model download), which is unchanged from your remaining gap.

Refs: NVIDIA#1146, NVIDIA#1158

The engine builders call rope_layer_schedule() on the config object the
production build pipeline constructs, which is the shared
tensorrt_model_connect.config.ModelConfig, not the family-local copy that
defines the method. Both standard and dual-profile builds therefore raise
AttributeError before any engine is built. Resolve the schedule from
config.raw in a module-level helper and route both builders plus build
routing through it.

Refs: NVIDIA#1146, NVIDIA#1158
Signed-off-by: Moviw <xvzimo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant