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

[llama] transpose global state #104

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

dan-garvey
Copy link
Member

Transposed the global state to allow continuous memory access while updating. Previously only the 0th idx of the 2nd dim was getting updated on initialization. Also update needs to be stored back to the global variable. Couple other minor bugfixes.

@dan-garvey dan-garvey force-pushed the stateless_llllllamamaaaaaa branch from 6fb9798 to 9450405 Compare October 26, 2023 16:08
examples/llama2_inference/stateless_llama.py Outdated Show resolved Hide resolved
examples/llama2_inference/stateless_llama.py Outdated Show resolved Hide resolved
@@ -399,39 +388,54 @@ def run_vmfb_comparison(args):
example_input_id = initial_input.input_ids
device_inputs = [ireert.asdevicearray(config.device, example_input_id)]

step0 = ModuleCompiled["get_seq_step"]()
print("step0 :"+str(step0))
step0 = ModuleCompiled["get_seq_step"]()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is unused, remove.

Transposed the global state to allow continuous memory
access while updating. Previously only the 0th idx of the 2nd dim
was getting updated on initialization. Also update needs to be
stored back to the global variable. Couple other minor bugfixes.
@dan-garvey dan-garvey force-pushed the stateless_llllllamamaaaaaa branch from 9450405 to 232a6f9 Compare October 31, 2023 18:00
@dan-garvey dan-garvey merged commit 0d69932 into main Oct 31, 2023
1 check passed
@dan-garvey dan-garvey deleted the stateless_llllllamamaaaaaa branch October 31, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants