openvinotoolkit / openvino.genai

Run Generative AI models using native OpenVINO C++ API
Apache License 2.0
115 stars 152 forks source link

[Good First Issue]: Project won't run because it can't load openvino_tokenizers.dll - even though it exists! #407

Closed turbobuilt closed 5 months ago

turbobuilt commented 5 months ago

Context

I downloaded and compiled on Windows. Probably made a stupid mistake, and that's why it won't work. But I'm trying to get this project done so I can join the Intel Partner Alliance! But, I can't get this project to run because of a weird error preventing loading of the DLL even though it exists at the exact location - I ctrl clicked it and it opened up so it's there. But it just won't load right. Can you tell if there's anything in particular that would cause the dll to be unable to load?

This is using OpenVino 2024.0.0 with this model "acen20/Mistral-7B-Instruct-v0.2-openvino-int4".

Error output:

(base) PS C:\Users\hdtru\prg\openvino.genai\text_generation\causal_lm\cpp> .\build\Release\beam_search_causal_lm.exe " C:\Users\hdtru\.cache\huggingface\hub\models--acen20--Mistral-7B-Instruct-v0.2-openvino-int4\snapshots\0a94c646b59e31dc1c52024c1469a5087edf704c\openvino_model.xml" "What is your name?"
Exception from src\inference\src\cpp\core.cpp:163:
Cannot add extension. Cannot find entry point to the extension library. This error happened: Cannot load library 'C:\Users\hdtru\prg\openvino.genai\text_generation\causal_lm\cpp\build\openvino_tokenizers\src\Release\openvino_tokenizers.dll': 127 from cwd: C:\Users\hdtru\prg\openvino.genai\text_generation\causal_lm\cpp

What needs to be done?

Fix it so dll loads correctly... not sure what else to say!

Example Pull Requests

No response

Resources

none

Contact points

not sure

Ticket

No response

Wovchena commented 5 months ago

Can you specify https://github.com/openvinotoolkit/openvino.genai/ commit?

Wovchena commented 5 months ago

In addition to the previous question, does TinyLlama-1.1B-Chat-v1.0 work as described in the README.md?

turbobuilt commented 5 months ago

I did not try it, but 5a3fa158

https://github.com/openvinotoolkit/openvino.genai/tree/5a3fa1582cecaee352a680d2505a3f1967a53dd1

I am a noob at c++, I did it a bit when I was a kid, but never used DLLs. I did not try tinyllama, but intuitively, I think this failure must occur before model loading because honestly, I tried it without even specifying the model and the error occurred. I don't know if there's something wrong with the repo, or how I built it, but I figured I would ask, as it's such a weird error since the file is there.

Wovchena commented 5 months ago

Please try TinyLlama-1.1B-Chat-v1.0. That will show if the problem is about how you built the application or the model.

turbobuilt commented 5 months ago

Hm, I cloned again and rebuilt with openvino 2023.x.x and it worked. I think there may have been something wrong with my openvino 2024, cause some directorys (the tools, i remember) were missing.

luke-lin-vmc commented 1 month ago

Just for your reference, "openvino_tokenizers.dll" requires "openvino_tensorflow_frontend.dll" to work.