pytorch / pytorch/executorch

ExecuTorch LLM runner does not stop on phi-4-mini's stop token

Open
#10,365 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🐛 Describe the bug

If we export phi-4-mini to a pte file and then try to run it with executorch.examples.models.llama.runner.native (https://huggingface.co/jerryzh168/phi4-mini-8dq4w#run-model-with-pybindings), it does not stop generating text when the stop token is reached.

Versions

NA

cc @larryliu0820 @mergennachin @cccclai @helunwencser @jackzhxng

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 executorch.examples.models.llama.runner.native and reproduce the issue using the exported phi-4-mini PTE file from the linked model instructions. Trace how the runner detects stop tokens during generation; done means generation stops when phi-4-mini's stop token is reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
embedded-iot, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.