openvino
12a5a257 - [TRANSFORMATIONS] SDPAToPA remove only SDPA-related Assign nodes (#33696)

Commit
123 days ago
[TRANSFORMATIONS] SDPAToPA remove only SDPA-related Assign nodes (#33696) ### Details: SDPAToPA aggressively removes all Assign nodes without checking what part of the model they belong to. This has been a right thing to do before the advent of hybrid models like LiquidAI/LFM2-1.2B that use ReadValue/Assign not only for full attention, but also for linear attention (not SDPA). The removal of all Assign nodes caused some ReadValue non-related to SDPA to lose their pair which lead to a corrupted model. Fix it by detecting and deleting only the proper Assign nodes. Minor refactoring to remove unnecessary parts and make the code of the transformation simpler. ### Tickets: - [CVS-179213](https://jira.devtools.intel.com/browse/CVS-179213) Signed-off-by: Andrii Staikov --------- Co-authored-by: Mikhail Ryzhov <mikhail.ryzhov@intel.com>
Parents
Loading