Skip to content

Fix gpt_bigcode input generator for transformers 4.54#2336

Merged
IlyasMoutawwakil merged 4 commits intomainfrom
bigcode
Oct 7, 2025
Merged

Fix gpt_bigcode input generator for transformers 4.54#2336
IlyasMoutawwakil merged 4 commits intomainfrom
bigcode

Conversation

@echarlaix
Copy link
Copy Markdown
Collaborator

@echarlaix echarlaix commented Aug 8, 2025

Following huggingface/transformers#38635 so starting transformers v4.54 the pkv from gpt_bigcode will have size : [batch_size, kv_heads, seq_length, head_dim], adapting GPTBigCodeDummyPastKeyValuesGenerator to match this modification

Comment thread optimum/utils/input_generators.py Outdated
self.random_float_tensor(shape, framework=framework, dtype=float_dtype),
self.random_float_tensor(shape, framework=framework, dtype=float_dtype),
)
for _ in range(self.num_layers)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

resulting from bigcode modeling modifications from https://github.com/huggingface/transformers/pull/38635/files

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member

@IlyasMoutawwakil IlyasMoutawwakil left a comment

Choose a reason for hiding this comment

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

LGTM ! thanks for the fix !

@IlyasMoutawwakil IlyasMoutawwakil merged commit f1f6ae4 into main Oct 7, 2025
19 checks passed
@IlyasMoutawwakil IlyasMoutawwakil deleted the bigcode branch October 7, 2025 12:07
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