text
stringlengths
96
319k
id
stringlengths
14
178
metadata
dict
# coding=utf-8 # 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 r...
transformers/tests/models/xglm/test_modeling_flax_xglm.py/0
{ "file_path": "transformers/tests/models/xglm/test_modeling_flax_xglm.py", "repo_id": "transformers", "token_count": 6875 }
# 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/zoedepth/test_modeling_zoedepth.py/0
{ "file_path": "transformers/tests/models/zoedepth/test_modeling_zoedepth.py", "repo_id": "transformers", "token_count": 6392 }
# 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/tests/pipelines/test_pipelines_image_text_to_text.py/0
{ "file_path": "transformers/tests/pipelines/test_pipelines_image_text_to_text.py", "repo_id": "transformers", "token_count": 6793 }
# 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/pipelines/test_pipelines_zero_shot.py/0
{ "file_path": "transformers/tests/pipelines/test_pipelines_zero_shot.py", "repo_id": "transformers", "token_count": 7368 }
import gc import unittest from transformers import AutoModelForCausalLM from transformers.testing_utils import require_compressed_tensors, require_torch from transformers.utils import is_torch_available if is_torch_available(): import torch @require_compressed_tensors @require_torch class CompressedTensorsTest...
transformers/tests/quantization/compressed_tensor/test_load_sparse_model.py/0
{ "file_path": "transformers/tests/quantization/compressed_tensor/test_load_sparse_model.py", "repo_id": "transformers", "token_count": 1238 }
# coding=utf-8 # 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 requir...
transformers/tests/quantization/torchao_integration/test_torchao.py/0
{ "file_path": "transformers/tests/quantization/torchao_integration/test_torchao.py", "repo_id": "transformers", "token_count": 5719 }
import argparse import logging import sys import time import tensorflow as tf from datasets import load_dataset from packaging.version import parse from transformers import AutoTokenizer, TFAutoModelForSequenceClassification try: import tf_keras as keras except (ModuleNotFoundError, ImportError): import ker...
transformers/tests/sagemaker/scripts/tensorflow/run_tf.py/0
{ "file_path": "transformers/tests/sagemaker/scripts/tensorflow/run_tf.py", "repo_id": "transformers", "token_count": 1582 }
# coding=utf-8 # Copyright 2019 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 ag...
transformers/tests/test_tokenization_common.py/0
{ "file_path": "transformers/tests/test_tokenization_common.py", "repo_id": "transformers", "token_count": 123264 }
# coding=utf-8 # Copyright 2021 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 ag...
transformers/tests/utils/test_feature_extraction_utils.py/0
{ "file_path": "transformers/tests/utils/test_feature_extraction_utils.py", "repo_id": "transformers", "token_count": 2360 }
# 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_offline.py/0
{ "file_path": "transformers/tests/utils/test_offline.py", "repo_id": "transformers", "token_count": 2964 }
# coding=utf-8 # 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...
transformers/utils/check_inits.py/0
{ "file_path": "transformers/utils/check_inits.py", "repo_id": "transformers", "token_count": 6585 }
# 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/utils/process_test_artifacts.py/0
{ "file_path": "transformers/utils/process_test_artifacts.py", "repo_id": "transformers", "token_count": 939 }
# 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/utils/tests_fetcher.py/0
{ "file_path": "transformers/utils/tests_fetcher.py", "repo_id": "transformers", "token_count": 21810 }
# Judges <Tip warning={true}> TRL Judges is an experimental API which is subject to change at any time. </Tip> TRL provides judges to easily compare two completions. Make sure to have installed the required dependencies by running: ```bash pip install trl[judges] ``` ## Using the provided judges TRL provides se...
trl/docs/source/judges.md/0
{ "file_path": "trl/docs/source/judges.md", "repo_id": "trl", "token_count": 732 }
# 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...
trl/examples/scripts/alignprop.py/0
{ "file_path": "trl/examples/scripts/alignprop.py", "repo_id": "trl", "token_count": 2005 }
# 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...
trl/examples/scripts/reward_modeling.py/0
{ "file_path": "trl/examples/scripts/reward_modeling.py", "repo_id": "trl", "token_count": 1826 }
# 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...
trl/setup.py/0
{ "file_path": "trl/setup.py", "repo_id": "trl", "token_count": 1874 }
# 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...
trl/tests/test_data_utils.py/0
{ "file_path": "trl/tests/test_data_utils.py", "repo_id": "trl", "token_count": 7793 }
# 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...
trl/tests/test_ppo_trainer.py/0
{ "file_path": "trl/tests/test_ppo_trainer.py", "repo_id": "trl", "token_count": 4421 }
# 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...
trl/trl/environment/base_environment.py/0
{ "file_path": "trl/trl/environment/base_environment.py", "repo_id": "trl", "token_count": 7817 }
# 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...
trl/trl/scripts/env.py/0
{ "file_path": "trl/trl/scripts/env.py", "repo_id": "trl", "token_count": 1096 }
# 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...
trl/trl/trainer/dpo_config.py/0
{ "file_path": "trl/trl/trainer/dpo_config.py", "repo_id": "trl", "token_count": 8149 }