OpenGVLab / OpenGVLab/VideoChat-Flash
Bug in inference mode?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 530
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I found that, in the code, if hidden_states.shape[1] != 1: is used to detect prefill stage.
I thought this criteria sometimes goes wrong. In my experiments, the hidden_states.shape was:
- hidden_states.shape[1] = n: prefill
- hidden_states.shape[1] =1: when generating the 2nd token
- hidden_states.shape[1] =2: when generating the 3rd token
- hidden_states.shape[1] =3: when generating the 4th token
...
So I have two questions:
- Can hidden_states.shape[1] consistently equals to 1 (instead of 1,2,3,...) after prefilling if I use some generating setting?
- Would
position_ids[0,0] == 0be a robuster criteria thanhidden_states.shape[1] != 1to detect prefill?
Contributor guide
No contributing guide indexed for this repository
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 locating the inference code containing if hidden_states.shape[1] != 1: and trace how hidden_states and position_ids are produced during generation. Compare the observed shapes under relevant generation settings, then document which signal reliably identifies prefill and define the resulting code change or recommendation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100