fix failure of llava/pixtral#42985
Conversation
Signed-off-by: Wang, Yi <yi.a.wang@intel.com>
output "DescribeĠtheĠimages", expected output "Describe the images"(in transformers 4.57.3) |
|
also, fix the failure in llava test |
|
Mistral3ProcessorTest case fail because the tokenizer fix. |
|
seems the pre_tokenizer should be loaded from tokenizer.json, but in v5.0.0, it does not do it. |
|
Normally #42894 should fix tokenization issues on main and on the next release candidate. Might need some time with the holiday season now, apologies.There are a few different changes on your PR, can you put what fails in the PR description and ensure your PR fixes minimally? Thanks! |
Hi, I tried #42894, but it does not fix the "hf-internal-testing/Mistral-Small-3.1-24B-Instruct-2503-only-processor" and "mistral-community/pixtral-12b" issue, The issue is that nearly all cases of pytest tests/models/llava/test_modeling_llava.py::LlavaForConditionalGenerationIntegrationTest fail, because of tokenizer issue and case issue, and I fix them. |
…sor tokenizer Signed-off-by: Wang, Yi <yi.a.wang@intel.com>
|
@molbap I update the PR to fix all the issue I mentioned in the PR including llava test, tokenizer issue of mistral-community/pixtral-12b and hf-internal-testing/Mistral-Small-3.1-24B-Instruct-2503-only-processor |
|
@molbap , could you pls help take a second look? Thx very much. |
|
Hello, thanks for the investigation. However it seems that on the mistral example #42894 indeed fixes it. from transformers import LlavaForConditionalGeneration, AutoProcessor
model_id = "mistral-community/pixtral-12b"
processor = AutoProcessor.from_pretrained(model_id)
text = "Describe the images"
inputs = processor.tokenizer(text)
print(f"Input text: '{text}'")
print(f"Token IDs: {inputs['input_ids']}")
decoded_text = processor.tokenizer.decode(inputs["input_ids"])
print(f"Decoded text: '{decoded_text}'")does return If the other tests are not fixed feel free to update the PR! |
|
Hey! We just merged #42894 which fixes this issue! If you have any cases that aren't resolved by this please feel free to share here :) |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: llava |
here, after updating to the latest main. the tokenizer issue I mentioned before has been resolved, but new issue pop up. tests/models/llava/test_modeling_llava.py::LlavaForConditionalGenerationIntegrationTest::test_tokenizer_integration - AssertionError: Lists differ: ['<|im_start|>', 'sy', 'st', 'em', '\n', 'An', 'sw', 'er', ' [245 chars]'\n'] != ['<|im_start|>', 'system',... this case failure. |
|
for case fix, like dtype and device mismatch issue, fix it in case @ydshieh, please help review. |
ArthurZucker
left a comment
There was a problem hiding this comment.
We indeed defaulted to auto dtype now!
|
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. |
|
run-slow: llava |
|
This comment contains models: ["models/llava"] |
CI Results✅ No failing test specific to this PR 🎉 ! |
* fix failure of llava/pixtral Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * also fix the issue of Mistral-Small-3.1-24B-Instruct-2503-only-processor tokenizer Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * update Signed-off-by: Wang, Yi A <yi.a.wang@intel.com> * update Signed-off-by: Wang, Yi <yi.a.wang@intel.com> --------- Signed-off-by: Wang, Yi <yi.a.wang@intel.com> Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
What does this PR do?