text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from src/transformers/models/sam_hq/modular_sam_hq.py.
# Do NOT edit this file manually as any edits will be overwritten by the generation of
... | transformers/src/transformers/models/sam_hq/configuration_sam_hq.py/0 | {
"file_path": "transformers/src/transformers/models/sam_hq/configuration_sam_hq.py",
"repo_id": "transformers",
"token_count": 5920
} | 538 |
# coding=utf-8
# 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 r... | transformers/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py/0 | {
"file_path": "transformers/src/transformers/models/seamless_m4t_v2/modeling_seamless_m4t_v2.py",
"repo_id": "transformers",
"token_count": 91631
} | 539 |
# coding=utf-8
# Copyright 2024 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... | transformers/src/transformers/models/seggpt/convert_seggpt_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/seggpt/convert_seggpt_to_hf.py",
"repo_id": "transformers",
"token_count": 4275
} | 540 |
# coding=utf-8
# 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
#
... | transformers/src/transformers/models/shieldgemma2/modeling_shieldgemma2.py/0 | {
"file_path": "transformers/src/transformers/models/shieldgemma2/modeling_shieldgemma2.py",
"repo_id": "transformers",
"token_count": 2402
} | 541 |
# coding=utf-8
# 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... | transformers/src/transformers/models/siglip2/modular_siglip2.py/0 | {
"file_path": "transformers/src/transformers/models/siglip2/modular_siglip2.py",
"repo_id": "transformers",
"token_count": 11166
} | 542 |
# coding=utf-8
# Copyright 2021 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... | transformers/src/transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 6582
} | 543 |
# coding=utf-8
# 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 r... | transformers/src/transformers/models/speecht5/feature_extraction_speecht5.py/0 | {
"file_path": "transformers/src/transformers/models/speecht5/feature_extraction_speecht5.py",
"repo_id": "transformers",
"token_count": 7626
} | 544 |
# Copyright 2024 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... | transformers/src/transformers/models/superpoint/modeling_superpoint.py/0 | {
"file_path": "transformers/src/transformers/models/superpoint/modeling_superpoint.py",
"repo_id": "transformers",
"token_count": 7984
} | 545 |
# coding=utf-8
# 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 r... | transformers/src/transformers/models/swin2sr/image_processing_swin2sr_fast.py/0 | {
"file_path": "transformers/src/transformers/models/swin2sr/image_processing_swin2sr_fast.py",
"repo_id": "transformers",
"token_count": 1613
} | 546 |
#!/usr/bin/env bash
# Use this script as follows ./download_from_gcp.sh /path/to/folder/to/store/downloads
folder_to_store_downloads=${1}
# Replace by gcp_path to T5 cloud bucket folder here
# To download the official `t5-small` model of https://github.com/google-research/text-to-text-transfer-transformer#released-mod... | transformers/src/transformers/models/t5/download_from_gcp.sh/0 | {
"file_path": "transformers/src/transformers/models/t5/download_from_gcp.sh",
"repo_id": "transformers",
"token_count": 579
} | 547 |
# coding=utf-8
# Copyright 2020 Google Research and 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 re... | transformers/src/transformers/models/tapas/configuration_tapas.py/0 | {
"file_path": "transformers/src/transformers/models/tapas/configuration_tapas.py",
"repo_id": "transformers",
"token_count": 4588
} | 548 |
import argparse
import os
import re
import shutil
import numpy as np
import timesfm
import torch
from transformers import TimesFmConfig, TimesFmModelForPrediction
"""
Sample usage:
```
python src/transformers/models/timesfm/convert_timesfm_orignal_to_hf.py \
--output_dir /output/path
```
"""
def get_nested_a... | transformers/src/transformers/models/timesfm/convert_timesfm_orignal_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/timesfm/convert_timesfm_orignal_to_hf.py",
"repo_id": "transformers",
"token_count": 5512
} | 549 |
# coding=utf-8
# Copyright 2021 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... | transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py",
"repo_id": "transformers",
"token_count": 4298
} | 550 |
# Copyright 2023 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... | transformers/src/transformers/models/univnet/configuration_univnet.py/0 | {
"file_path": "transformers/src/transformers/models/univnet/configuration_univnet.py",
"repo_id": "transformers",
"token_count": 2469
} | 551 |
# 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... | transformers/src/transformers/models/vipllava/convert_vipllava_weights_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/vipllava/convert_vipllava_weights_to_hf.py",
"repo_id": "transformers",
"token_count": 1893
} | 552 |
# coding=utf-8
# Copyright 2021 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... | transformers/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 2122
} | 553 |
# coding=utf-8
# Copyright 2022 Facebook 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-... | transformers/src/transformers/models/vit_mae/modeling_vit_mae.py/0 | {
"file_path": "transformers/src/transformers/models/vit_mae/modeling_vit_mae.py",
"repo_id": "transformers",
"token_count": 19185
} | 554 |
# coding=utf-8
# Copyright 2024 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... | transformers/src/transformers/models/vitpose/convert_vitpose_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/vitpose/convert_vitpose_to_hf.py",
"repo_id": "transformers",
"token_count": 7160
} | 555 |
# coding=utf-8
# Copyright 2021 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... | transformers/src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/feature_extraction_wav2vec2.py",
"repo_id": "transformers",
"token_count": 4834
} | 556 |
import math
from dataclasses import dataclass
from typing import Optional, Union
import torch
from torch import nn
from ...activations import ACT2FN
from ...integrations.deepspeed import is_deepspeed_zero3_enabled
from ...integrations.fsdp import is_fsdp_managed_module
from ...modeling_layers import GradientCheckpoin... | transformers/src/transformers/models/wav2vec2_conformer/modular_wav2vec2_conformer.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2_conformer/modular_wav2vec2_conformer.py",
"repo_id": "transformers",
"token_count": 13223
} | 557 |
# coding=utf-8
# Copyright 2022 Facebook AI Research and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 Licens... | transformers/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py/0 | {
"file_path": "transformers/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py",
"repo_id": "transformers",
"token_count": 26118
} | 558 |
# coding=utf-8
# Copyright 2022 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... | transformers/src/transformers/models/yoso/configuration_yoso.py/0 | {
"file_path": "transformers/src/transformers/models/yoso/configuration_yoso.py",
"repo_id": "transformers",
"token_count": 2554
} | 559 |
from typing import Any, Union, overload
import numpy as np
from ..utils import add_end_docstrings, is_tf_available, is_torch_available, logging
from .base import GenericTensor, Pipeline, PipelineException, build_pipeline_init_args
if is_tf_available():
import tensorflow as tf
from ..tf_utils import stable_... | transformers/src/transformers/pipelines/fill_mask.py/0 | {
"file_path": "transformers/src/transformers/pipelines/fill_mask.py",
"repo_id": "transformers",
"token_count": 5175
} | 560 |
import types
import warnings
from typing import Any, Optional, Union, overload
import numpy as np
from ..models.bert.tokenization_bert import BasicTokenizer
from ..utils import (
ExplicitEnum,
add_end_docstrings,
is_tf_available,
is_torch_available,
)
from .base import ArgumentHandler, ChunkPipeline, ... | transformers/src/transformers/pipelines/token_classification.py/0 | {
"file_path": "transformers/src/transformers/pipelines/token_classification.py",
"repo_id": "transformers",
"token_count": 13824
} | 561 |
# Copyright 2024 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... | transformers/src/transformers/quantizers/quantizer_bitnet.py/0 | {
"file_path": "transformers/src/transformers/quantizers/quantizer_bitnet.py",
"repo_id": "transformers",
"token_count": 1809
} | 562 |
# Copyright 2024 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... | transformers/src/transformers/quantizers/quantizer_vptq.py/0 | {
"file_path": "transformers/src/transformers/quantizers/quantizer_vptq.py",
"repo_id": "transformers",
"token_count": 1432
} | 563 |
# 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... | transformers/src/transformers/trainer_seq2seq.py/0 | {
"file_path": "transformers/src/transformers/trainer_seq2seq.py",
"repo_id": "transformers",
"token_count": 7385
} | 564 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class FlaxForcedBOSTokenLogitsProcessor(metaclass=DummyObject):
_backends = ["flax"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["flax"])
class FlaxForced... | transformers/src/transformers/utils/dummy_flax_objects.py/0 | {
"file_path": "transformers/src/transformers/utils/dummy_flax_objects.py",
"repo_id": "transformers",
"token_count": 1090
} | 565 |
# 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... | transformers/src/transformers/utils/hp_naming.py/0 | {
"file_path": "transformers/src/transformers/utils/hp_naming.py",
"repo_id": "transformers",
"token_count": 2393
} | 566 |
{
"modelname": "BrandNewBERT",
"uppercase_modelname": "BRAND_NEW_BERT",
"lowercase_modelname": "brand_new_bert",
"camelcase_modelname": "BrandNewBert",
"has_slow_class": ["True", "False"],
"has_fast_class": ["True", "False"],
"slow_tokenizer_use_sentencepiece": ["True", "False"],
"authors": "The Hugging... | transformers/templates/adding_a_missing_tokenization_test/cookiecutter.json/0 | {
"file_path": "transformers/templates/adding_a_missing_tokenization_test/cookiecutter.json",
"repo_id": "transformers",
"token_count": 129
} | 567 |
# 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... | transformers/tests/deepspeed/test_deepspeed.py/0 | {
"file_path": "transformers/tests/deepspeed/test_deepspeed.py",
"repo_id": "transformers",
"token_count": 27406
} | 568 |
# Copyright 2023 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... | transformers/tests/fsdp/test_fsdp.py/0 | {
"file_path": "transformers/tests/fsdp/test_fsdp.py",
"repo_id": "transformers",
"token_count": 9052
} | 569 |
# Copyright 2022 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... | transformers/tests/models/audio_spectrogram_transformer/test_feature_extraction_audio_spectrogram_transformer.py/0 | {
"file_path": "transformers/tests/models/audio_spectrogram_transformer/test_feature_extraction_audio_spectrogram_transformer.py",
"repo_id": "transformers",
"token_count": 3852
} | 570 |
# Copyright 2024 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... | transformers/tests/models/bamba/test_modeling_bamba.py/0 | {
"file_path": "transformers/tests/models/bamba/test_modeling_bamba.py",
"repo_id": "transformers",
"token_count": 14855
} | 571 |
# 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... | transformers/tests/models/bert/test_tokenization_bert.py/0 | {
"file_path": "transformers/tests/models/bert/test_tokenization_bert.py",
"repo_id": "transformers",
"token_count": 6906
} | 572 |
# Copyright 2018 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 to i... | transformers/tests/models/camembert/test_tokenization_camembert.py/0 | {
"file_path": "transformers/tests/models/camembert/test_tokenization_camembert.py",
"repo_id": "transformers",
"token_count": 5741
} | 573 |
# Copyright 2022 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... | transformers/tests/models/codegen/test_modeling_codegen.py/0 | {
"file_path": "transformers/tests/models/codegen/test_modeling_codegen.py",
"repo_id": "transformers",
"token_count": 9206
} | 574 |
# Copyright 2022 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... | transformers/tests/models/data2vec/test_modeling_data2vec_audio.py/0 | {
"file_path": "transformers/tests/models/data2vec/test_modeling_data2vec_audio.py",
"repo_id": "transformers",
"token_count": 12708
} | 575 |
# Copyright 2024 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... | transformers/tests/models/deepseek_v3/test_modeling_deepseek_v3.py/0 | {
"file_path": "transformers/tests/models/deepseek_v3/test_modeling_deepseek_v3.py",
"repo_id": "transformers",
"token_count": 11382
} | 576 |
# Copyright 2024 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... | transformers/tests/models/depth_anything/test_modeling_depth_anything.py/0 | {
"file_path": "transformers/tests/models/depth_anything/test_modeling_depth_anything.py",
"repo_id": "transformers",
"token_count": 5439
} | 577 |
# 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... | transformers/tests/models/efficientloftr/test_modeling_efficientloftr.py/0 | {
"file_path": "transformers/tests/models/efficientloftr/test_modeling_efficientloftr.py",
"repo_id": "transformers",
"token_count": 8953
} | 578 |
# 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... | transformers/tests/models/eomt/test_image_processing_eomt.py/0 | {
"file_path": "transformers/tests/models/eomt/test_image_processing_eomt.py",
"repo_id": "transformers",
"token_count": 5742
} | 579 |
# coding=utf-8
# Copyright 2025 The LG AI 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/L... | transformers/tests/models/exaone4/test_modeling_exaone4.py/0 | {
"file_path": "transformers/tests/models/exaone4/test_modeling_exaone4.py",
"repo_id": "transformers",
"token_count": 7362
} | 580 |
# Copyright 2022 Meta Platforms 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
#
# U... | transformers/tests/models/flava/test_processing_flava.py/0 | {
"file_path": "transformers/tests/models/flava/test_processing_flava.py",
"repo_id": "transformers",
"token_count": 3705
} | 581 |
import unittest
import numpy as np
from transformers import is_torch_available, is_vision_available
from transformers.testing_utils import (
require_torch,
require_torchvision,
require_vision,
)
if is_torch_available() and is_vision_available():
import torch
from transformers import FuyuImagePr... | transformers/tests/models/fuyu/test_image_processing_fuyu.py/0 | {
"file_path": "transformers/tests/models/fuyu/test_image_processing_fuyu.py",
"repo_id": "transformers",
"token_count": 907
} | 582 |
# Copyright 2022 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... | transformers/tests/models/glpn/test_image_processing_glpn.py/0 | {
"file_path": "transformers/tests/models/glpn/test_image_processing_glpn.py",
"repo_id": "transformers",
"token_count": 2663
} | 583 |
# Copyright 2022 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... | transformers/tests/models/gpt_neox_japanese/test_modeling_gpt_neox_japanese.py/0 | {
"file_path": "transformers/tests/models/gpt_neox_japanese/test_modeling_gpt_neox_japanese.py",
"repo_id": "transformers",
"token_count": 4997
} | 584 |
# coding=utf-8
# Copyright 2024 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... | transformers/tests/models/granitemoehybrid/test_modeling_granitemoehybrid.py/0 | {
"file_path": "transformers/tests/models/granitemoehybrid/test_modeling_granitemoehybrid.py",
"repo_id": "transformers",
"token_count": 2296
} | 585 |
# Copyright 2024 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... | transformers/tests/models/hiera/test_modeling_hiera.py/0 | {
"file_path": "transformers/tests/models/hiera/test_modeling_hiera.py",
"repo_id": "transformers",
"token_count": 12143
} | 586 |
# Copyright 2024 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... | transformers/tests/models/idefics2/test_processing_idefics2.py/0 | {
"file_path": "transformers/tests/models/idefics2/test_processing_idefics2.py",
"repo_id": "transformers",
"token_count": 6411
} | 587 |
# Copyright 2024 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... | transformers/tests/models/instructblipvideo/test_modeling_instructblipvideo.py/0 | {
"file_path": "transformers/tests/models/instructblipvideo/test_modeling_instructblipvideo.py",
"repo_id": "transformers",
"token_count": 13503
} | 588 |
# Copyright 2023 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
#
# ... | transformers/tests/models/kosmos2/test_modeling_kosmos2.py/0 | {
"file_path": "transformers/tests/models/kosmos2/test_modeling_kosmos2.py",
"repo_id": "transformers",
"token_count": 19835
} | 589 |
# Copyright 2021 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... | transformers/tests/models/llava/test_processing_llava.py/0 | {
"file_path": "transformers/tests/models/llava/test_processing_llava.py",
"repo_id": "transformers",
"token_count": 2005
} | 590 |
# Copyright 2022 Tsimur Hadeliya. 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 applicable law... | transformers/tests/models/longformer/test_tokenization_longformer.py/0 | {
"file_path": "transformers/tests/models/longformer/test_tokenization_longformer.py",
"repo_id": "transformers",
"token_count": 7229
} | 591 |
# Copyright 2021, 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 app... | transformers/tests/models/mbart/test_modeling_mbart.py/0 | {
"file_path": "transformers/tests/models/mbart/test_modeling_mbart.py",
"repo_id": "transformers",
"token_count": 13132
} | 592 |
# Copyright 2021 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... | transformers/tests/models/mluke/test_tokenization_mluke.py/0 | {
"file_path": "transformers/tests/models/mluke/test_tokenization_mluke.py",
"repo_id": "transformers",
"token_count": 14734
} | 593 |
# 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... | transformers/tests/models/mobilevitv2/test_modeling_mobilevitv2.py/0 | {
"file_path": "transformers/tests/models/mobilevitv2/test_modeling_mobilevitv2.py",
"repo_id": "transformers",
"token_count": 6682
} | 594 |
# Copyright 2024 HuggingFace Inc. team. All rights reserved.
# Copyright (c) 2024, NVIDIA CORPORATION. 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.... | transformers/tests/models/nemotron/test_modeling_nemotron.py/0 | {
"file_path": "transformers/tests/models/nemotron/test_modeling_nemotron.py",
"repo_id": "transformers",
"token_count": 2559
} | 595 |
# 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... | transformers/tests/models/patchtst/test_modeling_patchtst.py/0 | {
"file_path": "transformers/tests/models/patchtst/test_modeling_patchtst.py",
"repo_id": "transformers",
"token_count": 6898
} | 596 |
# 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... | transformers/tests/models/persimmon/test_modeling_persimmon.py/0 | {
"file_path": "transformers/tests/models/persimmon/test_modeling_persimmon.py",
"repo_id": "transformers",
"token_count": 2278
} | 597 |
# Copyright 2023 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... | transformers/tests/models/pix2struct/test_processing_pix2struct.py/0 | {
"file_path": "transformers/tests/models/pix2struct/test_processing_pix2struct.py",
"repo_id": "transformers",
"token_count": 5152
} | 598 |
# coding=utf-8
# Copyright 2025 The Qwen team, Alibaba Group 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.or... | transformers/tests/models/qwen2_5_omni/test_processing_qwen2_5_omni.py/0 | {
"file_path": "transformers/tests/models/qwen2_5_omni/test_processing_qwen2_5_omni.py",
"repo_id": "transformers",
"token_count": 10696
} | 599 |
# 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... | transformers/tests/models/rt_detr/test_modeling_rt_detr_resnet.py/0 | {
"file_path": "transformers/tests/models/rt_detr/test_modeling_rt_detr_resnet.py",
"repo_id": "transformers",
"token_count": 1387
} | 600 |
# Copyright 2024 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... | transformers/tests/models/seggpt/test_image_processing_seggpt.py/0 | {
"file_path": "transformers/tests/models/seggpt/test_image_processing_seggpt.py",
"repo_id": "transformers",
"token_count": 6058
} | 601 |
# Copyright 2022 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... | transformers/tests/models/speecht5/test_modeling_speecht5.py/0 | {
"file_path": "transformers/tests/models/speecht5/test_modeling_speecht5.py",
"repo_id": "transformers",
"token_count": 36550
} | 602 |
# Copyright 2022 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... | transformers/tests/models/timesformer/test_modeling_timesformer.py/0 | {
"file_path": "transformers/tests/models/timesformer/test_modeling_timesformer.py",
"repo_id": "transformers",
"token_count": 6095
} | 603 |
# Copyright 2022 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... | transformers/tests/models/videomae/test_modeling_videomae.py/0 | {
"file_path": "transformers/tests/models/videomae/test_modeling_videomae.py",
"repo_id": "transformers",
"token_count": 8886
} | 604 |
# 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... | transformers/tests/models/xcodec/test_modeling_xcodec.py/0 | {
"file_path": "transformers/tests/models/xcodec/test_modeling_xcodec.py",
"repo_id": "transformers",
"token_count": 9339
} | 605 |
# Copyright 2025 NXAI GmbH. 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 applicable law or ag... | transformers/tests/models/xlstm/test_modeling_xlstm.py/0 | {
"file_path": "transformers/tests/models/xlstm/test_modeling_xlstm.py",
"repo_id": "transformers",
"token_count": 7272
} | 606 |
# 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... | transformers/tests/optimization/test_optimization.py/0 | {
"file_path": "transformers/tests/optimization/test_optimization.py",
"repo_id": "transformers",
"token_count": 4494
} | 607 |
# Copyright 2023 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... | transformers/tests/pipelines/test_pipelines_mask_generation.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_mask_generation.py",
"repo_id": "transformers",
"token_count": 3662
} | 608 |
# Copyright 2021 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... | transformers/tests/pipelines/test_pipelines_zero_shot_object_detection.py/0 | {
"file_path": "transformers/tests/pipelines/test_pipelines_zero_shot_object_detection.py",
"repo_id": "transformers",
"token_count": 5132
} | 609 |
# 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... | transformers/tests/quantization/mxfp4/test_mxfp4.py/0 | {
"file_path": "transformers/tests/quantization/mxfp4/test_mxfp4.py",
"repo_id": "transformers",
"token_count": 8182
} | 610 |
# Testing new Hugging Face Deep Learning Container.
This document explains the testing strategy for releasing the new Hugging Face Deep Learning Container. AWS maintains 14 days of currency with framework releases. Besides framework releases, AWS release train is bi-weekly on Monday. Code cutoff date for any changes i... | transformers/tests/sagemaker/README.md/0 | {
"file_path": "transformers/tests/sagemaker/README.md",
"repo_id": "transformers",
"token_count": 3293
} | 611 |
# Copyright 2023 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... | transformers/tests/test_image_processing_common.py/0 | {
"file_path": "transformers/tests/test_image_processing_common.py",
"repo_id": "transformers",
"token_count": 14175
} | 612 |
# 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... | transformers/tests/trainer/test_trainer_callback.py/0 | {
"file_path": "transformers/tests/trainer/test_trainer_callback.py",
"repo_id": "transformers",
"token_count": 7812
} | 613 |
# 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 ... | transformers/tests/utils/test_attention_visualizer.py/0 | {
"file_path": "transformers/tests/utils/test_attention_visualizer.py",
"repo_id": "transformers",
"token_count": 2995
} | 614 |
# 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... | transformers/tests/utils/test_hf_argparser.py/0 | {
"file_path": "transformers/tests/utils/test_hf_argparser.py",
"repo_id": "transformers",
"token_count": 8139
} | 615 |
# 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... | transformers/tests/utils/test_versions_utils.py/0 | {
"file_path": "transformers/tests/utils/test_versions_utils.py",
"repo_id": "transformers",
"token_count": 1539
} | 616 |
import argparse
import difflib
import glob
import logging
import multiprocessing
import os
import shutil
import subprocess
from functools import partial
from io import StringIO
from create_dependency_mapping import find_priority_list
# Console for rich printing
from modular_model_converter import convert_modular_file... | transformers/utils/check_modular_conversion.py/0 | {
"file_path": "transformers/utils/check_modular_conversion.py",
"repo_id": "transformers",
"token_count": 3803
} | 617 |
import argparse
import math
import traceback
import dateutil.parser as date_parser
import requests
def extract_time_from_single_job(job):
"""Extract time info from a single job in a GitHub Actions workflow run"""
job_info = {}
start = job["started_at"]
end = job["completed_at"]
start_datetime ... | transformers/utils/get_github_job_time.py/0 | {
"file_path": "transformers/utils/get_github_job_time.py",
"repo_id": "transformers",
"token_count": 835
} | 618 |
"""An internal script to process `new_failures_with_bad_commit.json` produced by `utils/check_bad_commit.py`.
This is used by `.github/workflows/check_failed_model_tests.yml` to produce a slack report of the following form
```
<{url}|New failed tests>
{
"GH_ydshieh": {
"vit": 1
}
}
```
"""
import json
i... | transformers/utils/process_bad_commit_report.py/0 | {
"file_path": "transformers/utils/process_bad_commit_report.py",
"repo_id": "transformers",
"token_count": 2021
} | 619 |
from transformers import ProcessorMixin
class CustomProcessor(ProcessorMixin):
feature_extractor_class = "AutoFeatureExtractor"
tokenizer_class = "AutoTokenizer"
| transformers/utils/test_module/custom_processing.py/0 | {
"file_path": "transformers/utils/test_module/custom_processing.py",
"repo_id": "transformers",
"token_count": 51
} | 620 |
# Distributing Training
<Tip warning={true}>
Section under construction. Feel free to contribute!
</Tip>
## Multi-GPU Training with TRL
The trainers in TRL use [🤗 Accelerate](https://github.com/huggingface/accelerate) to enable distributed training across multiple GPUs or nodes. To do so, first create an [🤗 Accele... | trl/docs/source/distributing_training.md/0 | {
"file_path": "trl/docs/source/distributing_training.md",
"repo_id": "trl",
"token_count": 736
} | 621 |
# Speeding Up Training
<Tip warning={true}>
Section under construction. Feel free to contribute!
</Tip>
## vLLM for fast generation in online methods
Online methods such as GRPO or Online DPO require the model to generate completions, which is often a slow process and can significantly impact training time.
To spe... | trl/docs/source/speeding_up_training.md/0 | {
"file_path": "trl/docs/source/speeding_up_training.md",
"repo_id": "trl",
"token_count": 627
} | 622 |
# Copyright 2020-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 appl... | trl/examples/datasets/llava_instruct_mix.py/0 | {
"file_path": "trl/examples/datasets/llava_instruct_mix.py",
"repo_id": "trl",
"token_count": 1514
} | 623 |
# Copyright 2020-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 appl... | trl/examples/research_projects/layer_skip/scripts/benchmark_layer_skip.py/0 | {
"file_path": "trl/examples/research_projects/layer_skip/scripts/benchmark_layer_skip.py",
"repo_id": "trl",
"token_count": 1032
} | 624 |
# Copyright 2020-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 appl... | trl/examples/scripts/alignprop.py/0 | {
"file_path": "trl/examples/scripts/alignprop.py",
"repo_id": "trl",
"token_count": 2068
} | 625 |
# Copyright 2020-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 appl... | trl/examples/scripts/ppo/ppo.py/0 | {
"file_path": "trl/examples/scripts/ppo/ppo.py",
"repo_id": "trl",
"token_count": 2452
} | 626 |
# Copyright 2020-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 appl... | trl/scripts/generate_harmony_dataset.py/0 | {
"file_path": "trl/scripts/generate_harmony_dataset.py",
"repo_id": "trl",
"token_count": 5240
} | 627 |
# Copyright 2020-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 appl... | trl/tests/slow/testing_constants.py/0 | {
"file_path": "trl/tests/slow/testing_constants.py",
"repo_id": "trl",
"token_count": 344
} | 628 |
# Copyright 2020-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 appl... | trl/tests/test_grpo_trainer.py/0 | {
"file_path": "trl/tests/test_grpo_trainer.py",
"repo_id": "trl",
"token_count": 40987
} | 629 |
# Copyright 2020-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 appl... | trl/trl/core.py/0 | {
"file_path": "trl/trl/core.py",
"repo_id": "trl",
"token_count": 2391
} | 630 |
# Copyright 2020-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 appl... | trl/trl/models/utils.py/0 | {
"file_path": "trl/trl/models/utils.py",
"repo_id": "trl",
"token_count": 9219
} | 631 |
# Copyright 2020-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 appl... | trl/trl/trainer/alignprop_trainer.py/0 | {
"file_path": "trl/trl/trainer/alignprop_trainer.py",
"repo_id": "trl",
"token_count": 8589
} | 632 |
# Copyright 2020-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 appl... | trl/trl/trainer/judges.py/0 | {
"file_path": "trl/trl/trainer/judges.py",
"repo_id": "trl",
"token_count": 7504
} | 633 |
# Copyright 2020-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 appl... | trl/trl/trainer/rloo_config.py/0 | {
"file_path": "trl/trl/trainer/rloo_config.py",
"repo_id": "trl",
"token_count": 1802
} | 634 |
# AI Agent Observability & Evaluation

Welcome to **Bonus Unit 2**! In this chapter, you'll explore advanced strategies for observing, evaluating, and ultimately improving the performance of ... | agents-course/units/en/bonus-unit2/introduction.mdx/0 | {
"file_path": "agents-course/units/en/bonus-unit2/introduction.mdx",
"repo_id": "agents-course",
"token_count": 426
} | 0 |
# Understanding AI Agents through the Thought-Action-Observation Cycle
<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit1/whiteboard-check-3.jpg" alt="Unit 1 planning"/>
In the previous sections, we learned:
- **How tools are made available to the agent in the system prompt**... | agents-course/units/en/unit1/agent-steps-and-structure.mdx/0 | {
"file_path": "agents-course/units/en/unit1/agent-steps-and-structure.mdx",
"repo_id": "agents-course",
"token_count": 1797
} | 1 |
# Conclusion
Congratulations on finishing the `LangGraph` module of this second Unit! 🥳
You've now mastered the fundamentals of building structured workflows with LangGraph which you will be able to send to production.
This module is just the beginning of your journey with LangGraph. For more advanced topics, we re... | agents-course/units/en/unit2/langgraph/conclusion.mdx/0 | {
"file_path": "agents-course/units/en/unit2/langgraph/conclusion.mdx",
"repo_id": "agents-course",
"token_count": 299
} | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.