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

Update neuron backend #2314

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Update neuron backend #2314

merged 5 commits into from
Sep 18, 2024

Conversation

dacorvo
Copy link
Contributor

@dacorvo dacorvo commented Sep 17, 2024

This modifies the CustomNeuronModelForCausalLM class to align on the latest optimum-neuron version and better use the underlying NeuronModelForCausalLM class. This in particular lets NeuronModelForCausalLM decide the default values when exporting.

In addition, this fixes the evaluation of loglikelihood for neuron models using continuous batching.

This also modifies the class initialization to allow evaluating models that have been previously exported.

Finally, this properly supports the max_length parameter, allowing to select neuron model configurations that are actually cached on the Hugging Face hub.

@CLAassistant
Copy link

CLAassistant commented Sep 17, 2024

CLA assistant check
All committers have signed the CLA.

@baberabb
Copy link
Contributor

Hi! Thank you very much for the PR. Could you sign the CLA and run the pre-commit so it can be merged.

The evaluation of log likelihood was not working for neuron models
using continuous batching, such as all cached neuron LLama models.
@dacorvo
Copy link
Contributor Author

dacorvo commented Sep 18, 2024

@baberabb it should be ok now.

@baberabb baberabb enabled auto-merge (squash) September 18, 2024 20:15
@baberabb baberabb merged commit 9a092f3 into EleutherAI:main Sep 18, 2024
8 checks passed
@baberabb
Copy link
Contributor

Thanks for the PR!

jmercat pushed a commit to TRI-ML/lm-evaluation-harness that referenced this pull request Sep 25, 2024
* feat(neuron): align with latest optimum-neuron

* feat(neuron): support pre-exported neuron models

* fix(neuron): correctly use max_length

* fix(neuron): adapt loglikelihood

The evaluation of log likelihood was not working for neuron models
using continuous batching, such as all cached neuron LLama models.

* refactor(neuron): remove dead code
giuliolovisotto pushed a commit to giuliolovisotto/lm-evaluation-harness that referenced this pull request Sep 27, 2024
* feat(neuron): align with latest optimum-neuron

* feat(neuron): support pre-exported neuron models

* fix(neuron): correctly use max_length

* fix(neuron): adapt loglikelihood

The evaluation of log likelihood was not working for neuron models
using continuous batching, such as all cached neuron LLama models.

* refactor(neuron): remove dead code
shachardon pushed a commit to shachardon/lm-evaluation-harness that referenced this pull request Oct 1, 2024
* feat(neuron): align with latest optimum-neuron

* feat(neuron): support pre-exported neuron models

* fix(neuron): correctly use max_length

* fix(neuron): adapt loglikelihood

The evaluation of log likelihood was not working for neuron models
using continuous batching, such as all cached neuron LLama models.

* refactor(neuron): remove dead code
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

Successfully merging this pull request may close these issues.

3 participants