text
stringlengths
7
318k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
439
# 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/owlv2/image_processing_owlv2.py/0
{ "file_path": "transformers/src/transformers/models/owlv2/image_processing_owlv2.py", "repo_id": "transformers", "token_count": 11225 }
352
# coding=utf-8 # Copyright 2021 Deepmind 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/src/transformers/models/perceiver/modeling_perceiver.py/0
{ "file_path": "transformers/src/transformers/models/perceiver/modeling_perceiver.py", "repo_id": "transformers", "token_count": 62743 }
353
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. & Google 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/pix2struct/modeling_pix2struct.py/0
{ "file_path": "transformers/src/transformers/models/pix2struct/modeling_pix2struct.py", "repo_id": "transformers", "token_count": 35764 }
354
# coding=utf-8 # Copyright 2023 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/pop2piano/feature_extraction_pop2piano.py/0
{ "file_path": "transformers/src/transformers/models/pop2piano/feature_extraction_pop2piano.py", "repo_id": "transformers", "token_count": 8827 }
355
# coding=utf-8 # Copyright The HuggingFace Team 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/LICE...
transformers/src/transformers/models/rembert/configuration_rembert.py/0
{ "file_path": "transformers/src/transformers/models/rembert/configuration_rembert.py", "repo_id": "transformers", "token_count": 2855 }
356
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors 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 cop...
transformers/src/transformers/models/roberta/modeling_roberta.py/0
{ "file_path": "transformers/src/transformers/models/roberta/modeling_roberta.py", "repo_id": "transformers", "token_count": 30190 }
357
# 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/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 776 }
358
# coding=utf-8 # Copyright 2023 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/LICEN...
transformers/src/transformers/models/sam/modeling_tf_sam.py/0
{ "file_path": "transformers/src/transformers/models/sam/modeling_tf_sam.py", "repo_id": "transformers", "token_count": 33371 }
359
# 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/segformer/convert_segformer_original_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/segformer/convert_segformer_original_to_pytorch.py", "repo_id": "transformers", "token_count": 8906 }
360
# 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/src/transformers/models/siglip/image_processing_siglip.py/0
{ "file_path": "transformers/src/transformers/models/siglip/image_processing_siglip.py", "repo_id": "transformers", "token_count": 4605 }
361
# 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_to_text/processing_speech_to_text.py/0
{ "file_path": "transformers/src/transformers/models/speech_to_text/processing_speech_to_text.py", "repo_id": "transformers", "token_count": 1792 }
362
# 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/src/transformers/models/splinter/__init__.py/0
{ "file_path": "transformers/src/transformers/models/splinter/__init__.py", "repo_id": "transformers", "token_count": 927 }
363
# coding=utf-8 # Copyright 2022 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/swin/convert_swin_simmim_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/swin/convert_swin_simmim_to_pytorch.py", "repo_id": "transformers", "token_count": 2896 }
364
# coding=utf-8 # Copyright 2022 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/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 3257 }
365
# 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/timm_backbone/configuration_timm_backbone.py/0
{ "file_path": "transformers/src/transformers/models/timm_backbone/configuration_timm_backbone.py", "repo_id": "transformers", "token_count": 1106 }
366
# coding=utf-8 # Copyright 2023 The Intel AIA Team Authors, and 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/lice...
transformers/src/transformers/models/tvp/modeling_tvp.py/0
{ "file_path": "transformers/src/transformers/models/tvp/modeling_tvp.py", "repo_id": "transformers", "token_count": 16441 }
367
# 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": 2525 }
368
# 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/vilt/configuration_vilt.py/0
{ "file_path": "transformers/src/transformers/models/vilt/configuration_vilt.py", "repo_id": "transformers", "token_count": 2640 }
369
# coding=utf-8 # Copyright 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 requir...
transformers/src/transformers/models/vision_text_dual_encoder/configuration_vision_text_dual_encoder.py/0
{ "file_path": "transformers/src/transformers/models/vision_text_dual_encoder/configuration_vision_text_dual_encoder.py", "repo_id": "transformers", "token_count": 1524 }
370
# coding=utf-8 # Copyright 2021 Google AI, Ross Wightman, 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/license...
transformers/src/transformers/models/vit/modeling_tf_vit.py/0
{ "file_path": "transformers/src/transformers/models/vit/modeling_tf_vit.py", "repo_id": "transformers", "token_count": 15720 }
371
# coding=utf-8 # Copyright 2023 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/vivit/image_processing_vivit.py/0
{ "file_path": "transformers/src/transformers/models/vivit/image_processing_vivit.py", "repo_id": "transformers", "token_count": 8101 }
372
# 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/wav2vec2_bert/processing_wav2vec2_bert.py/0
{ "file_path": "transformers/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py", "repo_id": "transformers", "token_count": 2889 }
373
#!/usr/bin/env python """Converts a Whisper model in OpenAI format to Hugging Face format.""" # Copyright 2022 The HuggingFace Inc. team and the OpenAI 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 ...
transformers/src/transformers/models/whisper/convert_openai_to_hf.py/0
{ "file_path": "transformers/src/transformers/models/whisper/convert_openai_to_hf.py", "repo_id": "transformers", "token_count": 6393 }
374
# coding=utf-8 # Copyright 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 requir...
transformers/src/transformers/models/xglm/configuration_xglm.py/0
{ "file_path": "transformers/src/transformers/models/xglm/configuration_xglm.py", "repo_id": "transformers", "token_count": 2346 }
375
# coding=utf-8 # Copyright 2020 The Microsoft Authors 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 # # Unl...
transformers/src/transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py/0
{ "file_path": "transformers/src/transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py", "repo_id": "transformers", "token_count": 5985 }
376
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors 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 Lice...
transformers/src/transformers/models/xlnet/modeling_xlnet.py/0
{ "file_path": "transformers/src/transformers/models/xlnet/modeling_xlnet.py", "repo_id": "transformers", "token_count": 41780 }
377
# coding=utf-8 # Copyright 2022 University of Wisconsin-Madison 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.o...
transformers/src/transformers/models/yoso/modeling_yoso.py/0
{ "file_path": "transformers/src/transformers/models/yoso/modeling_yoso.py", "repo_id": "transformers", "token_count": 23753 }
378
# Copyright 2022 The Impira Team 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 r...
transformers/src/transformers/pipelines/document_question_answering.py/0
{ "file_path": "transformers/src/transformers/pipelines/document_question_answering.py", "repo_id": "transformers", "token_count": 10332 }
379
import types import warnings from typing import List, Optional, Tuple, Union 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, Da...
transformers/src/transformers/pipelines/token_classification.py/0
{ "file_path": "transformers/src/transformers/pipelines/token_classification.py", "repo_id": "transformers", "token_count": 11839 }
380
#!/usr/bin/env python # 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/L...
transformers/src/transformers/tools/evaluate_agent.py/0
{ "file_path": "transformers/src/transformers/tools/evaluate_agent.py", "repo_id": "transformers", "token_count": 10886 }
381
# coding=utf-8 # Copyright 2020-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 ap...
transformers/src/transformers/trainer_utils.py/0
{ "file_path": "transformers/src/transformers/trainer_utils.py", "repo_id": "transformers", "token_count": 11573 }
382
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class AlbertTokenizer(metaclass=DummyObject): _backends = ["sentencepiece"] def __init__(self, *args, **kwargs): requires_backends(self, ["sentencepiece"]) class BarthezTok...
transformers/src/transformers/utils/dummy_sentencepiece_objects.py/0
{ "file_path": "transformers/src/transformers/utils/dummy_sentencepiece_objects.py", "repo_id": "transformers", "token_count": 2376 }
383
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: sentencepiece_model.proto # 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 th...
transformers/src/transformers/utils/sentencepiece_model_pb2.py/0
{ "file_path": "transformers/src/transformers/utils/sentencepiece_model_pb2.py", "repo_id": "transformers", "token_count": 28261 }
384
# coding=utf-8 # Copyright 2022 {{cookiecutter.authors}} 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...
transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py/0
{ "file_path": "transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py", "repo_id": "transformers", "token_count": 65421 }
385
{ "modelname": "TemplateBI", "uppercase_modelname": "TEMPLATE_BI", "lowercase_modelname": "template_bi", "camelcase_modelname": "TemplateBi", "authors": "The HuggingFace Team", "checkpoint_identifier": "bi-brand-new-bert-base-cased", "tokenizer_type": "Standalone", "generate_tensorflow_pytorch_and_flax"...
transformers/templates/adding_a_new_model/tests/standalone.json/0
{ "file_path": "transformers/templates/adding_a_new_model/tests/standalone.json", "repo_id": "transformers", "token_count": 155 }
386
{ "model_type": "roberta" }
transformers/tests/fixtures/dummy-config.json/0
{ "file_path": "transformers/tests/fixtures/dummy-config.json", "repo_id": "transformers", "token_count": 15 }
387
# coding=utf-8 # Copyright 2020 The HuggingFace Team 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 clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
transformers/tests/generation/test_logits_process.py/0
{ "file_path": "transformers/tests/generation/test_logits_process.py", "repo_id": "transformers", "token_count": 16668 }
388
# 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/tests/models/altclip/test_modeling_altclip.py/0
{ "file_path": "transformers/tests/models/altclip/test_modeling_altclip.py", "repo_id": "transformers", "token_count": 9801 }
389
# 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/blenderbot_small/test_modeling_tf_blenderbot_small.py/0
{ "file_path": "transformers/tests/models/blenderbot_small/test_modeling_tf_blenderbot_small.py", "repo_id": "transformers", "token_count": 4273 }
390
# 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/tests/models/chinese_clip/test_modeling_chinese_clip.py/0
{ "file_path": "transformers/tests/models/chinese_clip/test_modeling_chinese_clip.py", "repo_id": "transformers", "token_count": 12666 }
391
# 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/detr/test_modeling_detr.py/0
{ "file_path": "transformers/tests/models/detr/test_modeling_detr.py", "repo_id": "transformers", "token_count": 12983 }
392
# coding=utf-8 # Copyright 2022 Meta Platforms 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/licens...
transformers/tests/models/flava/test_modeling_flava.py/0
{ "file_path": "transformers/tests/models/flava/test_modeling_flava.py", "repo_id": "transformers", "token_count": 25176 }
393
# 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/tests/models/fuyu/test_modeling_fuyu.py/0
{ "file_path": "transformers/tests/models/fuyu/test_modeling_fuyu.py", "repo_id": "transformers", "token_count": 6740 }
394
# coding=utf-8 # Copyright 2023 Toshiyuki Sakamoto(tanreinama) and 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 # ...
transformers/tests/models/gptsan_japanese/test_tokenization_gptsan_japanese.py/0
{ "file_path": "transformers/tests/models/gptsan_japanese/test_tokenization_gptsan_japanese.py", "repo_id": "transformers", "token_count": 5044 }
395
# 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/idefics/test_processor_idefics.py/0
{ "file_path": "transformers/tests/models/idefics/test_processor_idefics.py", "repo_id": "transformers", "token_count": 2692 }
396
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors, The Hugging Face 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/license...
transformers/tests/models/layoutlm/test_modeling_layoutlm.py/0
{ "file_path": "transformers/tests/models/layoutlm/test_modeling_layoutlm.py", "repo_id": "transformers", "token_count": 8034 }
397
# 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/tests/models/maskformer/test_modeling_maskformer.py/0
{ "file_path": "transformers/tests/models/maskformer/test_modeling_maskformer.py", "repo_id": "transformers", "token_count": 10411 }
398
# 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/tests/models/mgp_str/test_modeling_mgp_str.py/0
{ "file_path": "transformers/tests/models/mgp_str/test_modeling_mgp_str.py", "repo_id": "transformers", "token_count": 4204 }
399
# 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/tests/models/mobilenet_v1/test_modeling_mobilenet_v1.py/0
{ "file_path": "transformers/tests/models/mobilenet_v1/test_modeling_mobilenet_v1.py", "repo_id": "transformers", "token_count": 3816 }
400
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
transformers/tests/models/openai/test_tokenization_openai.py/0
{ "file_path": "transformers/tests/models/openai/test_tokenization_openai.py", "repo_id": "transformers", "token_count": 2406 }
401
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team, The Microsoft Research 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 # # ...
transformers/tests/models/prophetnet/test_modeling_prophetnet.py/0
{ "file_path": "transformers/tests/models/prophetnet/test_modeling_prophetnet.py", "repo_id": "transformers", "token_count": 25713 }
402
# 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/tests/models/realm/test_modeling_realm.py/0
{ "file_path": "transformers/tests/models/realm/test_modeling_realm.py", "repo_id": "transformers", "token_count": 9513 }
403
# 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/tests/models/resnet/test_modeling_resnet.py/0
{ "file_path": "transformers/tests/models/resnet/test_modeling_resnet.py", "repo_id": "transformers", "token_count": 5143 }
404
# 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/roformer/test_modeling_roformer.py/0
{ "file_path": "transformers/tests/models/roformer/test_modeling_roformer.py", "repo_id": "transformers", "token_count": 11379 }
405
# 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/models/speech_to_text/test_feature_extraction_speech_to_text.py/0
{ "file_path": "transformers/tests/models/speech_to_text/test_feature_extraction_speech_to_text.py", "repo_id": "transformers", "token_count": 6315 }
406
# coding=utf-8 # Copyright 2020 The SqueezeBert authors 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 # # U...
transformers/tests/models/squeezebert/test_modeling_squeezebert.py/0
{ "file_path": "transformers/tests/models/squeezebert/test_modeling_squeezebert.py", "repo_id": "transformers", "token_count": 5314 }
407
# coding=utf-8 # Copyright 2018 Google T5 Authors and 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 requ...
transformers/tests/models/t5/test_modeling_t5.py/0
{ "file_path": "transformers/tests/models/t5/test_modeling_t5.py", "repo_id": "transformers", "token_count": 34412 }
408
# 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/trocr/test_modeling_trocr.py/0
{ "file_path": "transformers/tests/models/trocr/test_modeling_trocr.py", "repo_id": "transformers", "token_count": 3144 }
409
# 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/univnet/test_feature_extraction_univnet.py/0
{ "file_path": "transformers/tests/models/univnet/test_feature_extraction_univnet.py", "repo_id": "transformers", "token_count": 7246 }
410
# 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/tests/models/vit_mae/test_modeling_vit_mae.py/0
{ "file_path": "transformers/tests/models/vit_mae/test_modeling_vit_mae.py", "repo_id": "transformers", "token_count": 5323 }
411
# 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/wav2vec2/test_modeling_flax_wav2vec2.py/0
{ "file_path": "transformers/tests/models/wav2vec2/test_modeling_flax_wav2vec2.py", "repo_id": "transformers", "token_count": 11180 }
412
# coding=utf-8 # 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 requir...
transformers/tests/models/xlm/test_modeling_xlm.py/0
{ "file_path": "transformers/tests/models/xlm/test_modeling_xlm.py", "repo_id": "transformers", "token_count": 9334 }
413
# 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_depth_estimation.py/0
{ "file_path": "transformers/tests/pipelines/test_pipelines_depth_estimation.py", "repo_id": "transformers", "token_count": 1794 }
414
# 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_text_to_audio.py/0
{ "file_path": "transformers/tests/pipelines/test_pipelines_text_to_audio.py", "repo_id": "transformers", "token_count": 3815 }
415
# coding=utf-8 # 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 requir...
transformers/tests/quantization/gptq/test_gptq.py/0
{ "file_path": "transformers/tests/quantization/gptq/test_gptq.py", "repo_id": "transformers", "token_count": 7230 }
416
import json import os import subprocess import unittest from ast import literal_eval import pytest from parameterized import parameterized, parameterized_class from . import is_sagemaker_available if is_sagemaker_available(): from sagemaker import Session, TrainingJobAnalytics from sagemaker.huggingface imp...
transformers/tests/sagemaker/test_multi_node_model_parallel.py/0
{ "file_path": "transformers/tests/sagemaker/test_multi_node_model_parallel.py", "repo_id": "transformers", "token_count": 2097 }
417
# 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_modeling_utils.py/0
{ "file_path": "transformers/tests/test_modeling_utils.py", "repo_id": "transformers", "token_count": 42668 }
418
# 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_activations.py/0
{ "file_path": "transformers/tests/utils/test_activations.py", "repo_id": "transformers", "token_count": 1061 }
419
# 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/utils/test_model_card.py/0
{ "file_path": "transformers/tests/utils/test_model_card.py", "repo_id": "transformers", "token_count": 1475 }
420
# 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": 6546 }
421
# coding=utf-8 # Copyright 2023 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/get_test_info.py/0
{ "file_path": "transformers/utils/get_test_info.py", "repo_id": "transformers", "token_count": 2577 }
422
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 }
423
<div style="text-align: center"> <img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/trl_banner_dark.png"> </div> # TRL - Transformer Reinforcement Learning > Full stack transformer language models with reinforcement learning. <p align="center"> <a href="https://githu...
trl/README.md/0
{ "file_path": "trl/README.md", "repo_id": "trl", "token_count": 2437 }
424
# Builds GPU docker image of PyTorch # Uses multi-staged approach to reduce size # Stage 1 # Use base conda image to reduce time FROM continuumio/miniconda3:latest AS compile-image # Specify py version ENV PYTHON_VERSION=3.10 # Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/ac...
trl/docker/trl-latest-gpu/Dockerfile/0
{ "file_path": "trl/docker/trl-latest-gpu/Dockerfile", "repo_id": "trl", "token_count": 774 }
425
# Models With the `AutoModelForCausalLMWithValueHead` class TRL supports all decoder model architectures in transformers such as GPT-2, OPT, and GPT-Neo. In addition, with `AutoModelForSeq2SeqLMWithValueHead` you can use encoder-decoder architectures such as T5. TRL also requires reference models which are frozen copi...
trl/docs/source/models.mdx/0
{ "file_path": "trl/docs/source/models.mdx", "repo_id": "trl", "token_count": 283 }
426
# 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...
trl/examples/research_projects/tools/calculator.py/0
{ "file_path": "trl/examples/research_projects/tools/calculator.py", "repo_id": "trl", "token_count": 1439 }
427
# 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...
trl/tests/test_iterative_sft_trainer.py/0
{ "file_path": "trl/tests/test_iterative_sft_trainer.py", "repo_id": "trl", "token_count": 1898 }
428
# 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...
trl/trl/import_utils.py/0
{ "file_path": "trl/trl/import_utils.py", "repo_id": "trl", "token_count": 1125 }
429
# 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...
trl/trl/trainer/reward_trainer.py/0
{ "file_path": "trl/trl/trainer/reward_trainer.py", "repo_id": "trl", "token_count": 5849 }
430