Commit fa12d2b
committed
[NPUW] Model builder: name projection MatMuls optimum-style for dynamic LoRA
make_linear named the projection MatMul with the bare layer name
("model.layers.N.self_attn.q_proj"). optimum-exported models name it
"<layer>/ov_ext::linear/MatMul". GenAI's dynamic-LoRA path builds its
lora_state_* variable ids from the MatMul friendly name, and NPUW's
ReshapeToStatic only pins the LoRA rank static for ids matching
".*MatMul\.(A|B|alpha)". With a bare name the rank stays dynamic and NPU
compilation throws "to_shape was called on a dynamic shape".
Append "/MatMul" to the MatMul friendly name so GenAI --lora --lora_mode
dynamic compiles for builder-generated models. Add a unit test asserting
projection MatMuls carry the /MatMul suffix.1 parent 8379d9b commit fa12d2b
2 files changed
Lines changed: 29 additions & 1 deletion
File tree
- src/plugins/intel_npu/tests
- functional/behavior/npuw/test_engine/models
- unit/npuw
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
0 commit comments