pytorch / pytorch/executorch

llama model is not fully lowered to ANE (coreml backend)

Open
#4,091 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: coreml triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

As title, the model definition is here: https://github.com/pytorch/executorch/blob/main/examples/models/llama2/llama_transformer.py

There are two parts not lowered to ANE, including embedding and kv cache update

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/models/llama2/llama_transformer.py and inspect how the embedding and KV cache update are represented for the Core ML backend. Trace the lowering path for both parts and verify that the complete Llama model, including embedding and KV cache update, is lowered to ANE.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.