Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Model zoo Demos gpt2

yi15
Beginner
375 Views

When I execute gpt2 demo, This error occures. Path's information is correct. Could you identify the issue?

 

gpt2_demo.sh: 3: source: not found
usage: gpt2_text_prediction_demo.py [-h] -m MODEL -v VOCAB --merges MERGES [-i INPUT] [--max_sample_token_num MAX_SAMPLE_TOKEN_NUM] [--top_k TOP_K] [--top_p TOP_P] [-d DEVICE] [--dynamic_shape]
[--max_seq_len MAX_SEQ_LEN]
gpt2_text_prediction_demo.py: error: the following arguments are required: -m/--model, -v/--vocab, --merges
gpt2_demo.sh: 6: --model=/home/open_model_zoo/demos/gpt2_text_prediction_demo/python/public/gpt-2/FP16/gpt-2.xml: not found
gpt2_demo.sh: 7: --vocab=/home/open_model_zoo/models/public/gpt-2/public/gpt-2/gpt2/vocab.json: not found
gpt2_demo.sh: 8: --merges=/home/open_model_zoo/models/public/gpt-2/public/gpt-2/gpt2/merges.txt: not found

 

Regards

0 Kudos
2 Replies
Peh_Intel
Moderator
338 Views

Hi yimai8,

 

I was able to run GPT-2 Text Prediction Python Demo on my side.     

gpt2_demo.png

 

I used the latest OpenVINO™ version and pulled the master branch of Open Model Zoo GitHub repository.

 

pip install openvino-dev[pytorch,onnx]

git clone https://github.com/openvinotoolkit/open_model_zoo.git

 

Download gpt-2 model:

omz_downloader --name gpt-2

omz_converter --name gpt-2

 

Command used to run the demo:

python3 gpt2_text_prediction_demo.py --model=<path_to_model>/gpt-2.xml --vocab=<models_dir>/models/public/gpt-2/gpt2/vocab.json --merges=<models_dir>/models/public/gpt-2/gpt2/merges.txt

 

 

Regards,

Peh

 

0 Kudos
Peh_Intel
Moderator
269 Views

Hi yimai8,


This thread will no longer be monitored since we have provided answer. If you need any additional information from Intel, please submit a new question. 



Regards,

Peh


0 Kudos
Reply