unilm icon indicating copy to clipboard operation
unilm copied to clipboard

get wrong results using the downloaded checkpoint

Open Tourbillon opened this issue 3 years ago • 13 comments

Describe I used the 'kosmos2.pt' downloaded from the url for offiline demo,but I get wrong result. Is the model correct?

Tourbillon avatar Jul 01 '23 03:07 Tourbillon

What error message did you get?

donglixp avatar Jul 01 '23 03:07 donglixp

@donglixp The caption results is wrong and without any logic. The code is correctly running.

Tourbillon avatar Jul 01 '23 03:07 Tourbillon

Did you launch the model using the Gradio demo setup script?

donglixp avatar Jul 01 '23 03:07 donglixp

yes, I used the Gradio to launch the model. I email the result to your Gmail.

Tourbillon avatar Jul 01 '23 03:07 Tourbillon

yes, I used the Gradio to launch the model. I email the result to your Gmail.

@Tourbillon Thank you for providing the feedback. We are working on reproducing the results.

donglixp avatar Jul 01 '23 03:07 donglixp

Hello, could you please tell me the versions of torch and torchvison? My code seems to have reported an error due to version issues @jiang-hai-qi We used torch 1.13.

alias=whoami | cut -d'.' -f2; docker run -it --rm --runtime=nvidia --ipc=host --privileged -v /home/${alias}:/home/${alias} nvcr.io/nvidia/pytorch:22.10-py3 bash

donglixp avatar Jul 01 '23 03:07 donglixp

thank you.

hai-qi avatar Jul 01 '23 03:07 hai-qi

@donglixp @qihai-j Because of some limits, we can not use cuda11.8, so i did not use the docker. fairseq I used 0.12.0 the apex i used the brach 'f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0' the torch version is 1.13.1 the cuda version is 11.6

Tourbillon avatar Jul 01 '23 03:07 Tourbillon

thank you very much

hai-qi avatar Jul 01 '23 03:07 hai-qi

@Tourbillon Hi, I check it but can not reproduce the results you mentiond:

The caption results is wrong and without any logic

The commands are:

alias=`whoami | cut -d'.' -f2`; docker run -it --rm --runtime=nvidia --ipc=host --privileged -v /home/${alias}:/home/${alias} nvcr.io/nvidia/pytorch:22.10-py3 bash

wget -O /tmp/kosmos-2.pt "https://conversationhub.blob.core.windows.net/beit-share-public/kosmos-2/kosmos-2.pt?sv=2021-10-04&st=2023-06-08T11%3A16%3A02Z&se=2033-06-09T11%3A16%3A00Z&sr=c&sp=r&sig=N4pfCVmSeq4L4tS8QbrFVsX6f6q844eft8xSuXdxU48%3D"

git clone https://github.com/microsoft/unilm.git
cd unilm/kosmos-2

bash vl_setup_xl.sh
pip install gradio

# replace the model path in run_gradio.sh with /tmp/kosmos-2.pt
bash run_gradio.sh

After launching the local demo, I can obtain the same results (not enabling the sampling) as the online demo, for the examples in the demo.

pengzhiliang avatar Jul 01 '23 05:07 pengzhiliang

More details about default packages or env settings can be found in here

pengzhiliang avatar Jul 01 '23 05:07 pengzhiliang

@donglixp @pengzhiliang @pengzhiliang @donglixp Thanks for your reply! I sovled the problem by using the fairseq in this project. I used fairseq==0.12.0 fro source code and got the wrong results.

Tourbillon avatar Jul 01 '23 06:07 Tourbillon

@donglixp @pengzhiliang The paper mentioned that you use the spaCy to get noun chunks and referring expression. Will the processing code be released?

Tourbillon avatar Jul 05 '23 08:07 Tourbillon