Is dynamic weight update / fine-tuning supported in QNN / XNNPACK backends?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
š The feature, motivation and pitch
Iām working on a research project to fine-tune a model on Android devices. I am exploring using ExecuTorch + QNN or XNNPACK backend for inference acceleration, but need to ensure that the backend can support dynamic modification of weights (i.e., after initialization, allow updating weights / biases, and then run forward again).
What I found
- In executorch/extension/training/examples/XOR/train.cpp, training code based on executorch is provided, but it does not mention the supported backends.
- The official XNNPACK backend documentation describes that, during runtime initialization, weights / biases are āpackedā (i.e. weight packing) into XNNPACKās internal data structures, and the original preprocessed blobās data is freed. This seems to imply that weights become static / immutable from the perspective of the backendās execute graph.
- I did not find description in the docs or runtime API of any mechanism to āunlockā or āupdateā those packed weights at runtime.
- There is an existing issue (#11355) reporting that even dynamic quantization + XNNPACK + Android may fail to load āforwardā method, which suggests that non-static quantization / dynamic behavior is fragile or unsupported.
- For QNN backend, I saw open / triaged issues about compilation or binary loading, but none that explicitly mention support for runtime weight update.
My questions
- Does ExecuTorch (any of its backends: QNN, XNNPACK, Vulkan, etc.) currently support runtime in-place weight updates (i.e. treat model weights as mutable parameters, allow updating them between forward calls, as required in fine-tuning / training / zeroth-order optimization)?
- If not supported, is there a recommended workflow / workaround for on-device fine-tuning with ExecuTorch? Or is this explicitly out of scope?
- If itās not currently supported, would the maintainers be open to considering such a feature in future (e.g. a āmutable weightā delegate, or mechanism to reload new weights into backend graph)?
Thank you for your time and for developing ExecuTorch ā it is a great tool for on-device inference / deployment, and I hope it can support on-device fine-tuning in the future.
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @JacobSzwejbka
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up ā it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading executorch/extension/training/examples/XOR/train.cpp and the XNNPACK backend documentation, then compare the runtime-weight behavior described there with the QNN questions in this issue. Done means documenting whether any listed backend supports in-place weight updates and, if not, recording a recommended workflow or whether the feature is out of scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- machine-learning, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100