text stringlengths 7 1.24M | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 519 |
|---|---|---|---|
import copy
import importlib.metadata
import json
import os
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Union
import torch
from packaging import version
from .configuration_utils import PretrainedConfig
from .utils import is_hqq_available, is_quanto_available, is_torchdynamo... | transformers/src/transformers/cache_utils.py/0 | {
"file_path": "transformers/src/transformers/cache_utils.py",
"repo_id": "transformers",
"token_count": 39331
} | 343 |
# coding=utf-8
# Copyright 2018 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/convert_slow_tokenizer.py/0 | {
"file_path": "transformers/src/transformers/convert_slow_tokenizer.py",
"repo_id": "transformers",
"token_count": 28564
} | 344 |
# 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/debug_utils.py/0 | {
"file_path": "transformers/src/transformers/debug_utils.py",
"repo_id": "transformers",
"token_count": 5154
} | 345 |
import time
import warnings
from abc import ABC
from collections import OrderedDict
from copy import deepcopy
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import torch
from torch.nn import functional as F
from ..pytorch_utils import isin_mps_friendly
from ..tokenization_utils_base import P... | transformers/src/transformers/generation/stopping_criteria.py/0 | {
"file_path": "transformers/src/transformers/generation/stopping_criteria.py",
"repo_id": "transformers",
"token_count": 10080
} | 346 |
import importlib.metadata
import inspect
import warnings
from copy import deepcopy
from inspect import signature
from packaging import version
from ..utils import is_accelerate_available, is_bitsandbytes_available, logging
if is_bitsandbytes_available():
import bitsandbytes as bnb
import torch
import to... | transformers/src/transformers/integrations/bitsandbytes.py/0 | {
"file_path": "transformers/src/transformers/integrations/bitsandbytes.py",
"repo_id": "transformers",
"token_count": 9328
} | 347 |
#include <stdio.h>
#include <assert.h>
#define MIN_VALUE (-1e38)
template <typename F>
__global__ void kernel_forward(
const int B, const int T, const int C, const F *__restrict__ const _w, const F *__restrict__ const _u,
const F *__restrict__ const _k, const F *__restrict__ const _v, F *__restrict__ const _y... | transformers/src/transformers/kernels/rwkv/wkv_cuda.cu/0 | {
"file_path": "transformers/src/transformers/kernels/rwkv/wkv_cuda.cu",
"repo_id": "transformers",
"token_count": 3131
} | 348 |
# coding=utf-8
# Copyright 2021 The Google Flax Team 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
... | transformers/src/transformers/modeling_flax_utils.py/0 | {
"file_path": "transformers/src/transformers/modeling_flax_utils.py",
"repo_id": "transformers",
"token_count": 27449
} | 349 |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain 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/src/transformers/models/albert/tokenization_albert_fast.py/0 | {
"file_path": "transformers/src/transformers/models/albert/tokenization_albert_fast.py",
"repo_id": "transformers",
"token_count": 3573
} | 350 |
# 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/auto/auto_factory.py/0 | {
"file_path": "transformers/src/transformers/models/auto/auto_factory.py",
"repo_id": "transformers",
"token_count": 17252
} | 351 |
# coding=utf-8
# Copyright 2023 The Suno AI Authors and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | transformers/src/transformers/models/bark/modeling_bark.py/0 | {
"file_path": "transformers/src/transformers/models/bark/modeling_bark.py",
"repo_id": "transformers",
"token_count": 34811
} | 352 |
# coding=utf-8
# Copyright Microsoft Research and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | transformers/src/transformers/models/beit/configuration_beit.py/0 | {
"file_path": "transformers/src/transformers/models/beit/configuration_beit.py",
"repo_id": "transformers",
"token_count": 4417
} | 353 |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain 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/src/transformers/models/big_bird/tokenization_big_bird_fast.py/0 | {
"file_path": "transformers/src/transformers/models/big_bird/tokenization_big_bird_fast.py",
"repo_id": "transformers",
"token_count": 4141
} | 354 |
# coding=utf-8
# Copyright 2021 The Facebook, Inc. 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/src/transformers/models/blenderbot/configuration_blenderbot.py/0 | {
"file_path": "transformers/src/transformers/models/blenderbot/configuration_blenderbot.py",
"repo_id": "transformers",
"token_count": 8279
} | 355 |
# 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/blip/convert_blip_original_pytorch_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/blip/convert_blip_original_pytorch_to_hf.py",
"repo_id": "transformers",
"token_count": 2801
} | 356 |
# coding=utf-8
# Copyright 2023 HuggingFace Inc. Team and Bigscience Workshop. 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/bloom/modeling_flax_bloom.py/0 | {
"file_path": "transformers/src/transformers/models/bloom/modeling_flax_bloom.py",
"repo_id": "transformers",
"token_count": 12766
} | 357 |
# Copyright 2022 The OFA-Sys Team 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
#
#... | transformers/src/transformers/models/chinese_clip/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/chinese_clip/__init__.py",
"repo_id": "transformers",
"token_count": 984
} | 358 |
# 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/clvp/feature_extraction_clvp.py/0 | {
"file_path": "transformers/src/transformers/models/clvp/feature_extraction_clvp.py",
"repo_id": "transformers",
"token_count": 4457
} | 359 |
# coding=utf-8
# Copyright 2024 Cohere 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/src/transformers/models/cohere/tokenization_cohere_fast.py/0 | {
"file_path": "transformers/src/transformers/models/cohere/tokenization_cohere_fast.py",
"repo_id": "transformers",
"token_count": 11021
} | 360 |
# 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/convnext/convert_convnext_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/convnext/convert_convnext_to_pytorch.py",
"repo_id": "transformers",
"token_count": 4224
} | 361 |
# coding=utf-8
# Copyright 2022 The OpenBMB 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/LIC... | transformers/src/transformers/models/cpmant/tokenization_cpmant.py/0 | {
"file_path": "transformers/src/transformers/models/cpmant/tokenization_cpmant.py",
"repo_id": "transformers",
"token_count": 4386
} | 362 |
# 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/src/transformers/models/data2vec/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/data2vec/__init__.py",
"repo_id": "transformers",
"token_count": 1830
} | 363 |
# coding=utf-8
# Copyright 2020 Microsoft and the Hugging Face 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 require... | transformers/src/transformers/models/deberta/modeling_deberta.py/0 | {
"file_path": "transformers/src/transformers/models/deberta/modeling_deberta.py",
"repo_id": "transformers",
"token_count": 25610
} | 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/deprecated/deta/convert_deta_resnet_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/deta/convert_deta_resnet_to_pytorch.py",
"repo_id": "transformers",
"token_count": 7793
} | 365 |
# 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/deprecated/gptsan_japanese/convert_gptsan_tf_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/gptsan_japanese/convert_gptsan_tf_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 5113
} | 366 |
# 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/deprecated/mctct/modeling_mctct.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/mctct/modeling_mctct.py",
"repo_id": "transformers",
"token_count": 13962
} | 367 |
# coding=utf-8
# Copyright 2023 EleutherAI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to G... | transformers/src/transformers/models/deprecated/open_llama/configuration_open_llama.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/open_llama/configuration_open_llama.py",
"repo_id": "transformers",
"token_count": 3009
} | 368 |
# 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/deprecated/speech_to_text_2/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/speech_to_text_2/__init__.py",
"repo_id": "transformers",
"token_count": 698
} | 369 |
# 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/deprecated/transfo_xl/modeling_transfo_xl.py/0 | {
"file_path": "transformers/src/transformers/models/deprecated/transfo_xl/modeling_transfo_xl.py",
"repo_id": "transformers",
"token_count": 25694
} | 370 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team, 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/licenses/LICENSE-2.0
#
# Unless... | transformers/src/transformers/models/dpr/tokenization_dpr.py/0 | {
"file_path": "transformers/src/transformers/models/dpr/tokenization_dpr.py",
"repo_id": "transformers",
"token_count": 6423
} | 371 |
# coding=utf-8
# Copyright 2023 Google Research, Inc. 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/license... | transformers/src/transformers/models/efficientnet/modeling_efficientnet.py/0 | {
"file_path": "transformers/src/transformers/models/efficientnet/modeling_efficientnet.py",
"repo_id": "transformers",
"token_count": 10352
} | 372 |
# coding=utf-8
# Copyright 2018 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/encoder_decoder/modeling_encoder_decoder.py/0 | {
"file_path": "transformers/src/transformers/models/encoder_decoder/modeling_encoder_decoder.py",
"repo_id": "transformers",
"token_count": 14869
} | 373 |
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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/src/transformers/models/esm/openfold_utils/loss.py/0 | {
"file_path": "transformers/src/transformers/models/esm/openfold_utils/loss.py",
"repo_id": "transformers",
"token_count": 1389
} | 374 |
# 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/fastspeech2_conformer/convert_hifigan.py/0 | {
"file_path": "transformers/src/transformers/models/fastspeech2_conformer/convert_hifigan.py",
"repo_id": "transformers",
"token_count": 2201
} | 375 |
# coding=utf-8
# 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/LI... | transformers/src/transformers/models/flava/processing_flava.py/0 | {
"file_path": "transformers/src/transformers/models/flava/processing_flava.py",
"repo_id": "transformers",
"token_count": 2767
} | 376 |
# 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/models/funnel/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/funnel/__init__.py",
"repo_id": "transformers",
"token_count": 1587
} | 377 |
# coding=utf-8
# Copyright 2024 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/gemma/diff_gemma.py/0 | {
"file_path": "transformers/src/transformers/models/gemma/diff_gemma.py",
"repo_id": "transformers",
"token_count": 11831
} | 378 |
# coding=utf-8
# Copyright 2022 KAIST 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/glpn/configuration_glpn.py/0 | {
"file_path": "transformers/src/transformers/models/glpn/configuration_glpn.py",
"repo_id": "transformers",
"token_count": 2344
} | 379 |
# coding=utf-8
# Copyright 2023 The BigCode team 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 requi... | transformers/src/transformers/models/gpt_bigcode/configuration_gpt_bigcode.py/0 | {
"file_path": "transformers/src/transformers/models/gpt_bigcode/configuration_gpt_bigcode.py",
"repo_id": "transformers",
"token_count": 2455
} | 380 |
# Copyright 2022 The HuggingFace Inc. team and the AI-Sweden 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/gpt_sw3/convert_megatron_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/gpt_sw3/convert_megatron_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3465
} | 381 |
# 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/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 982
} | 382 |
# coding=utf-8
# Copyright 2021 The OpenAI Team 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/L... | transformers/src/transformers/models/idefics/vision_tf.py/0 | {
"file_path": "transformers/src/transformers/models/idefics/vision_tf.py",
"repo_id": "transformers",
"token_count": 11478
} | 383 |
# coding=utf-8
# Copyright 2024 JetMoe AI and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | transformers/src/transformers/models/jetmoe/configuration_jetmoe.py/0 | {
"file_path": "transformers/src/transformers/models/jetmoe/configuration_jetmoe.py",
"repo_id": "transformers",
"token_count": 2636
} | 384 |
# 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/layoutlmv2/image_processing_layoutlmv2.py/0 | {
"file_path": "transformers/src/transformers/models/layoutlmv2/image_processing_layoutlmv2.py",
"repo_id": "transformers",
"token_count": 5608
} | 385 |
# 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/layoutxlm/tokenization_layoutxlm.py/0 | {
"file_path": "transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm.py",
"repo_id": "transformers",
"token_count": 26006
} | 386 |
# 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/lilt/modeling_lilt.py/0 | {
"file_path": "transformers/src/transformers/models/lilt/modeling_lilt.py",
"repo_id": "transformers",
"token_count": 22207
} | 387 |
# 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/llava_next/image_processing_llava_next.py/0 | {
"file_path": "transformers/src/transformers/models/llava_next/image_processing_llava_next.py",
"repo_id": "transformers",
"token_count": 15501
} | 388 |
# coding=utf-8
# Copyright 2022 Meta Platforms, Inc. 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... | transformers/src/transformers/models/mask2former/convert_mask2former_original_pytorch_checkpoint_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/mask2former/convert_mask2former_original_pytorch_checkpoint_to_pytorch.py",
"repo_id": "transformers",
"token_count": 24038
} | 389 |
# coding=utf-8
# Copyright 2021, The Facebook AI Research 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.or... | transformers/src/transformers/models/mbart/modeling_flax_mbart.py/0 | {
"file_path": "transformers/src/transformers/models/mbart/modeling_flax_mbart.py",
"repo_id": "transformers",
"token_count": 32783
} | 390 |
# 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/mgp_str/configuration_mgp_str.py/0 | {
"file_path": "transformers/src/transformers/models/mgp_str/configuration_mgp_str.py",
"repo_id": "transformers",
"token_count": 2242
} | 391 |
# coding=utf-8
# Copyright 2020 Mesh TensorFlow authors, 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... | transformers/src/transformers/models/mt5/modeling_tf_mt5.py/0 | {
"file_path": "transformers/src/transformers/models/mt5/modeling_tf_mt5.py",
"repo_id": "transformers",
"token_count": 1102
} | 392 |
# 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/nougat/tokenization_nougat_fast.py/0 | {
"file_path": "transformers/src/transformers/models/nougat/tokenization_nougat_fast.py",
"repo_id": "transformers",
"token_count": 10406
} | 393 |
# coding=utf-8
# Copyright 2018 The OpenAI Team Authors and 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 License... | transformers/src/transformers/models/openai/configuration_openai.py/0 | {
"file_path": "transformers/src/transformers/models/openai/configuration_openai.py",
"repo_id": "transformers",
"token_count": 2744
} | 394 |
# coding=utf-8
# Copyright 2023 IBM 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/licenses/LICENSE-2.0
#
# Unle... | transformers/src/transformers/models/patchtsmixer/modeling_patchtsmixer.py/0 | {
"file_path": "transformers/src/transformers/models/patchtsmixer/modeling_patchtsmixer.py",
"repo_id": "transformers",
"token_count": 38067
} | 395 |
# coding=utf-8
# Copyright 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/configuration_perceiver.py/0 | {
"file_path": "transformers/src/transformers/models/perceiver/configuration_perceiver.py",
"repo_id": "transformers",
"token_count": 4640
} | 396 |
# coding=utf-8
# Copyright 2024 Microsoft 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.... | transformers/src/transformers/models/phi3/modeling_phi3.py/0 | {
"file_path": "transformers/src/transformers/models/phi3/modeling_phi3.py",
"repo_id": "transformers",
"token_count": 31980
} | 397 |
# 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/poolformer/convert_poolformer_original_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/poolformer/convert_poolformer_original_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3259
} | 398 |
# coding=utf-8
# Copyright 2023 Authors: Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan,
# Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao 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... | transformers/src/transformers/models/pvt/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/pvt/__init__.py",
"repo_id": "transformers",
"token_count": 817
} | 399 |
# 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/qwen2_audio/modeling_qwen2_audio.py/0 | {
"file_path": "transformers/src/transformers/models/qwen2_audio/modeling_qwen2_audio.py",
"repo_id": "transformers",
"token_count": 29677
} | 400 |
# coding=utf-8
# Copyright 2022 Meta Platforms, Inc. 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... | transformers/src/transformers/models/regnet/modeling_tf_regnet.py/0 | {
"file_path": "transformers/src/transformers/models/regnet/modeling_tf_regnet.py",
"repo_id": "transformers",
"token_count": 10422
} | 401 |
# 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/seamless_m4t/processing_seamless_m4t.py/0 | {
"file_path": "transformers/src/transformers/models/seamless_m4t/processing_seamless_m4t.py",
"repo_id": "transformers",
"token_count": 2298
} | 402 |
# 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": 4276
} | 403 |
# 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/siglip/processing_siglip.py/0 | {
"file_path": "transformers/src/transformers/models/siglip/processing_siglip.py",
"repo_id": "transformers",
"token_count": 2775
} | 404 |
# 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/speecht5/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/speecht5/__init__.py",
"repo_id": "transformers",
"token_count": 1042
} | 405 |
# 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/src/transformers/models/squeezebert/modeling_squeezebert.py/0 | {
"file_path": "transformers/src/transformers/models/squeezebert/modeling_squeezebert.py",
"repo_id": "transformers",
"token_count": 18998
} | 406 |
# 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/swiftformer/convert_swiftformer_original_to_hf.py/0 | {
"file_path": "transformers/src/transformers/models/swiftformer/convert_swiftformer_original_to_hf.py",
"repo_id": "transformers",
"token_count": 2556
} | 407 |
# 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/swinv2/convert_swinv2_timm_to_pytorch.py/0 | {
"file_path": "transformers/src/transformers/models/swinv2/convert_swinv2_timm_to_pytorch.py",
"repo_id": "transformers",
"token_count": 3497
} | 408 |
# coding=utf-8
# Copyright 2018 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 required by... | transformers/src/transformers/models/t5/tokenization_t5.py/0 | {
"file_path": "transformers/src/transformers/models/t5/tokenization_t5.py",
"repo_id": "transformers",
"token_count": 8684
} | 409 |
# 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/processing_tvp.py/0 | {
"file_path": "transformers/src/transformers/models/tvp/processing_tvp.py",
"repo_id": "transformers",
"token_count": 2826
} | 410 |
# coding=utf-8
# Copyright 2024 Microsoft Research & 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
#
# ... | transformers/src/transformers/models/video_llava/configuration_video_llava.py/0 | {
"file_path": "transformers/src/transformers/models/video_llava/configuration_video_llava.py",
"repo_id": "transformers",
"token_count": 2254
} | 411 |
# coding=utf-8
# Copyright 2022 NAVER AI Labs 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/LICENS... | transformers/src/transformers/models/vilt/modeling_vilt.py/0 | {
"file_path": "transformers/src/transformers/models/vilt/modeling_vilt.py",
"repo_id": "transformers",
"token_count": 27472
} | 412 |
# 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/configuration_vit_mae.py/0 | {
"file_path": "transformers/src/transformers/models/vit_mae/configuration_vit_mae.py",
"repo_id": "transformers",
"token_count": 2404
} | 413 |
# coding=utf-8
# Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | transformers/src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py",
"repo_id": "transformers",
"token_count": 34867
} | 414 |
# 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_with_lm/processing_wav2vec2_with_lm.py/0 | {
"file_path": "transformers/src/transformers/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.py",
"repo_id": "transformers",
"token_count": 13063
} | 415 |
# 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/whisper/tokenization_whisper.py/0 | {
"file_path": "transformers/src/transformers/models/whisper/tokenization_whisper.py",
"repo_id": "transformers",
"token_count": 25481
} | 416 |
# coding=utf-8
# Copyright 2019-present, Facebook, Inc 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
#
# Un... | transformers/src/transformers/models/xlm/configuration_xlm.py/0 | {
"file_path": "transformers/src/transformers/models/xlm/configuration_xlm.py",
"repo_id": "transformers",
"token_count": 4309
} | 417 |
# coding=utf-8
# Copyright 2022 School of EIC, Huazhong University of Science & Technology 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
... | transformers/src/transformers/models/yolos/modeling_yolos.py/0 | {
"file_path": "transformers/src/transformers/models/yolos/modeling_yolos.py",
"repo_id": "transformers",
"token_count": 24906
} | 418 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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/LICEN... | transformers/src/transformers/optimization.py/0 | {
"file_path": "transformers/src/transformers/optimization.py",
"repo_id": "transformers",
"token_count": 16752
} | 419 |
from collections import defaultdict
from typing import Optional
from ..image_utils import load_image
from ..utils import (
add_end_docstrings,
is_torch_available,
logging,
requires_backends,
)
from .base import ChunkPipeline, build_pipeline_init_args
if is_torch_available():
import torch
fro... | transformers/src/transformers/pipelines/mask_generation.py/0 | {
"file_path": "transformers/src/transformers/pipelines/mask_generation.py",
"repo_id": "transformers",
"token_count": 5667
} | 420 |
# 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/processing_utils.py/0 | {
"file_path": "transformers/src/transformers/processing_utils.py",
"repo_id": "transformers",
"token_count": 18940
} | 421 |
import json
import uuid
from typing import Optional
import requests
from huggingface_hub import Discussion, HfApi, get_repo_discussions
from .utils import cached_file, http_user_agent, logging
logger = logging.get_logger(__name__)
def previous_pr(api: HfApi, model_id: str, pr_title: str, token: str) -> Optional["... | transformers/src/transformers/safetensors_conversion.py/0 | {
"file_path": "transformers/src/transformers/safetensors_conversion.py",
"repo_id": "transformers",
"token_count": 1962
} | 422 |
# 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/training_args_seq2seq.py/0 | {
"file_path": "transformers/src/transformers/training_args_seq2seq.py",
"repo_id": "transformers",
"token_count": 1579
} | 423 |
# 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": 2512
} | 424 |
# 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/utils/peft_utils.py/0 | {
"file_path": "transformers/src/transformers/utils/peft_utils.py",
"repo_id": "transformers",
"token_count": 1977
} | 425 |
{
"fp16": {
"enabled": "auto",
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"bf16": {
"enabled": "auto"
},
"optimizer": {
"type": "AdamW",
"params": {
... | transformers/tests/deepspeed/ds_config_zero2.json/0 | {
"file_path": "transformers/tests/deepspeed/ds_config_zero2.json",
"repo_id": "transformers",
"token_count": 678
} | 426 |
{"[MASK]": 0, "[UNK]": 1, "[PAD]": 2, "DUMMY": 3, "DUMMY2": 4, "[MASK2]": 5} | transformers/tests/fixtures/test_entity_vocab.json/0 | {
"file_path": "transformers/tests/fixtures/test_entity_vocab.json",
"repo_id": "transformers",
"token_count": 45
} | 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... | transformers/tests/fsdp/test_fsdp.py/0 | {
"file_path": "transformers/tests/fsdp/test_fsdp.py",
"repo_id": "transformers",
"token_count": 6228
} | 428 |
# 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/albert/test_modeling_albert.py/0 | {
"file_path": "transformers/tests/models/albert/test_modeling_albert.py",
"repo_id": "transformers",
"token_count": 6291
} | 429 |
# 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/auto/test_modeling_auto.py/0 | {
"file_path": "transformers/tests/models/auto/test_modeling_auto.py",
"repo_id": "transformers",
"token_count": 10331
} | 430 |
# 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/camembert/test_modeling_camembert.py/0 | {
"file_path": "transformers/tests/models/camembert/test_modeling_camembert.py",
"repo_id": "transformers",
"token_count": 1276
} | 431 |
# 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/clap/test_processor_clap.py/0 | {
"file_path": "transformers/tests/models/clap/test_processor_clap.py",
"repo_id": "transformers",
"token_count": 1895
} | 432 |
# 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/convnext/test_modeling_convnext.py/0 | {
"file_path": "transformers/tests/models/convnext/test_modeling_convnext.py",
"repo_id": "transformers",
"token_count": 4486
} | 433 |
"""Testing suite for the Tensorflow CvT model."""
from __future__ import annotations
import inspect
import unittest
from math import floor
import numpy as np
from transformers import CvtConfig
from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import cached_property, is_... | transformers/tests/models/cvt/test_modeling_tf_cvt.py/0 | {
"file_path": "transformers/tests/models/cvt/test_modeling_tf_cvt.py",
"repo_id": "transformers",
"token_count": 4585
} | 434 |
# coding=utf-8
# 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 ag... | transformers/tests/models/donut/test_processing_donut.py/0 | {
"file_path": "transformers/tests/models/donut/test_processing_donut.py",
"repo_id": "transformers",
"token_count": 756
} | 435 |
# 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/models/gemma/test_modeling_flax_gemma.py/0 | {
"file_path": "transformers/tests/models/gemma/test_modeling_flax_gemma.py",
"repo_id": "transformers",
"token_count": 4825
} | 436 |
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from transformers import AutoConfig, TFGPT2LMHeadModel, is_keras_nlp_available, is_tf_available
from transformers.models.gpt2.tokenization_gpt2 import GPT2Tokenizer
from transformers.testing_utils import require_keras_nlp, require_tf, slo... | transformers/tests/models/gpt2/test_tokenization_gpt2_tf.py/0 | {
"file_path": "transformers/tests/models/gpt2/test_tokenization_gpt2_tf.py",
"repo_id": "transformers",
"token_count": 2530
} | 437 |
# 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/gptj/test_modeling_tf_gptj.py/0 | {
"file_path": "transformers/tests/models/gptj/test_modeling_tf_gptj.py",
"repo_id": "transformers",
"token_count": 8856
} | 438 |
# 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/hubert/test_modeling_tf_hubert.py/0 | {
"file_path": "transformers/tests/models/hubert/test_modeling_tf_hubert.py",
"repo_id": "transformers",
"token_count": 12352
} | 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/tests/models/informer/test_modeling_informer.py/0 | {
"file_path": "transformers/tests/models/informer/test_modeling_informer.py",
"repo_id": "transformers",
"token_count": 10308
} | 440 |
# 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_tf_layoutlm.py/0 | {
"file_path": "transformers/tests/models/layoutlm/test_modeling_tf_layoutlm.py",
"repo_id": "transformers",
"token_count": 7392
} | 441 |
# coding=utf-8
# 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 requir... | transformers/tests/models/luke/test_tokenization_luke.py/0 | {
"file_path": "transformers/tests/models/luke/test_tokenization_luke.py",
"repo_id": "transformers",
"token_count": 14112
} | 442 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.