Add a compatibility method so callers expecting PreTrainedModel-like …#42342
Add a compatibility method so callers expecting PreTrainedModel-like …#42342sywangyi wants to merge 4 commits intohuggingface:mainfrom
Conversation
…API don't crash Signed-off-by: Wang, Yi <yi.a.wang@intel.com>
|
@ydshieh please help review |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: apertus, arcee, aria, bamba, bitnet, blt, chameleon, cohere, cohere2, csm, cwm, dbrx, deepseek_v2, deepseek_v3, dia, diffllama |
|
Hmmn, I don't think we want to add that method onto every RotaryEmbedding class! This seems like an issue with the compressed_tensors integration maybe, cc @MekkCyber if you have any idea? |
MekkCyber
left a comment
There was a problem hiding this comment.
Thanks for your PR @sywangyi ! However this will be fixed soon once we merge this PR : https://github.com/huggingface/transformers/pull/42289/files#diff-7f40070336f6d7b1ffe08e654cdf930080e3cbd4dbbcbee2996fabe4ffc1c2b3, it seems like a shorter solution
|
since https://github.com/huggingface/transformers/pull/42289/files#diff-7f40070336f6d7b1ffe08e654cdf930080e3cbd4dbbcbee2996fabe4ffc1c2b3 contains the fix, I will close this PR |
…API don't crash
pytest tests/quantization/compressed_tensors_integration/test_compressed_tensors.py::CompressedTensorsTest
FAILED tests/quantization/compressed_tensors_integration/test_compressed_tensors.py::CompressedTensorsTest::test_llama_8b_fp8 - AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'get_parameter_or_buffer'
FAILED tests/quantization/compressed_tensors_integration/test_compressed_tensors.py::CompressedTensorsTest::test_tinyllama_w4a16 - AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'get_parameter_or_buffer'
FAILED tests/quantization/compressed_tensors_integration/test_compressed_tensors.py::CompressedTensorsTest::test_tinyllama_w8a16 - AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'get_parameter_or_buffer'
FAILED tests/quantization/compressed_tensors_integration/test_compressed_tensors.py::CompressedTensorsTest::test_tinyllama_w8a8 - AttributeError: 'LlamaRotaryEmbedding' object has no attribute 'get_parameter_or_buffer'
call stack