Skip to content

GPU usage missing in inference.  #2

Description

@Bernardo1998

The pipeline/end_to_end/evaluate.py defines model by model = GPT2.load_model(), but did not move model to GPU, thus the inference is slow. Consider adding these steps to load_model(): 1, check is GPU available in current machine; 2, if yes, move model to GPU before returning. See example: https://stackoverflow.com/questions/77237818/how-to-load-a-huggingface-pretrained-transformer-model-directly-to-gpu

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions