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

Can you do a benchmark on what happens when you load the basic HF model with bfloat16 ? #4

Open
mihaipora opened this issue Sep 13, 2023 · 0 comments

Comments

@mihaipora
Copy link

just change
AutoModelForCausalLM.from_pretrained(model_id)
to:
AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16)

In my experience this goes to 65-70 tokens per second, which is as fast as ctranslate2 with 8bit quantization.

ivanbaldo pushed a commit to ivanbaldo/llama-inference that referenced this issue Jan 17, 2024
…much memory in A10.

BTW float16 gives wrong results in the A10 but correct on the T4 (which also doesn't work unless specifying the float16 type explicitly).
Maybe related also to hamelsmu#4
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