sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
huggingface/transformers:src/transformers/models/pixio/convert_pixio_to_pytorch.py
# Copyright 2025 Meta AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pixio/convert_pixio_to_pytorch.py", "license": "Apache License 2.0", "lines": 196, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pixio/modular_pixio.py
# Copyright 2025 Meta AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pixio/modular_pixio.py", "license": "Apache License 2.0", "lines": 325, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/pixio/test_modeling_pixio.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/pixio/test_modeling_pixio.py", "license": "Apache License 2.0", "lines": 233, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/jais2/modular_jais2.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/jais2/modular_jais2.py", "license": "Apache License 2.0", "lines": 168, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/jais2/test_modeling_jais2.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/jais2/test_modeling_jais2.py", "license": "Apache License 2.0", "lines": 115, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/pe_audio/configuration_pe_audio.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio/configuration_pe_audio.py", "license": "Apache License 2.0", "lines": 167, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_audio/feature_extraction_pe_audio.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio/feature_extraction_pe_audio.py", "license": "Apache License 2.0", "lines": 133, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_audio/modular_pe_audio.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio/modular_pe_audio.py", "license": "Apache License 2.0", "lines": 252, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_audio/processing_pe_audio.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio/processing_pe_audio.py", "license": "Apache License 2.0", "lines": 19, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_audio_video/configuration_pe_audio_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio_video/configuration_pe_audio_video.py", "license": "Apache License 2.0", "lines": 183, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/pe_audio_video/convert_pe_audio_video_to_hf.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio_video/convert_pe_audio_video_to_hf.py", "license": "Apache License 2.0", "lines": 105, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/pe_audio_video/modular_pe_audio_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio_video/modular_pe_audio_video.py", "license": "Apache License 2.0", "lines": 648, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_audio_video/processing_pe_audio_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_audio_video/processing_pe_audio_video.py", "license": "Apache License 2.0", "lines": 20, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_video/configuration_pe_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_video/configuration_pe_video.py", "license": "Apache License 2.0", "lines": 172, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_video/modular_pe_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_video/modular_pe_video.py", "license": "Apache License 2.0", "lines": 194, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/pe_video/processing_pe_video.py
from ...processing_utils import ProcessorMixin class PeVideoProcessor(ProcessorMixin): attributes = ["video_processor", "tokenizer"] video_processor_class = "PeVideoVideoProcessor" tokenizer_class = "AutoTokenizer" __all__ = ["PeVideoProcessor"]
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_video/processing_pe_video.py", "license": "Apache License 2.0", "lines": 6, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
huggingface/transformers:src/transformers/models/pe_video/video_processing_pe_video.py
# Copyright 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pe_video/video_processing_pe_video.py", "license": "Apache License 2.0", "lines": 56, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/pe_audio_video/test_modeling_pe_audio_video.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/pe_audio_video/test_modeling_pe_audio_video.py", "license": "Apache License 2.0", "lines": 265, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/pe_video/test_modeling_pe_video.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/pe_video/test_modeling_pe_video.py", "license": "Apache License 2.0", "lines": 310, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:examples/modular-transformers/modular_test_suffix.py
import torch.nn as nn from transformers.models.llama.modeling_llama import LlamaDecoderLayer class TestSuffixDecoderLayer(nn.module): pass # Here, we want to add "Llama" as a suffix to the base `TestModel` name for all required dependencies class TestSuffixLlamaDecoderLayer(LlamaDecoderLayer): pass
{ "repo_id": "huggingface/transformers", "file_path": "examples/modular-transformers/modular_test_suffix.py", "license": "Apache License 2.0", "lines": 7, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
huggingface/transformers:src/transformers/models/paddleocr_vl/modular_paddleocr_vl.py
# Copyright 2025 The PaddlePaddle Team and The HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to GPT-N...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/paddleocr_vl/modular_paddleocr_vl.py", "license": "Apache License 2.0", "lines": 1212, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/paddleocr_vl/test_modeling_paddleocr_vl.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/paddleocr_vl/test_modeling_paddleocr_vl.py", "license": "Apache License 2.0", "lines": 436, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/lasr/feature_extraction_lasr.py
# Copyright 2025 The HuggingFace Inc. team and Google LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/lasr/feature_extraction_lasr.py", "license": "Apache License 2.0", "lines": 234, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/lasr/modular_lasr.py
# Copyright 2025 The HuggingFace Inc. team and Google LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/lasr/modular_lasr.py", "license": "Apache License 2.0", "lines": 490, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/test_training_mixin.py
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/test_training_mixin.py", "license": "Apache License 2.0", "lines": 349, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/trainer_jit_checkpoint.py
import os import signal import threading from .trainer_callback import TrainerCallback from .trainer_utils import PREFIX_CHECKPOINT_DIR from .utils import logging logger = logging.get_logger(__name__) class CheckpointManager: def __init__(self, trainer, kill_wait: int = 3): """ Initialize the C...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/trainer_jit_checkpoint.py", "license": "Apache License 2.0", "lines": 96, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:src/transformers/integrations/quark.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/integrations/quark.py", "license": "Apache License 2.0", "lines": 43, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/fast_vlm/convert_fastvlm_weights_to_hf.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/fast_vlm/convert_fastvlm_weights_to_hf.py", "license": "Apache License 2.0", "lines": 208, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/fast_vlm/modular_fast_vlm.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/fast_vlm/modular_fast_vlm.py", "license": "Apache License 2.0", "lines": 326, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/fast_vlm/test_modeling_fast_vlm.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/fast_vlm/test_modeling_fast_vlm.py", "license": "Apache License 2.0", "lines": 259, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/ministral3/configuration_ministral3.py
# Copyright 2025 Mistral AI and the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/ministral3/configuration_ministral3.py", "license": "Apache License 2.0", "lines": 172, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/ministral3/convert_ministral3_weights_to_hf.py
# Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/ministral3/convert_ministral3_weights_to_hf.py", "license": "Apache License 2.0", "lines": 283, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/ministral3/modular_ministral3.py
from collections.abc import Callable import torch from ...cache_utils import Cache from ...modeling_flash_attention_utils import FlashAttentionKwargs from ...modeling_layers import ( GenericForQuestionAnswering, GenericForSequenceClassification, GenericForTokenClassification, ) from ...modeling_utils impo...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/ministral3/modular_ministral3.py", "license": "Apache License 2.0", "lines": 93, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
huggingface/transformers:tests/models/ministral3/test_modeling_ministral3.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/ministral3/test_modeling_ministral3.py", "license": "Apache License 2.0", "lines": 113, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/t5gemma2/modular_t5gemma2.py
# Copyright 2025 Google Inc. HuggingFace Inc. team. All rights reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/t5gemma2/modular_t5gemma2.py", "license": "Apache License 2.0", "lines": 1411, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/t5gemma2/test_modeling_t5gemma2.py
# Copyright 2025 Google Inc. HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/t5gemma2/test_modeling_t5gemma2.py", "license": "Apache License 2.0", "lines": 935, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/afmoe/configuration_afmoe.py
# Copyright 2025 Arcee AI and the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/afmoe/configuration_afmoe.py", "license": "Apache License 2.0", "lines": 195, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/afmoe/modular_afmoe.py
# Copyright 2025 Arcee AI and the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/afmoe/modular_afmoe.py", "license": "Apache License 2.0", "lines": 387, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/afmoe/test_modeling_afmoe.py
# Copyright 2025 Arcee AI and the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/afmoe/test_modeling_afmoe.py", "license": "Apache License 2.0", "lines": 108, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/gpt_neox/tokenization_gpt_neox.py
# Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/gpt_neox/tokenization_gpt_neox.py", "license": "Apache License 2.0", "lines": 120, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/tokenization_utils_sentencepiece.py
# Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/tokenization_utils_sentencepiece.py", "license": "Apache License 2.0", "lines": 255, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/test_sentencepiece_backend_mixin.py
# Sentencepiece backend layer tests import shutil import tempfile from typing import TYPE_CHECKING from transformers import AutoTokenizer, PythonBackend, TokenizersBackend from transformers.tokenization_python import AddedToken if TYPE_CHECKING: pass class SentencePieceBackendTesterMixin: """ Tests th...
{ "repo_id": "huggingface/transformers", "file_path": "tests/test_sentencepiece_backend_mixin.py", "license": "Apache License 2.0", "lines": 305, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/test_tokenizers_backend_mixin.py
# Optionally test tokenizers-backend API in transformers import inspect import shutil import tempfile from typing import TYPE_CHECKING from parameterized import parameterized from transformers import TokenizersBackend from transformers.tokenization_utils_base import PreTrainedTokenizerBase SMALL_TRAINING_CORPUS = ...
{ "repo_id": "huggingface/transformers", "file_path": "tests/test_tokenizers_backend_mixin.py", "license": "Apache License 2.0", "lines": 412, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/nanochat/configuration_nanochat.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/nanochat/configuration_nanochat.py", "license": "Apache License 2.0", "lines": 137, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/nanochat/convert_nanochat_checkpoints.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/nanochat/convert_nanochat_checkpoints.py", "license": "Apache License 2.0", "lines": 254, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/nanochat/modular_nanochat.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/nanochat/modular_nanochat.py", "license": "Apache License 2.0", "lines": 194, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/nanochat/test_modeling_nanochat.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/nanochat/test_modeling_nanochat.py", "license": "Apache License 2.0", "lines": 188, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/pipelines/any_to_any.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/pipelines/any_to_any.py", "license": "Apache License 2.0", "lines": 432, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/layoutxlm/modular_layoutxlm.py
# Copyright Microsoft Research and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/layoutxlm/modular_layoutxlm.py", "license": "Apache License 2.0", "lines": 95, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/vitpose/image_processing_vitpose_fast.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/vitpose/image_processing_vitpose_fast.py", "license": "Apache License 2.0", "lines": 248, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/deepspeed/test_alst_ulysses_sp.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/deepspeed/test_alst_ulysses_sp.py", "license": "Apache License 2.0", "lines": 207, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/pix2struct/image_processing_pix2struct_fast.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/pix2struct/image_processing_pix2struct_fast.py", "license": "Apache License 2.0", "lines": 279, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/sam3/configuration_sam3.py
# Copyright 2025 Meta AI and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3/configuration_sam3.py", "license": "Apache License 2.0", "lines": 479, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3/convert_sam3_to_hf.py
# Copyright 2025 The Meta AI Authors and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3/convert_sam3_to_hf.py", "license": "Apache License 2.0", "lines": 389, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3/modeling_sam3.py
# Copyright 2025 The Meta AI Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3/modeling_sam3.py", "license": "Apache License 2.0", "lines": 1996, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3/modular_sam3.py
# Copyright 2025 The Meta AI Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3/modular_sam3.py", "license": "Apache License 2.0", "lines": 206, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3/processing_sam3.py
# Copyright 2025 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3/processing_sam3.py", "license": "Apache License 2.0", "lines": 559, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3_tracker/modular_sam3_tracker.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_tracker/modular_sam3_tracker.py", "license": "Apache License 2.0", "lines": 229, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3_tracker_video/modular_sam3_tracker_video.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_tracker_video/modular_sam3_tracker_video.py", "license": "Apache License 2.0", "lines": 489, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "...
license
huggingface/transformers:src/transformers/models/sam3_video/configuration_sam3_video.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_video/configuration_sam3_video.py", "license": "Apache License 2.0", "lines": 211, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3_video/convert_sam3_video_to_hf.py
# Copyright 2025 The Meta AI Authors and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_video/convert_sam3_video_to_hf.py", "license": "Apache License 2.0", "lines": 686, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3_video/modeling_sam3_video.py
# Copyright 2025 The Meta AI Authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_video/modeling_sam3_video.py", "license": "Apache License 2.0", "lines": 1765, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/sam3_video/processing_sam3_video.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/sam3_video/processing_sam3_video.py", "license": "Apache License 2.0", "lines": 327, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/sam3/test_modeling_sam3.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/sam3/test_modeling_sam3.py", "license": "Apache License 2.0", "lines": 1314, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/sam3_tracker/test_modeling_sam3_tracker.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/sam3_tracker/test_modeling_sam3_tracker.py", "license": "Apache License 2.0", "lines": 722, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/sam3_tracker_video/test_modeling_sam3_tracker_video.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/sam3_tracker_video/test_modeling_sam3_tracker_video.py", "license": "Apache License 2.0", "lines": 562, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/sam3_video/test_modeling_sam3_video.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/sam3_video/test_modeling_sam3_video.py", "license": "Apache License 2.0", "lines": 549, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/glm46v/modular_glm46v.py
# Copyright 2025 the HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/glm46v/modular_glm46v.py", "license": "Apache License 2.0", "lines": 180, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/glm46v/test_modeling_glm46v.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/glm46v/test_modeling_glm46v.py", "license": "Apache License 2.0", "lines": 510, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/glm46v/test_processor_glm46v.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/glm46v/test_processor_glm46v.py", "license": "Apache License 2.0", "lines": 230, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/glm46v/test_video_processing_glm46v.py
# Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/glm46v/test_video_processing_glm46v.py", "license": "Apache License 2.0", "lines": 288, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/initialization.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/initialization.py", "license": "Apache License 2.0", "lines": 245, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/conversion_mapping.py
# Copyright (C) 2025 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/conversion_mapping.py", "license": "Apache License 2.0", "lines": 429, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/utils/loading_report.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/utils/loading_report.py", "license": "Apache License 2.0", "lines": 233, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/utils/pytest_helpers.py
import argparse import json import re from collections import Counter from pathlib import Path def _base_test_name(nodeid: str) -> str: # Strip parameters like [param=..] from the last component name = nodeid.split("::")[-1] return re.sub(r"\[.*\]$", "", name) def _class_name(nodeid: str) -> str | None:...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/utils/pytest_helpers.py", "license": "Apache License 2.0", "lines": 85, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:tests/utils/test_core_model_loading.py
# Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
{ "repo_id": "huggingface/transformers", "file_path": "tests/utils/test_core_model_loading.py", "license": "Apache License 2.0", "lines": 665, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/audioflamingo3/configuration_audioflamingo3.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/audioflamingo3/configuration_audioflamingo3.py", "license": "Apache License 2.0", "lines": 171, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/audioflamingo3/convert_audioflamingo3_to_hf.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/audioflamingo3/convert_audioflamingo3_to_hf.py", "license": "Apache License 2.0", "lines": 237, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" ...
license
huggingface/transformers:src/transformers/models/audioflamingo3/modular_audioflamingo3.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/audioflamingo3/modular_audioflamingo3.py", "license": "Apache License 2.0", "lines": 259, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/audioflamingo3/processing_audioflamingo3.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/audioflamingo3/processing_audioflamingo3.py", "license": "Apache License 2.0", "lines": 269, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/models/audioflamingo3/test_modeling_audioflamingo3.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/audioflamingo3/test_modeling_audioflamingo3.py", "license": "Apache License 2.0", "lines": 303, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/models/audioflamingo3/test_processing_audioflamingo3.py
# Copyright 2025 NVIDIA CORPORATION and the HuggingFace Inc. team. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
{ "repo_id": "huggingface/transformers", "file_path": "tests/models/audioflamingo3/test_processing_audioflamingo3.py", "license": "Apache License 2.0", "lines": 163, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/fsdp/test_context_parallel.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/fsdp/test_context_parallel.py", "license": "Apache License 2.0", "lines": 190, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/models/fuyu/image_processing_fuyu_fast.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/fuyu/image_processing_fuyu_fast.py", "license": "Apache License 2.0", "lines": 354, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/models/glpn/image_processing_glpn_fast.py
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/glpn/image_processing_glpn_fast.py", "license": "Apache License 2.0", "lines": 117, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/kernels/test_kernels.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/kernels/test_kernels.py", "license": "Apache License 2.0", "lines": 415, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:src/transformers/utils/chat_parsing_utils.py
from __future__ import annotations import json import re from transformers.utils import is_jmespath_available if is_jmespath_available(): import jmespath else: jmespath = None def _parse_re_match(node_match: re.Match) -> dict | str: # If the regex has named groups, return a dict of those groups if...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/utils/chat_parsing_utils.py", "license": "Apache License 2.0", "lines": 220, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:src/transformers/models/efficientloftr/modular_efficientloftr.py
import torch from ...utils import TensorType from ..superglue.image_processing_superglue_fast import SuperGlueImageProcessorFast from .modeling_efficientloftr import EfficientLoFTRKeypointMatchingOutput class EfficientLoFTRImageProcessorFast(SuperGlueImageProcessorFast): def post_process_keypoint_matching( ...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/efficientloftr/modular_efficientloftr.py", "license": "Apache License 2.0", "lines": 58, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
huggingface/transformers:src/transformers/cli/chat.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/cli/chat.py", "license": "Apache License 2.0", "lines": 474, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/cli/download.py
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/cli/download.py", "license": "Apache License 2.0", "lines": 36, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/cli/system.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/cli/system.py", "license": "Apache License 2.0", "lines": 115, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:src/transformers/cli/transformers.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/cli/transformers.py", "license": "Apache License 2.0", "lines": 34, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
huggingface/transformers:tests/cli/test_chat.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "tests/cli/test_chat.py", "license": "Apache License 2.0", "lines": 37, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/cli/test_download.py
# Copyright 2025-present, the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
{ "repo_id": "huggingface/transformers", "file_path": "tests/cli/test_download.py", "license": "Apache License 2.0", "lines": 46, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:tests/cli/test_system.py
# Copyright 2025-present, the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
{ "repo_id": "huggingface/transformers", "file_path": "tests/cli/test_system.py", "license": "Apache License 2.0", "lines": 24, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
huggingface/transformers:benchmark_v2/framework/benchmark_config.py
import hashlib import itertools import json import logging from functools import lru_cache from typing import Any import torch from transformers.generation.configuration_utils import CompileConfig from transformers.utils import is_torch_accelerator_available from transformers.utils.import_utils import is_flash_attn_2...
{ "repo_id": "huggingface/transformers", "file_path": "benchmark_v2/framework/benchmark_config.py", "license": "Apache License 2.0", "lines": 242, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:benchmark_v2/framework/benchmark_runner.py
import gc import json import logging import os import pathlib import re import tempfile import time from datetime import datetime from queue import Queue from typing import Any import torch from datasets import Dataset from huggingface_hub import HfApi from tqdm import trange from transformers import ( AutoModelF...
{ "repo_id": "huggingface/transformers", "file_path": "benchmark_v2/framework/benchmark_runner.py", "license": "Apache License 2.0", "lines": 405, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:benchmark_v2/framework/data_classes.py
from dataclasses import dataclass from datetime import datetime, timezone from typing import Any import numpy as np from .hardware_metrics import GPURawMetrics, HardwareInfo def compute_basic_statistics(measurements: list[float]) -> dict[str, float]: return { "avg": np.mean(measurements) if measurements...
{ "repo_id": "huggingface/transformers", "file_path": "benchmark_v2/framework/data_classes.py", "license": "Apache License 2.0", "lines": 152, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:benchmark_v2/framework/hardware_metrics.py
import logging import subprocess import sys import time from dataclasses import dataclass from enum import Enum from logging import Logger from multiprocessing import Pipe, Process from multiprocessing.connection import Connection from transformers.utils.import_utils import is_cuda_platform, is_rocm_platform if is_c...
{ "repo_id": "huggingface/transformers", "file_path": "benchmark_v2/framework/hardware_metrics.py", "license": "Apache License 2.0", "lines": 273, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
huggingface/transformers:src/transformers/models/video_llama_3/modular_video_llama_3.py
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
{ "repo_id": "huggingface/transformers", "file_path": "src/transformers/models/video_llama_3/modular_video_llama_3.py", "license": "Apache License 2.0", "lines": 1492, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license