Repository navigation
[serge] Fix 4 integration tests for model blt failing with import_or_config (other (4)) - #48534
sergereview[bot] wants to merge 2 commits into
Conversation
…or_config` (other (4))
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…or_config` (other (4))
|
[For maintainers] Suggested jobs to run (before merge) run-slow: blt |
CI recapDashboard: View test results in Grafana |
|
baseline f62dc9bf |
this PR b6765a36 |
|
|---|---|---|
BltIntegrationTest::test_model_logits |
failed | failed |
new failures in tests/models/blt |
— | 0 |
What changed, and what did not
The reported failure is addressed. The test no longer raises:
AttributeError: 'BltConfig' object has no attribute 'num_hidden_layers'
The get_text_config() override and the num_hidden_layers default do what the PR body claims. The test then gets further and fails on something else:
E RuntimeError: Expected all tensors to be on the same device, but got index is on cuda:0,
different from other tensors on cuda:1 (when checking argument in method wrapper_CUDA__index_select)
torch/nn/functional.py:2615
That is a device-placement problem in multi-GPU sharding, not a config-resolution one — a second, independent bug that the first was masking. Nothing in this patch regresses (0 collateral failures).
Closing because the targeted test is still red and an unverified patch should not sit in the review queue looking finished. The config fix itself looks worth keeping — if someone picks the blt group up, this branch is a reasonable starting point rather than a fresh start, and the remaining work is the cuda:0/cuda:1 index mismatch.
Original CI failure
4 integration tests for modelbltfailing withimport_or_config(other (4))tests/models/blt/test_modeling_blt.py::BltIntegrationTest::test_model_logits[multi-gpu] (import_or_config, seen 6/7)CI traceback —
tests/models/blt/test_modeling_blt.py::BltIntegrationTest::test_model_logitsWhere to watch it:
BLT integration tests fail with
AttributeError: 'BltConfig' object has no attribute 'num_hidden_layers'whenBltForCausalLMloads a checkpoint and the generation code accessesself.text_config.num_hidden_layers.Root cause:
BltForCausalLM.__init__callsconfig.get_text_config(). The inheritedPreTrainedConfig.get_text_config()only recognizes attributes nameddecoder,generator, ortext_config;BltConfigstores its text-generation settings indecoder_config, so the method falls back to returning the top-levelBltConfig, which lacksnum_hidden_layers.Fix: override
get_text_configinBltConfigto returnself.decoder_config, which is the correct text-output config for this composite model. This mirrors the pattern used by other composite configs in the library.Relates to #48533
Possibly related
Existing issues/PRs mentioning
test_model_logits(keyword match — not verified to share a root cause):This change was produced automatically by serge from a CI failure report. The patch was generated by an LLM and applied by serge; review before merging.
serge
v0.1.0· model:moonshotai/Kimi-K2.7-Code· 45 LLM turns · 47 tool calls · 38.8s · 1458223 in / 3819 out tokens