Skip to content

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

@mihaipora

Description

@mihaipora

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions