Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f48a47b
remove attributes and add all missing sub processors to their auto cl…
yonigozlan Oct 15, 2025
d5d5c58
remove all mentions of .attributes
yonigozlan Oct 15, 2025
dd505b5
cleanup
yonigozlan Oct 15, 2025
6a1448f
fix processor tests
yonigozlan Oct 15, 2025
a292900
fix modular
yonigozlan Oct 15, 2025
63a255d
remove last attributes
yonigozlan Oct 16, 2025
ef73759
fixup
yonigozlan Oct 16, 2025
b5e8b2e
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 16, 2025
f14ff3c
fixes after merge
yonigozlan Oct 16, 2025
0306430
fix wrong tokenizer in auto florence2
yonigozlan Oct 16, 2025
01cb815
fix missing audio_processor + nits
yonigozlan Oct 17, 2025
49ec906
Override __init__ in NewProcessor and change hf-internal-testing-repo…
yonigozlan Oct 17, 2025
7dd5682
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 17, 2025
946cc5c
fix auto tokenizer test
yonigozlan Oct 17, 2025
b0cb3e0
add init to markup_lm
yonigozlan Oct 17, 2025
3b9e846
update CustomProcessor in custom_processing
yonigozlan Oct 17, 2025
53de7a4
remove print
yonigozlan Oct 17, 2025
93d2c4d
Merge branch 'main' into remove-attributes-from-processors
yonigozlan Oct 17, 2025
feeec28
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 22, 2025
4a6b080
nit
yonigozlan Oct 22, 2025
02402a0
Merge branch 'remove-attributes-from-processors' of https://github.co…
yonigozlan Oct 22, 2025
757e1f1
fix test modeling owlv2
yonigozlan Oct 22, 2025
bf763b2
fix test_processing_layoutxlm
yonigozlan Oct 22, 2025
0799a0a
Fix owlv2, wav2vec2, markuplm, voxtral issues
yonigozlan Oct 22, 2025
bf1a4b6
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Oct 31, 2025
e3f130d
add support for loading and saving multiple tokenizer natively
yonigozlan Oct 31, 2025
cc45a7e
remove exclude_attributes from save_pretrained
yonigozlan Oct 31, 2025
6b9e7c9
Run slow v2 (#41914)
ydshieh Nov 1, 2025
0ccb0e3
Fix `detectron2` installation in docker files (#41975)
ydshieh Nov 2, 2025
1eeece5
Fix `autoawq[kernels]` installation in quantization docker file (#41978)
ydshieh Nov 2, 2025
e4d0a09
add support for saving encoder only so any parakeet model can be load…
nithinraok Nov 2, 2025
09702b2
Use indices as position_ids in modernebert (#41789)
remi-or Nov 3, 2025
688a79c
test tensor parallel: make tests for dense model more robust (#41968)
3outeille Nov 3, 2025
e44838b
fix: dict[RopeParameters] to dict[str, RopeParameters] (#41963)
RyanMullins Nov 3, 2025
98287d9
docs: add continuous batching page (#41847)
McPatate Nov 3, 2025
85b0bd9
Fix `torchcodec` version in quantization docker file (#41988)
ydshieh Nov 3, 2025
e798fe4
[kernels] Add Tests & CI for kernels (#41765)
MekkCyber Nov 3, 2025
c7a631b
Move the Mi355 to regular docker (#41989)
remi-or Nov 3, 2025
55938f4
More data in benchmarking (#41848)
remi-or Nov 3, 2025
76fbe5a
fix (CI): Refactor SSH runners (#41991)
glegendre01 Nov 3, 2025
3b87190
fix 3 failed test cases for video_llama_3 model on Intel XPU (#41931)
kaixuanliu Nov 3, 2025
c33037b
Integrate colqwen2.5 using colqwen2 modelling code (#40600)
sahil-kabir Nov 3, 2025
de10840
Fixed wrong padding value in OWLv2 (#41938)
gjamesgoenawan Nov 3, 2025
f639ad6
Fix `run slow v2`: empty report when there is only one model (#42002)
ydshieh Nov 4, 2025
135543a
[kernels] change import time in KernelConfig (#42004)
MekkCyber Nov 4, 2025
adf6777
DOC Fix typo in argument name: pseudoquant (#41994)
BenjaminBossan Nov 4, 2025
f37903b
Fix `torch+deepspeed` docker file (#41985)
ydshieh Nov 4, 2025
6a5d5ce
Correct syntax error in trainer.md (#42001)
Yacklin Nov 4, 2025
1f8ae37
Reduce the number of benchmark in the CI (#42008)
remi-or Nov 4, 2025
9488b26
Fix continuous batching tests (#42012)
Rocketknight1 Nov 4, 2025
0a703ee
add back `logging_dir` (#42013)
SunMarc Nov 4, 2025
2f2a82c
Fix issue with from pretrained and kwargs in image processors (#41997)
yonigozlan Nov 4, 2025
0143c60
Fix default image_rows and image_cols initialization in Idefics3 and …
MilkClouds Nov 4, 2025
af380ff
Add GLPNImageProcessorFast (#41725)
Aravind-11 Nov 4, 2025
98c0528
add fuyu fast image processors (#41817)
DeXtAr47-oss Nov 4, 2025
8ec8436
[kernels] Fix XPU layernorm kernel (#41583)
MekkCyber Nov 4, 2025
a63b6da
[v5] Deprecate Text2Text and related pipelines (#41996)
Rocketknight1 Nov 4, 2025
a3f3937
[FPQuant] MXFP8 and MXFP4 backwards support (#41897)
BlackSamorez Nov 4, 2025
5b552a9
Merge remote-tracking branch 'upstream/main' into support-auto_doctri…
yonigozlan Nov 6, 2025
09d5527
add working auto_docstring for processors
yonigozlan Nov 6, 2025
b542e95
add auto_docstring to processors first part
yonigozlan Nov 7, 2025
552509c
add auto_docstring to processors part 2
yonigozlan Nov 7, 2025
8979645
modifs after review
yonigozlan Nov 7, 2025
6cc30f9
Merge remote-tracking branch 'upstream/main' into remove-attributes-f…
yonigozlan Nov 7, 2025
30f1b92
Merge branch 'remove-attributes-from-processors' into support-auto_do…
yonigozlan Nov 7, 2025
bd5aae2
Merge remote-tracking branch 'upstream/main' into support-auto_doctri…
yonigozlan Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_failed_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
if: ${{ env.process == 'true' && inputs.pr_number != '' }}
uses: actions/github-script@v6
with:
script: |
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
51 changes: 36 additions & 15 deletions .github/workflows/self-comment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ jobs:
run: |
python -m pip install GitPython
python utils/pr_slow_ci_models.py --message "$PR_COMMENT" | tee output.txt
echo "models=$(tail -n 1 output.txt)" >> $GITHUB_ENV
echo 'models=$(tail -n 1 output.txt)' >> $GITHUB_ENV
python utils/pr_slow_ci_models.py --message "$PR_COMMENT" --quantization | tee output2.txt
echo "quantizations=$(tail -n 1 output2.txt)" >> $GITHUB_ENV
echo 'quantizations=$(tail -n 1 output2.txt)' >> $GITHUB_ENV

- name: Show models to test
id: models_to_run
Expand Down Expand Up @@ -135,6 +135,27 @@ jobs:
"repos/${github_repository}/issues/${pr_number}/comments" \
-f body="💔 This comment contains \`run-slow\`, but unknown error occurred and [the workflow run]($GITHUB_RUN_URL) aborted!"

# Report back if we are not able to get the tests (for example, security check is failing)
report_error_earlier:
name: Report error earlier
if: ${{ always() && needs.get-pr-info.result == 'success' && needs.get-tests.result != 'success' }}
needs: [get-pr-number, get-pr-info, get-tests]
permissions:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- name: Reply to the comment
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
repos/${{ github.repository }}/issues/${{ needs.get-pr-number.outputs.PR_NUMBER }}/comments \
-f body="💔 This comment contains \`run-slow\`, but unknown error occurred and [the workflow run]($GITHUB_RUN_URL) aborted!"

reply_to_comment:
name: Reply to the comment
if: ${{ needs.get-tests.outputs.models != '[]' || needs.get-tests.outputs.quantizations != '[]' }}
Expand Down Expand Up @@ -251,21 +272,21 @@ jobs:
python3 << 'PYTHON_SCRIPT'
import json
import os

def filter_and_format_report(data):
"""
Filter out entries where commit is `None` (failing tests who status is not certain) and format as text
"""
lines = []

for model, model_result in data.items():
model_lines = []
for device, failures in model_result.items():

# Filter out None commits and extract just the test names
test_names = [
failure['test']
for failure in failures
failure['test']
for failure in failures
if isinstance(failure, dict) and failure.get('commit') is not None
]

Expand All @@ -274,32 +295,32 @@ jobs:
if idx == 0:
job_link = failures[idx]['job_link']
model_lines.append(f"- [{model}]({job_link}):")

model_lines.append(f" {test_name}")

# Only add model section if it has tests
if len(model_lines) > 0:
lines.extend(model_lines)
lines.append("") # Empty line between models

return "\n".join(lines).strip()

# Load and filter reports
model_report_str = os.environ.get('MODEL_REPORT', '{}')
quant_report_str = os.environ.get('QUANT_REPORT', '{}')

model_report = json.loads(model_report_str) if model_report_str else {}
quant_report = json.loads(quant_report_str) if quant_report_str else {}

formatted_model = filter_and_format_report(model_report)
formatted_quant = filter_and_format_report(quant_report)

# Write to files
with open('model_ci.txt', 'w') as f:
f.write(formatted_model)
if formatted_model:
f.write('\n')

with open('quantization_ci.txt', 'w') as f:
f.write(formatted_quant)
if formatted_quant:
Expand Down Expand Up @@ -339,7 +360,7 @@ jobs:
cat model_ci.txt
echo ''
fi

# Check if quantization_ci.txt has content
if [ -s quantization_ci.txt ]; then
echo '### Quantization CI Report'
Expand Down
70 changes: 67 additions & 3 deletions .github/workflows/self-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ jobs:
- name: Reinstall transformers in edit mode
working-directory: /transformers
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e .[testing]

- name: Install kernels
working-directory: /transformers
run: python3 -m pip install -U kernels

- name: NVIDIA-SMI
run: nvidia-smi

Expand Down Expand Up @@ -579,7 +579,7 @@ jobs:

echo "$machine_type"
echo "machine_type=$machine_type" >> $GITHUB_ENV

- name: Run kernel tests on GPU
working-directory: /transformers
run: |
Expand All @@ -597,6 +597,70 @@ jobs:
name: ${{ env.machine_type }}_run_kernels_gpu_test_reports
path: /transformers/reports/${{ env.machine_type }}_run_kernels_gpu_test_reports

run_kernels_gpu:
if: ${{ inputs.job == 'run_kernels_gpu' }}
name: Kernel tests
strategy:
fail-fast: false
matrix:
machine_type: [aws-g5-4xlarge-cache]
runs-on:
group: '${{ matrix.machine_type }}'
container:
image: ${{ inputs.docker }}
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
steps:
- name: Update clone
working-directory: /transformers
run: git fetch && git checkout ${{ inputs.commit_sha || github.sha }}

- name: Reinstall transformers in edit mode
working-directory: /transformers
run: python3 -m pip uninstall -y transformers && python3 -m pip install -e .[testing]

- name: Install kernels
working-directory: /transformers
run: python3 -m pip install -U kernels

- name: NVIDIA-SMI
run: nvidia-smi

- name: Environment
working-directory: /transformers
run: python3 utils/print_env.py

- name: Show installed libraries and their versions
working-directory: /transformers
run: pip freeze

- name: Set `machine_type` for report and artifact names
working-directory: /transformers
shell: bash
run: |
if [ "${{ matrix.machine_type }}" = "aws-g5-4xlarge-cache" ]; then
machine_type=single-gpu
else
machine_type=${{ matrix.machine_type }}
fi
echo "machine_type=$machine_type" >> $GITHUB_ENV

- name: Run kernel tests on GPU
working-directory: /transformers
run: |
python3 -m pytest -v --make-reports=${{ env.machine_type }}_run_kernels_gpu_test_reports tests/kernels/test_kernels.py

- name: Failure short reports
if: ${{ failure() }}
continue-on-error: true
run: cat /transformers/reports/${{ env.machine_type }}_run_kernels_gpu_test_reports/failures_short.txt

- name: "Test suite reports artifacts: ${{ env.machine_type }}_run_kernels_gpu_test_reports"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.machine_type }}_run_kernels_gpu_test_reports
path: /transformers/reports/${{ env.machine_type }}_run_kernels_gpu_test_reports

run_extract_warnings:
# Let's only do this for the job `run_models_gpu` to simplify the (already complex) logic.
if: ${{ always() && inputs.job == 'run_models_gpu' }}
Expand Down
31 changes: 2 additions & 29 deletions src/transformers/models/align/processing_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""

from ...processing_utils import ProcessingKwargs, ProcessorMixin
from ...utils.auto_docstring import auto_docstring


class AlignProcessorKwargs(ProcessingKwargs, total=False):
Expand All @@ -29,36 +30,8 @@ class AlignProcessorKwargs(ProcessingKwargs, total=False):
}


@auto_docstring
class AlignProcessor(ProcessorMixin):
r"""
Constructs an ALIGN processor which wraps [`EfficientNetImageProcessor`] and
[`BertTokenizer`]/[`BertTokenizerFast`] into a single processor that inherits both the image processor and
tokenizer functionalities. See the [`~AlignProcessor.__call__`] and [`~OwlViTProcessor.decode`] for more
information.
The preferred way of passing kwargs is as a dictionary per modality, see usage example below.
```python
from transformers import AlignProcessor
from PIL import Image
model_id = "kakaobrain/align-base"
processor = AlignProcessor.from_pretrained(model_id)

processor(
images=your_pil_image,
text=["What is that?"],
images_kwargs = {"crop_size": {"height": 224, "width": 224}},
text_kwargs = {"padding": "do_not_pad"},
common_kwargs = {"return_tensors": "pt"},
)
```

Args:
image_processor ([`EfficientNetImageProcessor`]):
The image processor is a required input.
tokenizer ([`BertTokenizer`, `BertTokenizerFast`]):
The tokenizer is a required input.

"""

valid_processor_kwargs = AlignProcessorKwargs

def __init__(self, image_processor, tokenizer):
Expand Down
16 changes: 2 additions & 14 deletions src/transformers/models/altclip/processing_altclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,12 @@
"""

from ...processing_utils import ProcessorMixin
from ...utils.auto_docstring import auto_docstring
from ...utils.deprecation import deprecate_kwarg


@auto_docstring
class AltCLIPProcessor(ProcessorMixin):
r"""
Constructs a AltCLIP processor which wraps a CLIP image processor and a XLM-Roberta tokenizer into a single
processor.

[`AltCLIPProcessor`] offers all the functionalities of [`CLIPImageProcessor`] and [`XLMRobertaTokenizerFast`]. See
the [`~AltCLIPProcessor.__call__`] and [`~AltCLIPProcessor.decode`] for more information.

Args:
image_processor ([`CLIPImageProcessor`], *optional*):
The image processor is a required input.
tokenizer ([`XLMRobertaTokenizerFast`], *optional*):
The tokenizer is a required input.
"""

@deprecate_kwarg(old_name="feature_extractor", version="5.0.0", new_name="image_processor")
def __init__(self, image_processor=None, tokenizer=None):
super().__init__(image_processor, tokenizer)
Expand Down
33 changes: 7 additions & 26 deletions src/transformers/models/aria/processing_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from ...processing_utils import ImagesKwargs, MultiModalData, ProcessingKwargs, ProcessorMixin, Unpack
from ...tokenization_utils import PreTokenizedInput, TextInput
from ...utils import TensorType
from ...utils.auto_docstring import auto_docstring
from ..auto import AutoTokenizer


Expand All @@ -52,28 +53,19 @@ class AriaProcessorKwargs(ProcessingKwargs, total=False):
}


@auto_docstring
class AriaProcessor(ProcessorMixin):
"""
AriaProcessor is a processor for the Aria model which wraps the Aria image preprocessor and the LLama slow tokenizer.

Args:
image_processor (`AriaImageProcessor`, *optional*):
The AriaImageProcessor to use for image preprocessing.
tokenizer (`PreTrainedTokenizerBase`, *optional*):
An instance of [`PreTrainedTokenizerBase`]. This should correspond with the model's text model. The tokenizer is a required input.
chat_template (`str`, *optional*):
A Jinja template which will be used to convert lists of messages in a chat into a tokenizable string.
size_conversion (`Dict`, *optional*):
A dictionary indicating size conversions for images.
"""

def __init__(
self,
image_processor=None,
tokenizer: Union[AutoTokenizer, str] = None,
chat_template: Optional[str] = None,
size_conversion: Optional[dict[Union[float, int], int]] = None,
):
"""
size_conversion (`Dict`, *optional*):
A dictionary indicating size conversions for images.
"""
if size_conversion is None:
size_conversion = {490: 128, 980: 256}
self.size_conversion = {int(k): v for k, v in size_conversion.items()}
Expand All @@ -85,25 +77,14 @@ def __init__(

super().__init__(image_processor, tokenizer, chat_template=chat_template)

@auto_docstring
def __call__(
self,
text: Union[TextInput, PreTokenizedInput, list[TextInput], list[PreTokenizedInput]],
images: Optional[ImageInput] = None,
**kwargs: Unpack[AriaProcessorKwargs],
) -> BatchFeature:
"""
Main method to prepare for the model one or several sequences(s) and image(s).

Args:
text (`TextInput`, `PreTokenizedInput`, `list[TextInput]`, `list[PreTokenizedInput]`):
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
`is_split_into_words=True` (to lift the ambiguity with a batch of sequences).
images (`ImageInput`):
The image or batch of images to be prepared. Each image can be a PIL image, NumPy array or PyTorch
tensor. Both channels-first and channels-last formats are supported.


Returns:
[`BatchFeature`]: A [`BatchFeature`] with the following fields:
- **input_ids** -- List of token ids to be fed to a model. Returned when `text` is not `None`.
Expand Down
Loading
Loading