-
Notifications
You must be signed in to change notification settings - Fork 213
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
Add py bindings for encrypted models and sample #1751
base: master
Are you sure you want to change the base?
Conversation
3f0d612
to
9099013
Compare
parser.add_argument('prompt') | ||
args = parser.parse_args() | ||
|
||
model, weights = read_model(args.model_dir, 'openvino_model.xml', 'openvino_model.bin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model, weights = read_model(args.model_dir, 'openvino_model.xml', 'openvino_model.bin') | |
model, weights = decrypt_model(args.model_dir, 'openvino_model.xml', 'openvino_model.bin') |
as we need to "emulate" that we perform encryption
the same for tokenizer model
@@ -774,6 +774,7 @@ jobs: | |||
run: | | |||
source ./ov/setupvars.sh | |||
timeout 30s ./build/samples/cpp/text_generation/encrypted_model_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ "Why is the sun yellow?" | |||
timeout 30s python ./samples/python/text_generation/encrypted_model_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ "Why is the sun yellow?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that the outputs are the same. I think it's best to use tee
so we see the full output and diff
after that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<<< $'Describe the images?' | tee py.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample tests moved to pytest in #1661. Please, do the same
No description provided.