Skip to content

How to use device_map="auto" option #142

@bongjunj

Description

@bongjunj

Hi,

I usually run a model with device_map="auto" option to utilize all the cards I have.

output = model.generate(
    inputs,
    max_length=100,
    num_return_sequences=1,
    device_map="auto",
    attention_mask=torch.ones_like(inputs),
    pad_token_id=tokenizer.eos_token_id,
)

But it seems like using llm = Syncode(...); llm.infer(...) API, there is no direct way to turn the option on.
Is there any way to do so in the current setting?

Thank you

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions