repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
SLT-FAI
SLT-FAI-main/eval.py
import os import json import logging import argparse from sentence_transformers import SentenceTransformer, InputExample, LoggingHandler from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator, SimilarityFunction from data_utils import load_chinese_tsv_data logging.basicConfig(format='%(asctime)s -...
12,162
49.891213
176
py
SLT-FAI
SLT-FAI-main/data/prepare_chinese_data.py
import os import sys import pandas def prepare_atec_ccks(input_dir, output_dir): if not os.path.exists(output_dir): os.mkdir(output_dir) input_filenames = { "train": "train.csv", "dev": "dev.csv", "test": "test.csv" } for split in ("train", "dev", "test"): inpu...
5,204
37.555556
112
py
SLT-FAI
SLT-FAI-main/data/labels/wikipedia.py
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
32,058
28.01267
148
py
SLT-FAI
SLT-FAI-main/data/labels/bookcorpus/prepare_labels_books.py
import json from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained('bert-base-uncased') labels = {} for token in tokenizer.vocab: labels[token] = 0 num_lines = 0 num_tokens = 0 paths = ['./books_large_p1.txt', './books_large_p2.txt'] for path in paths: with open(path, mode='r') as f...
1,019
27.333333
70
py
SLT-FAI
SLT-FAI-main/transformers/modeling_encoder_decoder.py
# 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...
24,460
52.176087
420
py
SLT-FAI
SLT-FAI-main/transformers/modeling_longformer.py
# coding=utf-8 # Copyright 2020 The Allen Institute for AI team 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...
80,996
43.503846
222
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_fsmt.py
# coding=utf-8 # Copyright 2019 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
20,653
36.966912
152
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_roberta.py
# coding=utf-8 # 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
12,658
46.590226
126
py
SLT-FAI
SLT-FAI-main/transformers/convert_mbart_original_checkpoint_to_pytorch.py
import argparse import torch from transformers import BartForConditionalGeneration, MBartConfig from .convert_bart_original_pytorch_checkpoint_to_pytorch import remove_ignore_keys_ def convert_fairseq_mbart_checkpoint_from_disk(checkpoint_path, hf_config_path="facebook/mbart-large-en-ro"): state_dict = torch.l...
1,489
39.27027
117
py
SLT-FAI
SLT-FAI-main/transformers/convert_pegasus_tf_to_pytorch.py
# coding=utf-8 # Copyright 2020 Google 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 by...
5,347
39.210526
113
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_albert.py
# 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...
55,170
41.37404
160
py
SLT-FAI
SLT-FAI-main/transformers/configuration_xlm.py
# 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...
12,125
47.504
123
py
SLT-FAI
SLT-FAI-main/transformers/optimization.py
# 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...
22,600
41.483083
142
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_longformer.py
# coding=utf-8 # Copyright 2020 The Allen Institute for AI team 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...
2,154
36.807018
112
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_xlnet_fast.py
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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://ww...
11,239
41.415094
119
py
SLT-FAI
SLT-FAI-main/transformers/configuration_xlnet.py
# 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...
10,859
44.630252
118
py
SLT-FAI
SLT-FAI-main/transformers/modeling_mmbt.py
# coding=utf-8 # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) 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...
19,377
45.806763
134
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_mbart_fast.py
# coding=utf-8 # Copyright 2020 The Facebook AI Research 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/LIC...
10,112
39.778226
119
py
SLT-FAI
SLT-FAI-main/transformers/configuration_mobilebert.py
# coding=utf-8 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this 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 # distr...
7,776
47.304348
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_marian.py
# coding=utf-8 # Copyright 2020 Marian 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 # # Unles...
2,432
42.446429
115
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_squeezebert_fast.py
# 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...
3,078
43.623188
156
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_funnel_fast.py
# 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...
7,234
45.980519
154
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_mobilebert.py
# coding=utf-8 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this 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 # dis...
1,689
32.137255
119
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_dpr.py
# 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...
19,909
50.580311
152
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_phobert.py
# 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...
14,033
37.767956
119
py
SLT-FAI
SLT-FAI-main/transformers/convert_slow_tokenizers_checkpoints_to_fast.py
# 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...
5,037
37.753846
144
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_gpt2_fast.py
# coding=utf-8 # 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
8,411
43.507937
126
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_blenderbot.py
#!/usr/bin/env python3 # coding=utf-8 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the; # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
10,226
37.447368
134
py
SLT-FAI
SLT-FAI-main/transformers/configuration_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
28,627
51.916821
277
py
SLT-FAI
SLT-FAI-main/transformers/convert_longformer_original_pytorch_lightning_to_pytorch.py
# 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...
3,037
33.91954
117
py
SLT-FAI
SLT-FAI-main/transformers/optimization_tf.py
# Copyright 2019 The TensorFlow Authors. 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 applica...
15,876
43.977337
126
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_pytorch_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
16,828
41.821883
151
py
SLT-FAI
SLT-FAI-main/transformers/configuration_flaubert.py
# coding=utf-8 # Copyright 2019-present CNRS, 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 #...
9,054
60.182432
135
py
SLT-FAI
SLT-FAI-main/transformers/modeling_distilbert.py
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or...
38,980
39.775105
140
py
SLT-FAI
SLT-FAI-main/transformers/configuration_camembert.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
1,536
39.447368
142
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_camembert_fast.py
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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://ww...
10,192
41.827731
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_layoutlm.py
# 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/...
37,078
40.475391
164
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_xlm.py
# coding=utf-8 # Copyright 2019 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
34,803
34.806584
217
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_xlm_roberta.py
# coding=utf-8 # Copyright 2019 Facebook AI Research and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licens...
6,300
40.183007
226
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_ctrl.py
# coding=utf-8 # Copyright 2018 Salesforce 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 require...
8,515
31.753846
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_gpt2.py
# 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...
35,990
43.488257
164
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_xlm_roberta_fast.py
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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://ww...
11,555
46.167347
177
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_transfo_xl.py
# 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...
39,355
40.253669
160
py
SLT-FAI
SLT-FAI-main/transformers/convert_blenderbot_original_pytorch_checkpoint_to_pytorch.py
# 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...
3,678
30.991304
111
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_layoutlm.py
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
2,084
33.180328
127
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_camembert.py
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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://ww...
11,892
42.247273
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_t5.py
# coding=utf-8 # Copyright 2018 T5 Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
66,954
45.33564
205
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_auto.py
# 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...
63,058
44.398848
142
py
SLT-FAI
SLT-FAI-main/transformers/modeling_outputs.py
from dataclasses import dataclass from typing import List, Optional, Tuple import torch from .file_utils import ModelOutput @dataclass class BaseModelOutput(ModelOutput): """ Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:`torch.FloatT...
36,756
61.089527
176
py
SLT-FAI
SLT-FAI-main/transformers/modeling_flax_auto.py
# coding=utf-8 # Copyright 2018 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 ...
8,917
52.083333
396
py
SLT-FAI
SLT-FAI-main/transformers/configuration_xlm_roberta.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
2,013
48.121951
161
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_lxmert.py
# coding=utf-8 # Copyright 2020 The Google AI Team, Stanford University 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/L...
2,635
38.939394
121
py
SLT-FAI
SLT-FAI-main/transformers/configuration_bert.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
8,933
61.041667
181
py
SLT-FAI
SLT-FAI-main/transformers/modeling_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors, Facebook AI Research 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 L...
82,105
47.383029
197
py
SLT-FAI
SLT-FAI-main/transformers/configuration_layoutlm.py
# coding=utf-8 # Copyright 2010, The Microsoft Research Asia LayoutLM Team authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
6,190
46.992248
129
py
SLT-FAI
SLT-FAI-main/transformers/configuration_funnel.py
# coding=utf-8 # Copyright 2020, Hugging Face # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this 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 agree...
9,680
51.048387
147
py
SLT-FAI
SLT-FAI-main/transformers/configuration_pegasus.py
# coding=utf-8 # Copyright 2020 Google 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 by...
8,264
55.609589
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_openai.py
# 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...
32,481
44.113889
164
py
SLT-FAI
SLT-FAI-main/transformers/testing_utils.py
import inspect import logging import os import re import shutil import sys import tempfile import unittest from distutils.util import strtobool from io import StringIO from pathlib import Path from .file_utils import ( _datasets_available, _faiss_available, _flax_available, _sentencepiece_available, ...
14,949
28.371316
106
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_flaubert.py
# 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...
35,507
43.890013
160
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_bertweet.py
# 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...
27,535
34.484536
133
py
SLT-FAI
SLT-FAI-main/transformers/modeling_bert.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
75,408
40.893889
219
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_xlm_roberta.py
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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://ww...
12,822
43.524306
177
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_auto.py
# 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...
15,973
45.844575
130
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_xlm_prophetnet.py
# coding=utf-8 # Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
12,724
40.314935
145
py
SLT-FAI
SLT-FAI-main/transformers/training_args_tf.py
import warnings from dataclasses import dataclass, field from typing import Tuple from .file_utils import cached_property, is_tf_available, tf_required from .training_args import TrainingArguments from .utils import logging logger = logging.get_logger(__name__) if is_tf_available(): import tensorflow as tf @d...
10,654
46.566964
119
py
SLT-FAI
SLT-FAI-main/transformers/convert_graph_to_onnx.py
from argparse import ArgumentParser from os import listdir, makedirs from pathlib import Path from typing import Dict, List, Optional, Tuple from packaging.version import Version, parse from transformers import is_tf_available, is_torch_available from transformers.file_utils import ModelOutput from transformers.pipel...
17,899
36.447699
121
py
SLT-FAI
SLT-FAI-main/transformers/configuration_distilbert.py
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or...
6,840
48.215827
169
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_rag.py
# coding=utf-8 # Copyright 2020, The RAG 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...
4,007
37.912621
111
py
SLT-FAI
SLT-FAI-main/transformers/configuration_bert_generation.py
# coding=utf-8 # Copyright 2020 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...
5,228
47.869159
119
py
SLT-FAI
SLT-FAI-main/transformers/hf_argparser.py
import dataclasses import json import sys from argparse import ArgumentParser from enum import Enum from pathlib import Path from typing import Any, Iterable, List, NewType, Optional, Tuple, Union DataClass = NewType("DataClass", Any) DataClassType = NewType("DataClassType", Any) class HfArgumentParser(ArgumentPars...
8,226
44.203297
116
py
SLT-FAI
SLT-FAI-main/transformers/modeling_gpt2.py
# 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...
46,472
42.030556
180
py
SLT-FAI
SLT-FAI-main/transformers/modeling_flaubert.py
# coding=utf-8 # Copyright 2019-present CNRS, 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 #...
17,452
40.35782
138
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_utils_base.py
# 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...
143,797
47.416835
252
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_layoutlm_fast.py
# coding=utf-8 # Copyright 2018 The Microsoft Research Asia LayoutLM Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
2,551
37.089552
132
py
SLT-FAI
SLT-FAI-main/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py
# 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...
2,176
34.112903
117
py
SLT-FAI
SLT-FAI-main/transformers/modeling_openai.py
# 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...
36,008
41.614201
168
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_prophetnet.py
# coding=utf-8 # Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
12,531
42.97193
156
py
SLT-FAI
SLT-FAI-main/transformers/convert_t5_original_tf_checkpoint_to_pytorch.py
# coding=utf-8 # Copyright 2018 The 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 require...
2,113
33.096774
117
py
SLT-FAI
SLT-FAI-main/transformers/pipelines.py
# 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...
118,659
41.591529
183
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_mbart.py
# coding=utf-8 # Copyright 2020 The Facebook AI Research 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/LIC...
9,388
39.123932
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_mobilebert.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
66,041
41.635249
160
py
SLT-FAI
SLT-FAI-main/transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py
# 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...
2,931
31.94382
119
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_herbert_fast.py
# coding=utf-8 # Copyright 2020 The Google AI Language Team Authors, Allegro.pl, 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://ww...
6,372
37.391566
119
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_marian.py
import json import re import warnings from pathlib import Path from shutil import copyfile from typing import Dict, List, Optional, Tuple, Union import sentencepiece from .file_utils import add_start_docstrings from .tokenization_utils import BatchEncoding, PreTrainedTokenizer from .tokenization_utils_base import PRE...
11,311
39.985507
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_outputs.py
from dataclasses import dataclass from typing import List, Optional, Tuple import tensorflow as tf from .file_utils import ModelOutput @dataclass class TFBaseModelOutput(ModelOutput): """ Base class for model's outputs, with potential hidden states and attentions. Args: last_hidden_state (:obj:...
33,029
58.29982
168
py
SLT-FAI
SLT-FAI-main/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py
# 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...
2,520
36.073529
119
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_squeezebert.py
# 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...
2,378
37.370968
151
py
SLT-FAI
SLT-FAI-main/transformers/configuration_prophetnet.py
# coding=utf-8 # Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
8,066
47.017857
143
py
SLT-FAI
SLT-FAI-main/transformers/modeling_rag.py
# coding=utf-8 # Copyright 2020, The RAG 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...
79,283
51.680399
204
py
SLT-FAI
SLT-FAI-main/transformers/modeling_squeezebert.py
# 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...
41,618
39.211594
126
py
SLT-FAI
SLT-FAI-main/transformers/modeling_tf_roberta.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
52,114
40.92679
222
py
SLT-FAI
SLT-FAI-main/transformers/convert_electra_original_tf_checkpoint_to_pytorch.py
# 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...
2,866
34.8375
117
py
SLT-FAI
SLT-FAI-main/transformers/configuration_auto.py
# 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...
16,527
46.768786
160
py
SLT-FAI
SLT-FAI-main/transformers/trainer_callback.py
# coding=utf-8 # Copyright 2020-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
19,461
40.408511
119
py
SLT-FAI
SLT-FAI-main/transformers/modeling_electra.py
# coding=utf-8 # Copyright 2019 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...
53,903
39.898331
168
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_roberta_fast.py
# coding=utf-8 # 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
9,932
47.453659
124
py
SLT-FAI
SLT-FAI-main/transformers/trainer_pt_utils.py
# coding=utf-8 # Copyright 2020-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
12,036
39.392617
119
py
SLT-FAI
SLT-FAI-main/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py
# 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...
7,974
45.098266
117
py
SLT-FAI
SLT-FAI-main/transformers/tokenization_retribert.py
# 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...
1,865
31.736842
125
py