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

ipex 2.3 released #725

Merged
merged 50 commits into from
Jun 6, 2024
Merged

ipex 2.3 released #725

merged 50 commits into from
Jun 6, 2024

Conversation

jiqing-feng
Copy link
Collaborator

Hi @echarlaix . I make some changes to the llama model since the ipex 2.3 is released. The API name has changed, and the assisted decoding cannot support for now.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

tests/ipex/test_modeling.py Outdated Show resolved Hide resolved
tests/ipex/test_modeling.py Outdated Show resolved Hide resolved
tests/ipex/test_modeling.py Outdated Show resolved Hide resolved
@jiqing-feng
Copy link
Collaborator Author

jiqing-feng commented May 30, 2024

Hi @echarlaix . Thanks for your review. The core optimization for the llama2 model is the IAKV, which will change the shape of kv-cache, so functions in assisted decoding like crop_past_key_values cannot be used. We can skip the assisted decoding tests for now and try to enable it in the future.

@@ -259,16 +257,13 @@ def test_ipex_patching_beam_search(self, test_name, model_arch, use_cache):
GenerationConfig(max_new_tokens=4, num_beams=4, do_sample=True),
GenerationConfig(max_new_tokens=4, num_beams=8, do_sample=True),
GenerationConfig(max_new_tokens=4, num_beams=32, do_sample=True),
GenerationConfig(max_new_tokens=4, do_sample=not use_cache, top_p=1.0, top_k=5, penalty_alpha=0.6),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IPEXModel is not supported _contrastive_search for now, we will try to enable it in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, could we then add a warning to state this is not supported (at least for transformers >= v4.39.0) and then upgrade it in the setup.py maybe ?

optimum/exporters/ipex/modeling_utils.py Show resolved Hide resolved
optimum/intel/ipex/modeling_base.py Outdated Show resolved Hide resolved
@@ -259,16 +257,13 @@ def test_ipex_patching_beam_search(self, test_name, model_arch, use_cache):
GenerationConfig(max_new_tokens=4, num_beams=4, do_sample=True),
GenerationConfig(max_new_tokens=4, num_beams=8, do_sample=True),
GenerationConfig(max_new_tokens=4, num_beams=32, do_sample=True),
GenerationConfig(max_new_tokens=4, do_sample=not use_cache, top_p=1.0, top_k=5, penalty_alpha=0.6),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, could we then add a warning to state this is not supported (at least for transformers >= v4.39.0) and then upgrade it in the setup.py maybe ?

tests/ipex/test_modeling.py Outdated Show resolved Hide resolved
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
@jiqing-feng
Copy link
Collaborator Author

Hi @echarlaix. Reply to it. I have set do_sample=False so you can compare the results between the ipex model and the original model.

@jiqing-feng
Copy link
Collaborator Author

jiqing-feng commented May 31, 2024

Reply to it. It is not related to the transformer version; it's the current limitation for IAKV. I added the warning to clarify that only greedy search and beam search are verified for the patched model. Please have a look, thx!

jiqing-feng and others added 3 commits June 4, 2024 14:13
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
@jiqing-feng
Copy link
Collaborator Author

Hi @echarlaix . I have finished all your required changes. Could you please take a look at the failed ipex CI? It is a weird import error.

@jiqing-feng
Copy link
Collaborator Author

Hi @echarlaix . I have finished all your required changes. Could you please take a look at the failed ipex CI? It is a weird import error.

Fixed!

optimum/intel/ipex/modeling_base.py Outdated Show resolved Hide resolved
optimum/intel/ipex/modeling_base.py Outdated Show resolved Hide resolved
.github/workflows/test_ipex.yml Outdated Show resolved Hide resolved
optimum/exporters/ipex/modeling_utils.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
optimum/intel/ipex/modeling_base.py Outdated Show resolved Hide resolved
optimum/intel/ipex/modeling_base.py Outdated Show resolved Hide resolved
@echarlaix echarlaix merged commit f06f504 into huggingface:main Jun 6, 2024
13 checks passed
@jiqing-feng jiqing-feng deleted the rename branch October 9, 2024 03:10
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