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

Pass device in launch_concordia_challenge_evaluation.py #97

Open
depshad opened this issue Oct 7, 2024 · 2 comments
Open

Pass device in launch_concordia_challenge_evaluation.py #97

depshad opened this issue Oct 7, 2024 · 2 comments

Comments

@depshad
Copy link

depshad commented Oct 7, 2024

If we are using local model, we need to pass device to utilise the gpu for inference. However, in launch_concordia_challenge_evaluation.py

# Language Model setup
model = utils.language_model_setup(
    api_type=args.api_type,
    model_name=args.model_name,
    api_key=args.api_key,
    disable_language_model=args.disable_language_model,
)

So if we use cmd execution for the evaluation script, device is not passed which is present in utils.language_model_setup so in this case it defaults to 'cpu'.

@jzleibo
Copy link
Collaborator

jzleibo commented Oct 9, 2024

This is not really a blocking issue since I'm sure you can just manually edit the file to pass the device. So probably not super urgent here. Anyway though, in principle we might want to loft this device setting all the way out to become a command line argument, but I would worry a bit about adding model-specific complexity into the interface at that level. @jagapiou what do you think?

@jagapiou
Copy link
Member

jagapiou commented Oct 10, 2024

api_key is already model specific: some models don't support that argument. So I think it's OK to solve it the same way: have device default to None and only forward it if it's explicitly set (sent you a CL).

If we have a lot of model-specific settigns it might be better to have a --model_settings=device=gpu0,use_codestral=True type flag.

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

3 participants