You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: