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

add llama perf test case #555

Merged
merged 10 commits into from
May 15, 2024
Merged

add llama perf test case #555

merged 10 commits into from
May 15, 2024

Conversation

SharzyL
Copy link
Contributor

@SharzyL SharzyL commented May 3, 2024

  • [nix] use single-float abi compilerrt
  • [tests] fix t1.ld DDR map
  • [emurt] support uart/print, export header
  • [cases] add perf.llama

Comment on lines +8 to +16
checkpoint_bin = fetchurl {
url = "https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin";
sha256 = "sha256-zVkGRNljhnorbloRB/UfrWY8QdecFJ++y7sflfqB9Jo=";
};

tokenizer_bin = fetchurl {
url = "https://github.com/karpathy/llama2.c/raw/b3c4b6c3c4bbff42e5211293280307019368ccb5/tokenizer.bin";
sha256 = "sha256-UKUu+CLunoPeXOnQvgoCWnc9AZQ39Ytf+dyvsGPs42E=";
};
Copy link
Member

Choose a reason for hiding this comment

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

oh my

Comment on lines 10 to 12
#if defined _WIN32
#include "win.h"
#else
Copy link
Member

Choose a reason for hiding this comment

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

remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just following the upstream but totally ok to remove

https://github.com/karpathy/llama2.c/blob/master/run.c#L10-L12

ssize_t file_size; // size of the checkpoint file in bytes
} Transformer;

void malloc_run_state(RunState* s, Config* p) {
Copy link
Member

Choose a reason for hiding this comment

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

we may need to allocate them to specific memory(SRAM) range in the future.

@sequencer
Copy link
Member

nice!

@sequencer
Copy link
Member

please add documentation to run the test case.

@sequencer
Copy link
Member

RTL still has some bug running llama. Will be fixed in the following PRs

@sequencer
Copy link
Member

The llama still hang at spike side, in order to not block others commit, Let get this into master branch, and debug it later.

@sequencer sequencer merged commit f8c72c9 into master May 15, 2024
82 checks passed
@sequencer sequencer deleted the llama branch May 15, 2024 00:42
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.

2 participants