text
stringlengths
7
1.24M
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
519
from __future__ import absolute_import, division, print_function, unicode_literals from torch import nn from torch.nn import CrossEntropyLoss, MSELoss from transformers import RobertaConfig from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward from transformers.models.roberta...
transformers/examples/research_projects/deebert/src/modeling_highway_roberta.py/0
{ "file_path": "transformers/examples/research_projects/deebert/src/modeling_highway_roberta.py", "repo_id": "transformers", "token_count": 3077 }
340
# Copyright 2022 - Intel Corp. All rights reserved. # Authors: Mayank Kumar Raunak, Javier Turek, Nicole Beckage """ Implementation of a new method for fine-tuning transformer models that we call Information Gain Filtration 'IGF' on WikiText data set and compared the results with the standard fine-tuning method Steps...
transformers/examples/research_projects/information-gain-filtration/run_clm_igf.py/0
{ "file_path": "transformers/examples/research_projects/information-gain-filtration/run_clm_igf.py", "repo_id": "transformers", "token_count": 6317 }
341
#!/usr/bin/env python # 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-...
transformers/examples/research_projects/jax-projects/hybrid_clip/run_hybrid_clip.py/0
{ "file_path": "transformers/examples/research_projects/jax-projects/hybrid_clip/run_hybrid_clip.py", "repo_id": "transformers", "token_count": 8809 }
342
# LXMERT DEMO 1. make a virtualenv: ``virtualenv venv`` and activate ``source venv/bin/activate`` 2. install reqs: ``pip install -r ./requirements.txt`` 3. usage is as shown in demo.ipynb
transformers/examples/research_projects/lxmert/README.md/0
{ "file_path": "transformers/examples/research_projects/lxmert/README.md", "repo_id": "transformers", "token_count": 65 }
343
<jupyter_start><jupyter_text>Saving PruneBERTThis notebook aims at showcasing how we can leverage standard tools to save (and load) an extremely sparse model fine-pruned with [movement pruning](https://arxiv.org/abs/2005.07683) (or any other unstructured pruning mehtod).In this example, we used BERT (base-uncased, but ...
transformers/examples/research_projects/movement-pruning/Saving_PruneBERT.ipynb/0
{ "file_path": "transformers/examples/research_projects/movement-pruning/Saving_PruneBERT.ipynb", "repo_id": "transformers", "token_count": 5478 }
344
#!/usr/bin/env python # 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.ap...
transformers/examples/research_projects/onnx/summarization/run_onnx_exporter.py/0
{ "file_path": "transformers/examples/research_projects/onnx/summarization/run_onnx_exporter.py", "repo_id": "transformers", "token_count": 2860 }
345
# coding=utf-8 # Copyright 2021 NVIDIA Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
transformers/examples/research_projects/quantization-qdqbert/evaluate-hf-trt-qa.py/0
{ "file_path": "transformers/examples/research_projects/quantization-qdqbert/evaluate-hf-trt-qa.py", "repo_id": "transformers", "token_count": 6398 }
346
What does Moses' rod turn into ? Who is Aron? Where did Moses grow up ? What happens at the command of the Moses ? Who manages the Pokémon ? Who owned the Pokémon trademark ? What else include in Pokémon franchise ? How many seasons in Pokémon animme series ?
transformers/examples/research_projects/rag-end2end-retriever/test_run/dummy-train-data/test.source/0
{ "file_path": "transformers/examples/research_projects/rag-end2end-retriever/test_run/dummy-train-data/test.source", "repo_id": "transformers", "token_count": 63 }
347
import logging import random import ray from transformers import RagConfig, RagRetriever, RagTokenizer from transformers.models.rag.retrieval_rag import CustomHFIndex logger = logging.getLogger(__name__) class RayRetriever: def __init__(self): self.initialized = False def create_rag_retriever(sel...
transformers/examples/research_projects/rag/distributed_ray_retriever.py/0
{ "file_path": "transformers/examples/research_projects/rag/distributed_ray_retriever.py", "repo_id": "transformers", "token_count": 2886 }
348
# Self-training This is an implementation of the self-training algorithm (without task augmentation) in the [EMNLP 2021](https://2021.emnlp.org/) paper: [STraTA: Self-Training with Task Augmentation for Better Few-shot Learning](https://arxiv.org/abs/2109.06270). Please check out https://github.com/google-research/goo...
transformers/examples/research_projects/self-training-text-classification/README.md/0
{ "file_path": "transformers/examples/research_projects/self-training-text-classification/README.md", "repo_id": "transformers", "token_count": 2130 }
349
#!/usr/bin/env python import argparse import glob import logging import os import sys import time from collections import defaultdict from pathlib import Path from typing import Dict, List, Tuple import numpy as np import pytorch_lightning as pl import torch from callbacks import Seq2SeqLoggingCallback, get_checkpoin...
transformers/examples/research_projects/seq2seq-distillation/finetune.py/0
{ "file_path": "transformers/examples/research_projects/seq2seq-distillation/finetune.py", "repo_id": "transformers", "token_count": 8523 }
350
import os from glob import glob import imageio import torch import torchvision import wandb from img_processing import custom_to_pil, loop_post_process, preprocess, preprocess_vqgan from loaders import load_vqgan from PIL import Image from torch import nn from transformers import CLIPModel, CLIPTokenizerFast from uti...
transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py/0
{ "file_path": "transformers/examples/research_projects/vqgan-clip/VQGAN_CLIP.py", "repo_id": "transformers", "token_count": 4997 }
351
#!/usr/bin/env python # 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/LI...
transformers/examples/tensorflow/language-modeling/run_clm.py/0
{ "file_path": "transformers/examples/tensorflow/language-modeling/run_clm.py", "repo_id": "transformers", "token_count": 12113 }
352
#!/usr/bin/env python # 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/LI...
transformers/examples/tensorflow/text-classification/run_text_classification.py/0
{ "file_path": "transformers/examples/tensorflow/text-classification/run_text_classification.py", "repo_id": "transformers", "token_count": 10596 }
353
#!/usr/bin/env bash # 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 r...
transformers/scripts/fsmt/eval-facebook-wmt19.sh/0
{ "file_path": "transformers/scripts/fsmt/eval-facebook-wmt19.sh", "repo_id": "transformers", "token_count": 2623 }
354
#!/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/agents/__init__.py/0
{ "file_path": "transformers/src/transformers/agents/__init__.py", "repo_id": "transformers", "token_count": 884 }
355
# 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/commands/serving.py/0
{ "file_path": "transformers/src/transformers/commands/serving.py", "repo_id": "transformers", "token_count": 3477 }
356
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
transformers/src/transformers/data/metrics/__init__.py/0
{ "file_path": "transformers/src/transformers/data/metrics/__init__.py", "repo_id": "transformers", "token_count": 1413 }
357
from abc import ABC, abstractmethod from typing import List, Optional class Constraint(ABC): r"""Abstract base class for all constraints that can be applied during generation. It must define how the constraint can be satisfied. All classes that inherit Constraint must follow the requirement that ```...
transformers/src/transformers/generation/beam_constraints.py/0
{ "file_path": "transformers/src/transformers/generation/beam_constraints.py", "repo_id": "transformers", "token_count": 8383 }
358
# 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/image_processing_utils.py/0
{ "file_path": "transformers/src/transformers/image_processing_utils.py", "repo_id": "transformers", "token_count": 5018 }
359
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/integrations/tpu.py/0
{ "file_path": "transformers/src/transformers/integrations/tpu.py", "repo_id": "transformers", "token_count": 487 }
360
/*! ************************************************************************************************** * Deformable DETR * Copyright (c) 2020 SenseTime. All Rights Reserved. * Licensed under the Apache License, Version 2.0 [see LICENSE for details] ***********************************************************************...
transformers/src/transformers/kernels/deta/ms_deform_attn.h/0
{ "file_path": "transformers/src/transformers/kernels/deta/ms_deform_attn.h", "repo_id": "transformers", "token_count": 667 }
361
__global__ void fast_hash_ver1_cuda_kernel( int *mask, // [batch_size, num_vector] float *vector, // [batch_size, num_vector, vector_dim] int *Dmat, // [3, num_part, vector_dim] int *hash_code, // [batch_size, num_vector, num_hash_f] int batch_size, int num_vector, int vector_dim, int...
transformers/src/transformers/kernels/yoso/fast_lsh_cumulation_cuda.h/0
{ "file_path": "transformers/src/transformers/kernels/yoso/fast_lsh_cumulation_cuda.h", "repo_id": "transformers", "token_count": 2369 }
362
# 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/albert/__init__.py/0
{ "file_path": "transformers/src/transformers/models/albert/__init__.py", "repo_id": "transformers", "token_count": 2104 }
363
# coding=utf-8 # Copyright 2022 WenXiang ZhongzhiCheng LedellWu LiuGuang BoWenZhang 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 # # htt...
transformers/src/transformers/models/altclip/processing_altclip.py/0
{ "file_path": "transformers/src/transformers/models/altclip/processing_altclip.py", "repo_id": "transformers", "token_count": 2437 }
364
# coding=utf-8 # Copyright (c) 2020, VinAI Research and the HuggingFace Inc. team. # Copyright 2018 The Open AI 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 th...
transformers/src/transformers/models/bertweet/tokenization_bertweet.py/0
{ "file_path": "transformers/src/transformers/models/bertweet/tokenization_bertweet.py", "repo_id": "transformers", "token_count": 12043 }
365
# coding=utf-8 # Copyright 2022 The HuggingFace Team and Microsoft Research AI4Science. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you 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/biogpt/tokenization_biogpt.py/0
{ "file_path": "transformers/src/transformers/models/biogpt/tokenization_biogpt.py", "repo_id": "transformers", "token_count": 6027 }
366
# 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/blip_2/convert_blip_2_original_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/blip_2/convert_blip_2_original_to_pytorch.py", "repo_id": "transformers", "token_count": 7318 }
367
# 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/bros/convert_bros_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/bros/convert_bros_to_pytorch.py", "repo_id": "transformers", "token_count": 2040 }
368
# coding=utf-8 # Copyright Google AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
transformers/src/transformers/models/canine/tokenization_canine.py/0
{ "file_path": "transformers/src/transformers/models/canine/tokenization_canine.py", "repo_id": "transformers", "token_count": 3892 }
369
# 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/clap/convert_clap_original_pytorch_to_hf.py/0
{ "file_path": "transformers/src/transformers/models/clap/convert_clap_original_pytorch_to_hf.py", "repo_id": "transformers", "token_count": 2042 }
370
# 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/clipseg/configuration_clipseg.py/0
{ "file_path": "transformers/src/transformers/models/clipseg/configuration_clipseg.py", "repo_id": "transformers", "token_count": 8206 }
371
# coding=utf-8 # Copyright 2022 Salesforce authors, The EleutherAI, and HuggingFace Teams. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
transformers/src/transformers/models/codegen/configuration_codegen.py/0
{ "file_path": "transformers/src/transformers/models/codegen/configuration_codegen.py", "repo_id": "transformers", "token_count": 3917 }
372
# 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/src/transformers/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py/0
{ "file_path": "transformers/src/transformers/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py", "repo_id": "transformers", "token_count": 749 }
373
# coding=utf-8 # Copyright 2023 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/convnextv2/modeling_tf_convnextv2.py/0
{ "file_path": "transformers/src/transformers/models/convnextv2/modeling_tf_convnextv2.py", "repo_id": "transformers", "token_count": 11897 }
374
# coding=utf-8 # Copyright 2022 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/L...
transformers/src/transformers/models/cvt/modeling_cvt.py/0
{ "file_path": "transformers/src/transformers/models/cvt/modeling_cvt.py", "repo_id": "transformers", "token_count": 12476 }
375
# coding=utf-8 # Copyright 2022 Meta Platforms 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/LICEN...
transformers/src/transformers/models/data2vec/modeling_data2vec_vision.py/0
{ "file_path": "transformers/src/transformers/models/data2vec/modeling_data2vec_vision.py", "repo_id": "transformers", "token_count": 25601 }
376
# coding=utf-8 # Copyright 2020 Microsoft and the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py/0
{ "file_path": "transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py", "repo_id": "transformers", "token_count": 4063 }
377
# coding=utf-8 # Copyright 2021 Facebook AI Research (FAIR), 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....
transformers/src/transformers/models/deit/modeling_deit.py/0
{ "file_path": "transformers/src/transformers/models/deit/modeling_deit.py", "repo_id": "transformers", "token_count": 17651 }
378
# coding=utf-8 # Copyright 2023 Snapchat 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/LI...
transformers/src/transformers/models/deprecated/efficientformer/modeling_tf_efficientformer.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/efficientformer/modeling_tf_efficientformer.py", "repo_id": "transformers", "token_count": 21530 }
379
# coding=utf-8 # Copyright 2022 The OpenAI Team 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 # # Unles...
transformers/src/transformers/models/deprecated/jukebox/configuration_jukebox.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/jukebox/configuration_jukebox.py", "repo_id": "transformers", "token_count": 10955 }
380
# 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/deprecated/nat/__init__.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/nat/__init__.py", "repo_id": "transformers", "token_count": 571 }
381
# coding=utf-8 # Copyright 2022 The Trajectory Transformers paper 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://ww...
transformers/src/transformers/models/deprecated/trajectory_transformer/convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/deprecated/trajectory_transformer/convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 1099 }
382
# coding=utf-8 # Copyright 2024 TikTok 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/depth_anything/modeling_depth_anything.py/0
{ "file_path": "transformers/src/transformers/models/depth_anything/modeling_depth_anything.py", "repo_id": "transformers", "token_count": 7306 }
383
# coding=utf-8 # Copyright 2023 Meta AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
transformers/src/transformers/models/dinov2/modeling_dinov2.py/0
{ "file_path": "transformers/src/transformers/models/dinov2/modeling_dinov2.py", "repo_id": "transformers", "token_count": 15141 }
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/donut/modeling_donut_swin.py/0
{ "file_path": "transformers/src/transformers/models/donut/modeling_donut_swin.py", "repo_id": "transformers", "token_count": 18967 }
385
# 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/encodec/__init__.py/0
{ "file_path": "transformers/src/transformers/models/encodec/__init__.py", "repo_id": "transformers", "token_count": 610 }
386
# coding=utf-8 # Copyright 2022 Meta 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/esm/modeling_esm.py/0
{ "file_path": "transformers/src/transformers/models/esm/modeling_esm.py", "repo_id": "transformers", "token_count": 23630 }
387
# coding=utf-8 # Copyright 2023 the Falcon 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/licenses/LICE...
transformers/src/transformers/models/falcon/modeling_falcon.py/0
{ "file_path": "transformers/src/transformers/models/falcon/modeling_falcon.py", "repo_id": "transformers", "token_count": 34842 }
388
# Copyright 2022 Meta Platforms authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
transformers/src/transformers/models/flava/__init__.py/0
{ "file_path": "transformers/src/transformers/models/flava/__init__.py", "repo_id": "transformers", "token_count": 1103 }
389
# 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/focalnet/convert_focalnet_to_hf_format.py/0
{ "file_path": "transformers/src/transformers/models/focalnet/convert_focalnet_to_hf_format.py", "repo_id": "transformers", "token_count": 3999 }
390
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
transformers/src/transformers/models/fuyu/convert_fuyu_model_weights_to_hf.py/0
{ "file_path": "transformers/src/transformers/models/fuyu/convert_fuyu_model_weights_to_hf.py", "repo_id": "transformers", "token_count": 1851 }
391
# 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/models/gpt2/modeling_flax_gpt2.py/0
{ "file_path": "transformers/src/transformers/models/gpt2/modeling_flax_gpt2.py", "repo_id": "transformers", "token_count": 14137 }
392
# coding=utf-8 # Copyright 2022 EleutherAI 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/gpt_neox/modeling_gpt_neox.py/0
{ "file_path": "transformers/src/transformers/models/gpt_neox/modeling_gpt_neox.py", "repo_id": "transformers", "token_count": 31075 }
393
# 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/hiera/configuration_hiera.py/0
{ "file_path": "transformers/src/transformers/models/hiera/configuration_hiera.py", "repo_id": "transformers", "token_count": 3690 }
394
# 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/idefics/image_processing_idefics.py/0
{ "file_path": "transformers/src/transformers/models/idefics/image_processing_idefics.py", "repo_id": "transformers", "token_count": 3016 }
395
# 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/imagegpt/convert_imagegpt_original_tf2_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/imagegpt/convert_imagegpt_original_tf2_to_pytorch.py", "repo_id": "transformers", "token_count": 993 }
396
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM 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/...
transformers/src/transformers/models/layoutlm/modeling_layoutlm.py/0
{ "file_path": "transformers/src/transformers/models/layoutlm/modeling_layoutlm.py", "repo_id": "transformers", "token_count": 26118 }
397
# coding=utf-8 # Copyright 2022 Microsoft Research and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
transformers/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py/0
{ "file_path": "transformers/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py", "repo_id": "transformers", "token_count": 26339 }
398
# 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/levit/configuration_levit.py/0
{ "file_path": "transformers/src/transformers/models/levit/configuration_levit.py", "repo_id": "transformers", "token_count": 2180 }
399
# coding=utf-8 # Copyright 2023 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/llava/configuration_llava.py/0
{ "file_path": "transformers/src/transformers/models/llava/configuration_llava.py", "repo_id": "transformers", "token_count": 2053 }
400
# 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/llava_next_video/processing_llava_next_video.py/0
{ "file_path": "transformers/src/transformers/models/llava_next_video/processing_llava_next_video.py", "repo_id": "transformers", "token_count": 5073 }
401
# coding=utf-8 # Copyright Studio Ousia and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
transformers/src/transformers/models/luke/modeling_luke.py/0
{ "file_path": "transformers/src/transformers/models/luke/modeling_luke.py", "repo_id": "transformers", "token_count": 42929 }
402
# coding=utf-8 # Copyright 2024 state-spaces/mamba org 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...
transformers/src/transformers/models/mamba/convert_mamba_ssm_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/mamba/convert_mamba_ssm_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 2383 }
403
# 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/markuplm/feature_extraction_markuplm.py/0
{ "file_path": "transformers/src/transformers/models/markuplm/feature_extraction_markuplm.py", "repo_id": "transformers", "token_count": 2745 }
404
# coding=utf-8 # Copyright 2024 Mistral AI 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/mistral/modeling_tf_mistral.py/0
{ "file_path": "transformers/src/transformers/models/mistral/modeling_tf_mistral.py", "repo_id": "transformers", "token_count": 19832 }
405
# 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/mobilenet_v1/configuration_mobilenet_v1.py/0
{ "file_path": "transformers/src/transformers/models/mobilenet_v1/configuration_mobilenet_v1.py", "repo_id": "transformers", "token_count": 1770 }
406
# coding=utf-8 # Copyright 2022 Apple 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/LICENSE-2...
transformers/src/transformers/models/mobilevit/modeling_mobilevit.py/0
{ "file_path": "transformers/src/transformers/models/mobilevit/modeling_mobilevit.py", "repo_id": "transformers", "token_count": 17750 }
407
# 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/mra/configuration_mra.py/0
{ "file_path": "transformers/src/transformers/models/mra/configuration_mra.py", "repo_id": "transformers", "token_count": 2451 }
408
# coding=utf-8 # Copyright 2024 Meta AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
transformers/src/transformers/models/musicgen_melody/feature_extraction_musicgen_melody.py/0
{ "file_path": "transformers/src/transformers/models/musicgen_melody/feature_extraction_musicgen_melody.py", "repo_id": "transformers", "token_count": 6252 }
409
# coding=utf-8 # Copyright 2023, HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
transformers/src/transformers/models/nllb_moe/configuration_nllb_moe.py/0
{ "file_path": "transformers/src/transformers/models/nllb_moe/configuration_nllb_moe.py", "repo_id": "transformers", "token_count": 4413 }
410
# coding=utf-8 # Copyright 2022 The Fairseq Authors and The Google Flax Team 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 # # ...
transformers/src/transformers/models/opt/modeling_flax_opt.py/0
{ "file_path": "transformers/src/transformers/models/opt/modeling_flax_opt.py", "repo_id": "transformers", "token_count": 13784 }
411
# 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/plbart/__init__.py/0
{ "file_path": "transformers/src/transformers/models/plbart/__init__.py", "repo_id": "transformers", "token_count": 838 }
412
# 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/processing_pop2piano.py/0
{ "file_path": "transformers/src/transformers/models/pop2piano/processing_pop2piano.py", "repo_id": "transformers", "token_count": 2201 }
413
# Copyright 2024 The Qwen 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/LICENSE-2.0 # # Unles...
transformers/src/transformers/models/qwen2/__init__.py/0
{ "file_path": "transformers/src/transformers/models/qwen2/__init__.py", "repo_id": "transformers", "token_count": 892 }
414
# coding=utf-8 # Copyright 2024 The Qwen team, Alibaba Group 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 differenc...
transformers/src/transformers/models/qwen2_vl/processing_qwen2_vl.py/0
{ "file_path": "transformers/src/transformers/models/qwen2_vl/processing_qwen2_vl.py", "repo_id": "transformers", "token_count": 3888 }
415
# coding=utf-8 # Copyright 2020 The Trax 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 # # Unless r...
transformers/src/transformers/models/reformer/tokenization_reformer_fast.py/0
{ "file_path": "transformers/src/transformers/models/reformer/tokenization_reformer_fast.py", "repo_id": "transformers", "token_count": 1646 }
416
# coding=utf-8 # Copyright 2022 Microsoft 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/lice...
transformers/src/transformers/models/resnet/configuration_resnet.py/0
{ "file_path": "transformers/src/transformers/models/resnet/configuration_resnet.py", "repo_id": "transformers", "token_count": 2226 }
417
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/models/rt_detr/__init__.py/0
{ "file_path": "transformers/src/transformers/models/rt_detr/__init__.py", "repo_id": "transformers", "token_count": 928 }
418
# 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": 33282 }
419
# 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 }
420
# 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/sew_d/convert_sew_d_original_pytorch_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/sew_d/convert_sew_d_original_pytorch_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 5964 }
421
# 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/speech_to_text/configuration_speech_to_text.py/0
{ "file_path": "transformers/src/transformers/models/speech_to_text/configuration_speech_to_text.py", "repo_id": "transformers", "token_count": 3827 }
422
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
transformers/src/transformers/models/superpoint/__init__.py/0
{ "file_path": "transformers/src/transformers/models/superpoint/__init__.py", "repo_id": "transformers", "token_count": 715 }
423
# 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/src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 1935 }
424
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py", "repo_id": "transformers", "token_count": 4298 }
425
# 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/modeling_univnet.py/0
{ "file_path": "transformers/src/transformers/models/univnet/modeling_univnet.py", "repo_id": "transformers", "token_count": 11193 }
426
# coding=utf-8 # Copyright 2022 HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
transformers/src/transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py/0
{ "file_path": "transformers/src/transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py", "repo_id": "transformers", "token_count": 14881 }
427
# 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/vitdet/configuration_vitdet.py/0
{ "file_path": "transformers/src/transformers/models/vitdet/configuration_vitdet.py", "repo_id": "transformers", "token_count": 2827 }
428
# Copyright 2022 The OpenAI team and The HuggingFace Team. All rights reserved. # Most of the code is copy pasted from the original whisper repository # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
transformers/src/transformers/models/whisper/english_normalizer.py/0
{ "file_path": "transformers/src/transformers/models/whisper/english_normalizer.py", "repo_id": "transformers", "token_count": 12164 }
429
import argparse from argparse import Namespace import torch from torch import nn from transformers import XGLMConfig, XGLMForCausalLM def remove_ignore_keys_(state_dict): ignore_keys = [ "decoder.version", "decoder.output_projection.weight", "_float_tensor", "decoder.embed_positi...
transformers/src/transformers/models/xglm/convert_xglm_original_ckpt_to_trfms.py/0
{ "file_path": "transformers/src/transformers/models/xglm/convert_xglm_original_ckpt_to_trfms.py", "repo_id": "transformers", "token_count": 938 }
430
# 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/xmod/convert_xmod_original_pytorch_checkpoint_to_pytorch.py/0
{ "file_path": "transformers/src/transformers/models/xmod/convert_xmod_original_pytorch_checkpoint_to_pytorch.py", "repo_id": "transformers", "token_count": 4107 }
431
# coding=utf-8 # Copyright 2024 Intel 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/LICENSE-2...
transformers/src/transformers/models/zoedepth/modeling_zoedepth.py/0
{ "file_path": "transformers/src/transformers/models/zoedepth/modeling_zoedepth.py", "repo_id": "transformers", "token_count": 24796 }
432
from typing import Dict from ..utils import add_end_docstrings from .base import GenericTensor, Pipeline, build_pipeline_init_args @add_end_docstrings( build_pipeline_init_args(has_tokenizer=True, supports_binary_output=False), r""" tokenize_kwargs (`dict`, *optional*): Additional dic...
transformers/src/transformers/pipelines/feature_extraction.py/0
{ "file_path": "transformers/src/transformers/pipelines/feature_extraction.py", "repo_id": "transformers", "token_count": 1279 }
433
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 }
434
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
transformers/src/transformers/quantizers/quantizer_eetq.py/0
{ "file_path": "transformers/src/transformers/quantizers/quantizer_eetq.py", "repo_id": "transformers", "token_count": 2723 }
435
# 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/src/transformers/tokenization_utils_fast.py/0
{ "file_path": "transformers/src/transformers/tokenization_utils_fast.py", "repo_id": "transformers", "token_count": 17083 }
436
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import requires_backends class LayoutLMv2Model: def __init__(self, *args, **kwargs): requires_backends(self, ["detectron2"]) @classmethod def from_pretrained(cls, *args, **kwargs): requires_backends(c...
transformers/src/transformers/utils/dummy_detectron2_objects.py/0
{ "file_path": "transformers/src/transformers/utils/dummy_detectron2_objects.py", "repo_id": "transformers", "token_count": 131 }
437
# 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/utils/generic.py/0
{ "file_path": "transformers/src/transformers/utils/generic.py", "repo_id": "transformers", "token_count": 11915 }
438
{ "example_name": "text classification", "directory_name": "{{cookiecutter.example_name|lower|replace(' ', '-')}}", "example_shortcut": "{{cookiecutter.directory_name}}", "model_class": "AutoModel", "authors": "The HuggingFace Team", "can_train_from_scratch": ["True", "False"], "with_trainer": ["True", "F...
transformers/templates/adding_a_new_example_script/cookiecutter.json/0
{ "file_path": "transformers/templates/adding_a_new_example_script/cookiecutter.json", "repo_id": "transformers", "token_count": 115 }
439