|
30 | 30 |
|
31 | 31 | # --- Config adapters -------------------------------------------------------- |
32 | 32 | # |
33 | | -# These run from ``load_pretrained_config`` in |
34 | | -# ``tensorrt_llm/_torch/pyexecutor/config_utils.py`` via lazy import — the |
| 33 | +# These run from `load_pretrained_config` in |
| 34 | +# `tensorrt_llm/_torch/pyexecutor/config_utils.py` via lazy import — the |
35 | 35 | # runtime layer asks the model module how to load its own config. |
36 | 36 | # |
37 | 37 | # There are two entry points: |
38 | | -# - ``_Qwen35ConfigCompat.normalize(config_dict)`` — for text-only |
| 38 | +# - `_Qwen35ConfigCompat.normalize(config_dict)` — for text-only |
39 | 39 | # Qwen3.5 (MoE and dense). Returns a dict that |
40 | | -# ``transformers.Qwen3NextConfig.from_dict(...)`` can consume, so the |
| 40 | +# `transformers.Qwen3NextConfig.from_dict(...)` can consume, so the |
41 | 41 | # existing Qwen3Next runtime is reused unchanged. |
42 | | -# - ``_normalize_qwen35_moe_vl_config(model_config)`` — for the |
43 | | -# Qwen3.5-MoE VLM. Mutates the HF-native ``transformers.Qwen3_5MoeConfig`` |
| 42 | +# - `_normalize_qwen35_moe_vl_config(model_config)` — for the |
| 43 | +# Qwen3.5-MoE VLM. Mutates the HF-native `transformers.Qwen3_5MoeConfig` |
44 | 44 | # in place, attaching the runtime aliases the Qwen3Next-based LM expects |
45 | | -# while keeping ``text_config`` / ``vision_config`` composite. |
| 45 | +# while keeping `text_config` / `vision_config` composite. |
46 | 46 |
|
47 | 47 |
|
48 | 48 | class _Qwen35ConfigCompat: |
49 | 49 | """Temporary shim for flattening Qwen3.5 text configs into Qwen3NextConfig. |
50 | 50 |
|
51 | | - We normalize to ``Qwen3NextConfig`` (rather than to a Qwen3.5-native |
52 | | - schema) so the runtime can reuse the existing ``Qwen3NextForCausalLM`` |
| 51 | + We normalize to `Qwen3NextConfig` (rather than to a Qwen3.5-native |
| 52 | + schema) so the runtime can reuse the existing `Qwen3NextForCausalLM` |
53 | 53 | model implementation unchanged — Qwen3.5 text is structurally identical |
54 | 54 | to Qwen3Next, so matching the config schema lets the same code serve |
55 | 55 | both. |
|
0 commit comments