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

Check microsoft Llama-2-Onnx repo #148

Open
gyulaz-htec opened this issue Nov 6, 2023 · 4 comments
Open

Check microsoft Llama-2-Onnx repo #148

gyulaz-htec opened this issue Nov 6, 2023 · 4 comments

Comments

@gyulaz-htec
Copy link

gyulaz-htec commented Nov 6, 2023

We got a request to check the https://github.com/microsoft/Llama-2-Onnx repository.
This requires a permission to access Llama 2 model, the details are descibed in the repo's readme.

There are two python examples which we should try with migraphx (more details about these in the repo's readme). In these examples we have to replace the onnx runtime with migraphx api calls.

@gyulaz-htec gyulaz-htec converted this from a draft issue Nov 6, 2023
@gyulaz-htec gyulaz-htec changed the title Check microsofts Llama-2-Onnx repo Check microsoft Llama-2-Onnx repo Nov 6, 2023
@attila-dusnoki-htec attila-dusnoki-htec moved this from 🔖 Ready to 🏗 In progress in MIGraphX ONNX support Nov 8, 2023
@attila-dusnoki-htec
Copy link

To test it with MIGraphX we can update these two apps:

@attila-dusnoki-htec
Copy link

Testing 7B_float32/ONNX/LlamaV2_7B_float32.onnx

Without and with input dims (@x 1 2048 4096 @k_cache 1 32 2048 32 128 @v_cache 1 32 2048 32 128 @pos 1 @attn_mask 1 2048 2048), it will run into
/code/AMDMIGraphX/src/onnx/parse_slice.cpp:155: construct_slice_desc: PARSE_SLICE: steps and variable starts and ends is not supported

@attila-dusnoki-htec
Copy link

attila-dusnoki-htec commented Nov 10, 2023

WIth the latest develop, the above issue is bypassed, because the steps were default (1).

Now it will stop at only_dims(1).

Inputs.size = 3
inputs[0]   = [1, 2048, 1, 64]
inputs[1]   = [1, 1]
inputs[2]   = [1, 1]
axes        = [1]

@attila-dusnoki-htec
Copy link

If we would skip that check. It would run into this fail:
/code/AMDMIGraphX/src/common.cpp:83: operator(): COMPUTE_BROADCASTED_DYN_DIMS: dynamic shapes {[ 1, 1, {} ], [ 0, 2048, {} ], [ 1, 1, {} ], [ 64, 64, {} ]} and {[ 1, 1, {} ], [ 2048, 2048, {} ], [ 32, 32, {} ], [ 64, 64, {} ]} mismatch!

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

No branches or pull requests

3 participants