Skip to content

Make _prepare_input_fn and _prepare_output_fn instance methods#44499

Merged
3outeille merged 2 commits intohuggingface:mainfrom
michaelbenayoun:nit_tensor_parallel_layer_staticmethod_api
Mar 9, 2026
Merged

Make _prepare_input_fn and _prepare_output_fn instance methods#44499
3outeille merged 2 commits intohuggingface:mainfrom
michaelbenayoun:nit_tensor_parallel_layer_staticmethod_api

Conversation

@michaelbenayoun
Copy link
Member

What does this PR do?

This PR is just a small cleanup.
The TensorParallelLayer class defines _prepare_input_fn and _prepare_output_fn as static methods.
But then these methods end-up being instance or static methods in the sub classes. This PR defines them as instance method all the time to make the API cleaner.

@3outeille 3outeille enabled auto-merge (squash) March 9, 2026 14:17
@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.

@3outeille 3outeille merged commit 86eafab into huggingface:main Mar 9, 2026
28 checks passed
@michaelbenayoun michaelbenayoun deleted the nit_tensor_parallel_layer_staticmethod_api branch March 10, 2026 13:53
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