Skip to content

fix the tiny llama conversion issue #7

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

Merged
merged 2 commits into from
May 18, 2024

Conversation

freedomtan
Copy link
Contributor

@freedomtan freedomtan commented May 18, 2024

Fix the issue #6 as suggested by @kaushiksiva07,

BUG=fixes #6

@freedomtan freedomtan requested a review from a team as a code owner May 18, 2024 02:32
@freedomtan
Copy link
Contributor Author

FYR. Actually, it's not a Tiny Llama specific issue. I converted Gemma 2B without running into problems. But what I run the C++ text generation example in https://github.com/google-ai-edge/ai-edge-torch/tree/main/ai_edge_torch/generative/examples/c%2B%2B

bazel run -c opt //ai_edge_torch/generative/examples/c++: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:"

I got meaning results. After applying this patch and regenerating the tflite, I got expected results.

haozha111
haozha111 previously approved these changes May 18, 2024
@advaitjain advaitjain enabled auto-merge May 18, 2024 04:53
@advaitjain
Copy link
Contributor

I pushed a commit updating the formatting. will re-approve and then the PR should be ready to go.

@advaitjain advaitjain added ci:run and removed ci:run labels May 18, 2024
@advaitjain advaitjain added ci:run and removed ci:run labels May 18, 2024
@advaitjain advaitjain added this pull request to the merge queue May 18, 2024
Merged via the queue into google-ai-edge:main with commit 19a168c May 18, 2024
11 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible key error in ModelLoader
3 participants