Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the test results of charades_sta. #8

Open
jiangerxiaozhao2 opened this issue Sep 19, 2024 · 4 comments
Open

About the test results of charades_sta. #8

jiangerxiaozhao2 opened this issue Sep 19, 2024 · 4 comments

Comments

@jiangerxiaozhao2
Copy link

Great work!
I got strange results. Could you help me?

../outputs/charades_sta-recursive_grounding-4_turns.jsonl num examples: 3720
turns: 1
mean iou: 0.2698
[email protected]/0.5/0.7: 0.3430/0.0022/0.0000
turns: 2
mean iou: 0.2698
[email protected]/0.5/0.7: 0.3430/0.0022/0.0000
turns: 3
mean iou: 0.2698
[email protected]/0.5/0.7: 0.3430/0.0022/0.0000
turns: 4
mean iou: 0.2698
[email protected]/0.5/0.7: 0.3430/0.0022/0.0000

The log file is:
charades_sta-recursive_grounding-4_turns.log

Only change to current code is

tokenizer = BertTokenizer.from_pretrained(self.bert_path, truncation_side=truncation_side, local_files_only=True)

local_files_only=True->False for download necessary files

@yellow-binary-tree
Copy link
Owner

Yea, the problem is the model is always predicting "Throughout the entire video." at the first turn and terminates the recursive grounding process.

Why is there a CUDA out of memory error traceback in your log in line 102-119? Maybe the model is not correctly loaded?

@jiangerxiaozhao2
Copy link
Author

I ran the code again and there was no "out of memory" error, but the result was the same.
charades_sta-recursive_grounding-4_turns.log

After debugging the program, I found that the prediction for each video is “llm_message = '('”.

@yellow-binary-tree
Copy link
Owner

yellow-binary-tree commented Sep 27, 2024

Here is my recursive grounding log:
charades_sta-recursive_grounding-4_turns.log

I compared my recursive grounding log (which works as expected) with yours. The main difference is the bos_token and eos_token used:
bb5ef39570495cf055998373d97b61d

For hawkeye model we use 0 as bos_token_id and 1 for eos_token_id. However, in your recursive log you used 1 as bos_token_id and 2 for eos_token _id. This may cause the model to generate nothing as it wrongly identifies the bos_token as the eos_token. You can try to reset the token_ids in LlamaConfig manually by adding following code after this line and see if it works:

llama_config = LlamaConfig.from_pretrained(llama_model_path)

llama_config.bos_token_id = 0
llama_config.eos_token_id = 1

As for how this problem arises, all special tokens of Hawkeye were inherited from vicuna-v0, which were further inherited from LLaMA (v1). I can vaguely recall that when llama was first released in early 2023, its special token was once inconsistent in different released versions and caused some confusion at that time.

Please let me know if this solves your problem so I can fix this bug.

@jiangerxiaozhao2
Copy link
Author

I tried, but it didn't work.
Fix two bugs:
llama_config.bos_token_id = 0
llama_config.eos_token_id = 1
And fix other two diffenrences:
llama_config.pad_token_id = -1
"transformers_version": "4.35.2"
The new log is:
charades_sta-recursive_grounding-4_turns.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants