noamaanMulla-03/transformers-issues huggingface dataset:
Maybe the vocab_size can be duplicated to the mainconfig for PEFT to pick up
Author: lancercat
Pull request: no

https://github.com/huggingface/transformers/blob/06c16de3d3971e125232c2682ec99d282bb1a27d/src/transformers/models/gemma3/configuration_gemma3.py#L322

```
        self.vocab_size=self.text_config.vocab_size;
```
Due to the following check in peft

https://github.com/huggingface/peft/blob/6c489499300c652a4990cfbcc18539417e73c262/src/peft/utils/save_and_load.py#L249

Comments:
cc @BenjaminBossan , i think we should check for `config.get_text_config()`

Sorry for the late reply, I was out of office. I think I'm missing some context here, I assume you encountered an issue caused by the missing attribute @lancercat?

Yes. class PeftModel in peft needs this attribute in     
 _setup_prompt_encoder(self, adapter_name: str).
But i think the have just fixed/hacked it in peft...
https://github.com/huggingface/peft/blob/6d133307adf28e11d061c20aa1f040c1d26d2012/src/peft/peft_model.py#L609

Ah thanks, so with this recent change, the original issue is addressed, right?

@zucchini-nlp would it be better to use `self.base_model.config.get_text_config()` instead of

```python
                if "text_config" in self.base_model.config:
                    vocab_size = self.base_model.config.text_config.vocab_size
                else:
                    vocab_size = self.base_model.config.vocab_size
```

https://github.com/huggingface/peft/blob/6d133307adf28e11d061c20aa1f040c1d26d2012/src/peft/peft_model.py#L609-L612?

Would this also work with older transformers versions?

> would it be better to use self.base_model.config.get_text_config() instead of

yes, that would be more general and extra text config under different names. It was added on v4.45.0 it might not work for older versions, not sure since when PEFT has support for that

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
Shape Error in Llama4VisionMLP2
Author: priyammaz
Pull request: no
Labels: name: bug

### System Info

https://github.com/huggingface/transformers/blob/d1b92369ca193da49f9f7ecd01b08ece45c2c9aa/src/transformers/models/llama4/modeling_llama4.py#L1096

Im pretty sure this should be:

```python
self.fc2 = nn.Linear(config.projector_input_dim, config.projector_output_dim, bias=False)
```

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Nothing to reproduce, I just noticed a shape mistake, but i havent had a chance to run it personally yet!

### Expected behavior

The output of fc1 should be the input of fc2, unless there is some hidden logic that I am missing

Comments:
I now see the input and output are the same in the config, but still this can be a bug if someone changed that!

cc @arthurzucker but this looks like a bug, yes!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

gentle ping @arthurzucker - I'm pretty sure this is wrong and only works because the config variables have the same value, but I wanted to check in case the fix would break anything else!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

@priyammaz Sorry for the delay, but I think you can go ahead and make a PR for this! It seems like an obvious bug to me

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
Update SuperPoint model card
Author: sbucaille
Pull request: yes

# What does this PR do?

Updates SuperPoint model card for #36979 

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

## Who can review?

@stevhliu


Comments:
@stevhliu Still a first draft, how is it possible to see the formatted result ? 

> how is it possible to see the formatted result ?

I can run the `build_pr_documentation` job to generate a preview

@stevhliu addressed your comments, although I kept the line
```
- Check the [Keypoint detection task guide](../tasks/keypoint_detection) on how to use the model.
```
since the task exist I think it should be referred to somewhere even if there is no pipeline no ?

> since the task exist I think it should be referred to somewhere even if there is no pipeline no ?

I don't think the task guide adds any additional information that your model card doesn't already include so it seems a bit redundant to link to that guide.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_38896). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@stevhliu indeed, I removed it
[LightGlue] Fixed attribute usage from descriptor_dim to keypoint_detector_descriptor_dim
Author: sbucaille
Pull request: yes

# What does this PR do?

Noticed that the first reshapes use the `descriptor_dim` attribute but at this stage, the keypoint descriptors are not fed through the `input_projection` layer, so the keypoint descriptors at this stage have a dimension provided by the keypoint detector, and not the dimension of the descriptors used in LightGlue

Here :
https://github.com/huggingface/transformers/blob/48b6ef02380f993a6e8dfa0c355f722c2b7b96ed/src/transformers/models/lightglue/modeling_lightglue.py#L895

and here :
https://github.com/huggingface/transformers/blob/48b6ef02380f993a6e8dfa0c355f722c2b7b96ed/src/transformers/models/lightglue/modeling_lightglue.py#L724

Both should be `self.keypoint_detector_config.descriptor_dim` instead of `self.detector_dim`

As discussed offline, this is problematic for using it with another keypoint detector such as DISK, which uses different descriptor dimension, but it's not problematic when using SuperPoint, that's why I didn't notice it until now.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@qubvel @Cyrilvallez 


Comments:
run-slow: lightglue

This comment contains run-slow, running the specified jobs: 

models: ['models/lightglue']
quantizations: [] ...

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39021). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
fix: fixed wrong concatenation which made batching results wrong
Author: sbucaille
Pull request: yes
Labels: name: bug

name: Vision

# What does this PR do?

Fixes #38348


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@qubvel

Comments:
@qubvel gentle bump

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_38850). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Fixed modeling_auto.py MODEL_FOR_MASK_GENERATION_MAPPING_NAMES variable
Author: sbucaille
Pull request: yes

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes https://github.com/huggingface/transformers/issues/38663# (issue)


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Rocketknight1 @amyeroberts @qubvel 


Comments:
I spotted this one already at #38614, but I can't approve my own PRs so I'll merge this one instead :sweat_smile: 

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_38664). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
[video processors] Support float fps for precise frame sampling
Author: zrohyun
Pull request: yes

Enable fractional fps values (e.g., 1.5, 29.97) in video processors for more precise frame sampling control.

- Change fps type from int to float across all video processors
- Maintain backward compatibility with integer values

Extends: #38105

# What does this PR do?

This PR extends the video frame sampling functionality introduced in #38105 to support float fps values, enabling more precise control over video frame sampling rates.

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?
@zucchini-nlp 

Comments:
I never added or modified these .md files—why are they showing up?
I don't know how to revert that change.

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: instructblipvideo, internvl, qwen2_5_omni, qwen2_vl, smolvlm

@zucchini-nlp 
i reverted first commit. The md file changes are no longer there now

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39134). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Pickle error when downloading DeepSeek model
Author: andrewsykim
Pull request: no
Labels: name: bug

### System Info

I'm consistently running into this pickle error when trying to run DeepSeek R1 models (both R1 and R1-0528):
```
Can't pickle <class 'transformers_modules.deepseek-ai.DeepSeek-R1-0528.4236a6af538feda4548eca9ab308586007567f52.configuration_deepseek.DeepseekV3Config'>:
it's not the same object as transformers_modules.deepseek-ai.DeepSeek-R1-0528.4236a6af538feda4548eca9ab308586007567f52.configuration_deepseek.DeepseekV3Config"
```

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Deploy DeepSeek R1 using vLLM

### Expected behavior

No pickle error

Comments:
I suspect something changed between the uploaded `configuration_deepseek.py` file on hugging face and the one in the repo. 

Hi @andrewsykim, can you give us some code that reproduces the issue?

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
Expectations re-order and corrected FA3 skip
Author: remi-or
Pull request: yes

This PR changes the order of priority of `Expectations` to prefer the default expectation over the cross-device match as discussed with @ydshieh . It also changes the decorator of a FA3 test from `require_flash_attn` to `require_flash_attn_3`

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_39195). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Feel free to merge 🤗 

Good ideas! Did both. Will merge after tests pass.
disable_grouping parameter missed in image_processing_glm4v_fast.py
Author: r0mar0ma
Pull request: no
Labels: name: bug

### System Info

transformers 4.53.1




### Who can help?

@amyeroberts, @qubvel

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

AutoProcessor.from_pretrained(path, **use_fast = True**)

in models/glm4v/image_processing_glm4v_fast.py

```
        # Group images by size for batched resizing
        grouped_images, grouped_images_index = group_images_by_shape(images)
```

while group_images_by_shape has required positional argument 'disable_grouping'

```
def group_images_by_shape(
    images: Union[list["torch.Tensor"], "torch.Tensor"],
    disable_grouping: bool,
    is_nested: bool = False,
) -> tuple[

```

### Expected behavior

disable_grouping parameter should be added

Comments:
@r0mar0ma it was fixed on latest `main` branch 😄 Not sure why it didn't make to the patch release though, you can install from source with `!pip install --upgrade git+https://github.com/huggingface/transformers.git` to get the working version
uniformize kwargs for OneFormer
Author: tibor-reiss
Pull request: yes
Labels: name: Vision

name: Multimodal

name: Processing

Adds uniformized processors for OneFormer following #31911.

Small changes to simplify code.

Additional check via `test_processor_oneformer.py` that the `inputs` are the same before and after the changes (with fixed random seeds).

@qubvel @molbap


Comments:
Hey! @molbap is off as he needs to rest, cc @yonigozlan can you review this? 🤗 


@yonigozlan I had to repeat some of the tests, e.g. `test_structured_kwargs_nested`, due to the mandatory `task_inputs`. It was either this, or making a default for `task_inputs`, e.g. 'semantic'. I went with the former, because it might be surprising for the users that the 'semantic' is picked as default - currently it raises a `ValueError` if not specified.

> @yonigozlan I had to repeat some of the tests, e.g. test_structured_kwargs_nested, due to the mandatory task_inputs. It was either this, or making a default for task_inputs, e.g. 'semantic'. I went with the former, because it might be surprising for the users that the 'semantic' is picked as default - currently it raises a ValueError if not specified.

Yes I think that's the best way to do it :)

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_34547). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Hi @ArthurZucker,

> Thanks, not sure I get why encode inputs does not pass kwargs, while call does !
I don't understand this comment. `encode_inputs` has `kwargs`, and is passed e.g. here: `encoded_inputs = self.image_processor.encode_inputs(images, task_inputs, segmentation_maps, **kwargs)`. Could you please clarify?

Regarding `_preprocess_text` and `text_kwargs`: I rewrote it a little bit differently, let me know if it's more readable. The difficulty comes from several things, namely:
- `encode_inputs` is similar, but not the same as `__call__`, see also https://github.com/huggingface/transformers/pull/34547#discussion_r1863049927
- `max_length` can overwrite `self.max_seq_length` and `self.task_seq_length`
- backwards compatibility
I think once we remove `encode_inputs`, the whole code gets simpler and can be again refactored.


Rebased

Hey @tibor-reiss, please run `make modified_only_fixup` to fix style issues and make CI green, thank you!

run-slow: oneformer

This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs:

models: ['models/oneformer']
quantizations: [] ...
Fix typo in Gemma3ForCausalLM doctest
Author: shashist
Pull request: yes

# What does this PR do?


Update model_id used in `Gemma3ForCausalLM` doctest from `gemma-2-9b` to `gemma-3-4b-pt`.


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@stevhliu @ArthurZucker


Comments:
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the `Ready for review` button (at the bottom of the PR page). This will assign reviewers and trigger CI.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_37374). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
Adding a stub for MiniCPM-o to the models
Author: jecrs
Pull request: yes

# What does this PR do?

This PR is to add a stub for the MiniCPM-o model familly to the main huggingface/transformer/models library
This PR, as its mean as a stub, shall be improved by people who are familiarized with the huggingface and the MiniCPM-o,

# Why a Stub?

I'm not nearly qualified enough to do a full implementation of the MiniCPM-o to HF, and it's my first contrib to OSS, but, I do think stubs are valuable on which they can get the ball running about a certain model, and they can be a great starting point for first-time future contributors. After all, it's hella scary implementing a new model by yourself as a first-timer, but fixing or expanding an existing model or stub is more inviting (besides, improving a stub is a quick exercise if you don't want to tackle your trello)

Fixes #37029 


## Before submitting
- [*] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation). (will do it in a pr to the docs, will annex the pr here once it's submitted)

to be reviewed by @eustlb

Comments:
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the `Ready for review` button (at the bottom of the PR page). This will assign reviewers and trigger CI.

Yups we did not answer yet, but @eustlb will see to get this into transformers!

We have a PR already in progress in https://github.com/huggingface/transformers/pull/37917 🤗  

Its newer than mine PR... Tho it seems to be more complete.