-
Notifications
You must be signed in to change notification settings - Fork 52
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
data_ptr_value % kDefaultTensorAlignment == 0 was not true. #237
Comments
Hi @nigelzzzzzzz what version of the code did you use to produce the tflite_model, and what version of the code did you use when doing the actual command? |
Hi @pkgoogle, my command like bazel run -c opt //ai_edge_torch/generative/examples/cpp:text_generator_main -- --tflite_model=PATH/gemma_it.tflite --sentencepiece_model=PATH/tokenizer.model --start_token="<bos>" --stop_token="<eos>" --num_threads=16 --prompt="Write an email:" --weight_cache_path=PATH/gemma.xnnpack_cache
|
@nigelzzzzzzz can you please help me to convert the tiny lamma model to tflite I have tried with several nightly builds but not able to convert to tflite can you please tell me which nightly build u use, and in the convert_to_tflite.py file only file name needs change right? |
@pkgoogle , shouldn't we change the start_token and stop_token as below for tiny_llama? |
hi @akshatshah17,
|
I was able to replicate with main branch and similar but slightly different steps: bazel build -c opt //ai_edge_torch/generative/examples/cpp:text_generator_main
cd bazel-bin/ai_edge_torch/generative/examples/cpp
# copy converted model and tokenizer model here
./text_generator_main --tflite_model=tinyllama_q8_seq1024_ekv1280.tflite --sentencepiece_model=tokenizer.model --start_token="<bos>" --stop_token="<eos>" --num_threads=16 --prompt="Write an email:" We'll take a deeper look. Thanks. |
Hi @pkgoogle,
|
Hi @nigelzzzzzzz, that alignment check is probably there for a reason -- but if you make a PR, we can review it. |
hi @pkgoogle, thanks you again. |
I also faced this issue when running for x86. But not with android_arm64. |
Description of the bug:
Hi @pkgoogle ,
i used example c++ code to inference model i transfer, it can show some error.
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: