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

Are benchmarks fair? #618

Closed
SaeedNajafi opened this issue Nov 11, 2024 · 0 comments
Closed

Are benchmarks fair? #618

SaeedNajafi opened this issue Nov 11, 2024 · 0 comments

Comments

@SaeedNajafi
Copy link

SaeedNajafi commented Nov 11, 2024

It seems that your codebase has a separate implementation for Multi-head attention (MHA module) along with a separate implementation for kv caching and even the generation function is different than HF's generation.

While you are loading HF's models, you are relying on HF implementations. Could this introduce discrepancies in benchmarks?
Is it possible to build a transformer model using only your codebase relying on the local implementation of kv cache and MHA implementations?

model = AutoModelForCausalLM.from_pretrained(args.model_name, device_map={"": device}, torch_dtype=dtype)

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

No branches or pull requests

1 participant