Skip to content

TF upgrade to 5.19.0 - #1287

Merged
Ann Kuruvilla (quic-akuruvil) merged 30 commits into
qualcomm:mainfrom
quic-mamta:tf_upgrade
Nov 3, 2026
Merged

Ann Kuruvilla (quic-akuruvil) merged 30 commits into
qualcomm:mainfrom
quic-mamta:tf_upgrade

Conversation

@quic-mamta

@quic-mamta Mamta Singh (quic-mamta) commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR upgrades QEfficient’s Transformers dependency from 5.5.4 to 5.19.0 and updates the affected model wrappers/tests for API changes introduced in the newer Transformers release.

Changes

  • Updated the Transformers pin to 5.19.0.
  • Added compatibility for renamed/moved Transformers classes:
    • CLIPTextTransformer fallback to CLIPTextModel
    • GraniteMoE expert/router rename handling
  • Fixed Gemma4 heterogeneous config handling:
    • Avoid direct global access to per-layer attributes like head_dim/global_head_dim
    • Resolve per-layer config values when building dummy KV cache tensors
    • Updated Gemma4 accuracy tests to avoid unsafe hasattr(...) on heterogeneous configs
  • Updated Qwen3.5 and Qwen3.5-MoE wrappers for Transformers 5.19.0 recurrent attention mask/layer-type behavior.
  • Fixed GLM4-MoE router reshaping to use hidden_dim.
  • Updated transform coverage for renamed optimized MoE components.

@quic-mamta
Mamta Singh (quic-mamta) marked this pull request as draft August 26, 2026 08:34
@quic-mamta
Mamta Singh (quic-mamta) force-pushed the tf_upgrade branch 3 times, most recently from 6f095ae to ab11e35 Compare August 26, 2026 10:41
@quic-mamta

Copy link
Copy Markdown
Contributor Author

CI-Ready

1 similar comment
@quic-mamta

Copy link
Copy Markdown
Contributor Author

CI-Ready

@quic-mamta

Copy link
Copy Markdown
Contributor Author

CI-Ready

@quic-mamta

Copy link
Copy Markdown
Contributor Author

CI-Ready

@quic-mamta Mamta Singh (quic-mamta) changed the title TF upgrade to 5.15.1 TF upgrade to 5.19.0 Oct 16, 2026
@quic-mamta
Mamta Singh (quic-mamta) force-pushed the tf_upgrade branch 6 times, most recently from 95b37f0 to c25c7b1 Compare October 24, 2026 12:41
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Adds a structured logging module (`QEFFLogger`) to the QEfficient
library,
based on
[qualcomm#696](qualcomm#696).

- `QEFFLogger` is a singleton logger with JSON formatter and rotating
file handler.
- Log level controlled project-wide via `QEFF_LOG_LEVEL` env var
(default: INFO); log file path
via `QEFF_LOG_PATH` or a timestamped default under
`~/.cache/qefficient_logs/`.
- Namespace support per module (`INFRA`, `MODEL`, `FT`) for targeted
filtering and post-processing.
- All existing `logging.getLogger(__name__)` and module-level `logger`
imports migrated to
    `QEFFLogger.get_logger(namespace)`.
- Jenkinsfile: all CI stages set
`QEFF_LOG_PATH=/efficient-transformers/Qeff_logs`.
  - New unit tests in `tests/utils/test_logger.py`.
- Generates process-aware filenames to avoid collisions between parallel
workers:
    `QEFF_YYYYMMDD_HHMMSS_PID.log`.

---------

Signed-off-by: Vishali Senthilkumar <vishsent@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Adds weight-free export, compile, and runtime support for
image-text-to-text
models. The implementation uses Dynamo-based ONNX export and
externalized
  checkpoint weights, with dual-QPC VLM execution.

  ### Supported VLM families

  - Qwen2.5-VL
  - Qwen3-VL
  - Qwen3-VL-MoE
  - Qwen3.5
  - Qwen3.5-MoE
  - Gemma4, including dense and MoE configurations

  ## What changed

  - Add weight-free VLM construction and dual-QPC routing in
    `QEFFAutoModelForImageTextToText`.
- Add checkpoint-key resolution and weight transforms for VLM and
Gemma4/MoE
    checkpoints.
- Extend Dynamo/ONNX export handling for repeated decoder subgraphs and
    external weight specifications.
  - Add combined and disaggregated vision, prefill, and decode flows.
- Add examples and CPU/QAIC coverage for weight-free VLM export,
compile, and
    HF-to-QAIC token parity.

  ## Constraints and known limitations

- Weight-free VLM execution requires dual-QPC mode (`kv_offload=True`).
  - Single-QPC weight-free export is unsupported.
  - `weight_free=True` and `layerwise=True` are mutually exclusive.
- Qwen2.5-VL multi-specialization vision compilation remains deferred
due to a
    QAIC Conv3D bias-shape error.
  - Gemma4 multi-specialization is not supported yet.
- Gemma4 continuous batching can fail to compile with `full_batch_size >
2`;
    CB + disaggregated compilation is also currently limited.

  ## Validation

  - Not run during this PR preparation.
- Added/updated coverage includes CPU export structure, dual-QPC
compilation,
    CCL, disaggregated flows, and QAIC HF-token parity.

---------
Signed-off-by: Ann Kuruvilla <akuruvil@qti.qualcomm.com>
Signed-off-by: Amit Raj <amitraj@qti.qualcomm.com>
Signed-off-by: Dhiraj Kumar Sah <dhirajku@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Co-authored-by: Ann Kuruvilla <akuruvil@qti.qualcomm.com>
Co-authored-by: Dhiraj Kumar Sah <dhirajku@qti.qualcomm.com>
Co-authored-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>
Signed-off-by: ochougul <ochougul@qti.qualcomm.com>
Signed-off-by: Mamta Singh <mamtsing@qti.qualcomm.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci passed

@quic-akuruvil
Ann Kuruvilla (quic-akuruvil) merged commit 739589d into qualcomm:main Nov 3, 2026
18 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants