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

[perf] improve next token latency when (#threads >= 2 * #heads) by sharding the head into multiple splits #70

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

pujiang2018
Copy link
Contributor

Command: XFT_FAKE_MODEL=1 OMP_NUM_THREADS=32 mpirun -n 1 numactl -N 0 -m 0 ./build/example -m examples/model_config/llama-2-7b/ -t examples/model_config/llama-2-7b/tokenizer.model -d fp16 -l 1024 --output_len 10 --loop 10 : -n 1 numactl -N 1 -m 1 ./build/example -m examples/model_config/llama-2-7b/ -t examples/model_config/llama-2-7b/tokenizer.model -d fp16 -l 1024 --output_len 10 --loop 10
Server: a develop machine (perf may be not good)
Perf: ~40->~39ms

@changqi1 changqi1 merged commit 7430fe5 into main Nov 24, 2023
1 check passed
@pujiang2018 pujiang2018 deleted the pujiang/perf/attn branch January 8, 2024 05:11
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