text stringlengths 7 328k | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 459 |
|---|---|---|---|
from argparse import ArgumentParser
from json import dump
from logging import basicConfig, getLogger
from os import linesep, remove
from os.path import exists
from tempfile import NamedTemporaryFile
from typing import Dict, List, Tuple
from requests import get
from sentencepiece import SentencePieceProcessor
from tqdm... | tokenizers/bindings/python/scripts/sentencepiece_extractor.py/0 | {
"file_path": "tokenizers/bindings/python/scripts/sentencepiece_extractor.py",
"repo_id": "tokenizers",
"token_count": 2231
} | 235 |
use super::regex::PyRegex;
use super::{DestroyPtr, RefMutContainer, RefMutGuard};
use crate::error::ToPyResult;
use pyo3::exceptions;
use pyo3::prelude::*;
use pyo3::types::*;
use tk::normalizer::{char_to_bytes, NormalizedString, Range, SplitDelimiterBehavior};
use tk::pattern::Pattern;
/// Represents a Pattern as use... | tokenizers/bindings/python/src/utils/normalization.rs/0 | {
"file_path": "tokenizers/bindings/python/src/utils/normalization.rs",
"repo_id": "tokenizers",
"token_count": 8467
} | 236 |
from tokenizers import Tokenizer
from ..utils import data_dir, doc_pipeline_bert_tokenizer, doc_wiki_tokenizer
disable_printing = True
original_print = print
def print(*args, **kwargs):
if not disable_printing:
original_print(*args, **kwargs)
class TestPipeline:
def test_pipeline(self, doc_wiki_to... | tokenizers/bindings/python/tests/documentation/test_pipeline.py/0 | {
"file_path": "tokenizers/bindings/python/tests/documentation/test_pipeline.py",
"repo_id": "tokenizers",
"token_count": 3351
} | 237 |
# Encode Inputs
<tokenizerslangcontent>
<python>
These types represent all the different kinds of input that a [`~tokenizers.Tokenizer`] accepts
when using [`~tokenizers.Tokenizer.encode_batch`].
## TextEncodeInput[[[[tokenizers.TextEncodeInput]]]]
<code>tokenizers.TextEncodeInput</code>
Represents a textual input ... | tokenizers/docs/source-doc-builder/api/encode-inputs.mdx/0 | {
"file_path": "tokenizers/docs/source-doc-builder/api/encode-inputs.mdx",
"repo_id": "tokenizers",
"token_count": 716
} | 238 |
from collections import defaultdict, abc
from typing import cast
from docutils import nodes
from docutils.parsers.rst import Directive
import sphinx
from sphinx.locale import _
from sphinx.util.docutils import SphinxDirective
from sphinx.errors import ExtensionError
from conf import languages as LANGUAGES
logger = ... | tokenizers/docs/source/_ext/entities.py/0 | {
"file_path": "tokenizers/docs/source/_ext/entities.py",
"repo_id": "tokenizers",
"token_count": 4032
} | 239 |
.. entities:: python
:global:
class
class
classmethod
class method
Tokenizer
:class:`~tokenizers.Tokenizer`
Tokenizer.train
:meth:`~tokenizers.Tokenizer.train`
Tokenizer.save
:meth:`~tokenizers.Tokenizer.save`
Tokenizer.from_file
:meth:`~toke... | tokenizers/docs/source/entities.inc/0 | {
"file_path": "tokenizers/docs/source/entities.inc",
"repo_id": "tokenizers",
"token_count": 2078
} | 240 |
#[macro_use]
extern crate criterion;
mod common;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::Path;
use criterion::Criterion;
use tokenizers::models::bpe::{BpeTrainerBuilder, BPE};
use tokenizers::models::TrainerWrapper;
use tokenizers::pre_tokenizers::byte_level::ByteLevel;
use tokenizers::p... | tokenizers/tokenizers/benches/bpe_benchmark.rs/0 | {
"file_path": "tokenizers/tokenizers/benches/bpe_benchmark.rs",
"repo_id": "tokenizers",
"token_count": 1621
} | 241 |
<div align="center">
<h1><code>create-wasm-app</code></h1>
<strong>An <code>npm init</code> template for kick starting a project that uses NPM packages containing Rust-generated WebAssembly and bundles them with Webpack.</strong>
<p>
<a href="https://travis-ci.org/rustwasm/create-wasm-app"><img src="https:... | tokenizers/tokenizers/examples/unstable_wasm/www/README.md/0 | {
"file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/README.md",
"repo_id": "tokenizers",
"token_count": 893
} | 242 |
#![warn(clippy::all)]
#![allow(clippy::upper_case_acronyms)]
#![doc(html_favicon_url = "https://huggingface.co/favicon.ico")]
#![doc(html_logo_url = "https://huggingface.co/landing/assets/huggingface_logo.svg")]
//! The core of `tokenizers`, written in Rust.
//! Provides an implementation of today's most used tokenize... | tokenizers/tokenizers/src/lib.rs/0 | {
"file_path": "tokenizers/tokenizers/src/lib.rs",
"repo_id": "tokenizers",
"token_count": 2175
} | 243 |
//! [WordPiece](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37842.pdf)
//! model.
use crate::models::bpe::BPE;
use crate::tokenizer::{Model, Result, Token};
use std::{
borrow::Cow,
collections::HashMap,
fs::File,
io::prelude::*,
io::{BufRead, BufReader},
path... | tokenizers/tokenizers/src/models/wordpiece/mod.rs/0 | {
"file_path": "tokenizers/tokenizers/src/models/wordpiece/mod.rs",
"repo_id": "tokenizers",
"token_count": 4422
} | 244 |
pub mod bert;
pub mod byte_level;
pub mod delimiter;
pub mod digits;
pub mod metaspace;
pub mod punctuation;
pub mod sequence;
pub mod split;
pub mod unicode_scripts;
pub mod whitespace;
use serde::{Deserialize, Serialize};
use crate::pre_tokenizers::bert::BertPreTokenizer;
use crate::pre_tokenizers::byte_level::Byte... | tokenizers/tokenizers/src/pre_tokenizers/mod.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/mod.rs",
"repo_id": "tokenizers",
"token_count": 2430
} | 245 |
use crate::pattern::Pattern;
use crate::{Offsets, Result};
use std::ops::{Bound, RangeBounds};
use unicode_normalization_alignments::UnicodeNormalization;
use serde::{Deserialize, Serialize};
/// The possible offsets referential
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OffsetReferential {
Original,
... | tokenizers/tokenizers/src/tokenizer/normalizer.rs/0 | {
"file_path": "tokenizers/tokenizers/src/tokenizer/normalizer.rs",
"repo_id": "tokenizers",
"token_count": 42406
} | 246 |
use tokenizers::models::bpe::{BpeTrainerBuilder, BPE};
use tokenizers::normalizers::{Sequence, Strip, NFC};
use tokenizers::pre_tokenizers::byte_level::ByteLevel;
use tokenizers::{AddedToken, TokenizerBuilder};
use tokenizers::{DecoderWrapper, NormalizerWrapper, PostProcessorWrapper, PreTokenizerWrapper};
use tokenizer... | tokenizers/tokenizers/tests/documentation.rs/0 | {
"file_path": "tokenizers/tokenizers/tests/documentation.rs",
"repo_id": "tokenizers",
"token_count": 7402
} | 247 |
.PHONY: deps_table_update modified_only_fixup extra_style_checks quality style fixup fix-copies test test-examples
# make sure to test the local checkout in scripts and not the pre-installed one (don't use quotes!)
export PYTHONPATH = src
check_dirs := examples tests src utils
exclude_folders := examples/research_pr... | transformers/Makefile/0 | {
"file_path": "transformers/Makefile",
"repo_id": "transformers",
"token_count": 1325
} | 248 |
# 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/conftest.py/0 | {
"file_path": "transformers/conftest.py",
"repo_id": "transformers",
"token_count": 1803
} | 249 |
<!---
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 applicable law or ... | transformers/docs/README.md/0 | {
"file_path": "transformers/docs/README.md",
"repo_id": "transformers",
"token_count": 4835
} | 250 |
<!--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 applicable law or agreed... | transformers/docs/source/de/pipeline_tutorial.md/0 | {
"file_path": "transformers/docs/source/de/pipeline_tutorial.md",
"repo_id": "transformers",
"token_count": 3003
} | 251 |
<!--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 applicable law or agreed... | transformers/docs/source/en/autoclass_tutorial.md/0 | {
"file_path": "transformers/docs/source/en/autoclass_tutorial.md",
"repo_id": "transformers",
"token_count": 2553
} | 252 |
<!--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 applicable law or agreed... | transformers/docs/source/en/main_classes/backbones.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/backbones.md",
"repo_id": "transformers",
"token_count": 689
} | 253 |
<!--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 applicable law or agreed... | transformers/docs/source/en/main_classes/text_generation.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/text_generation.md",
"repo_id": "transformers",
"token_count": 596
} | 254 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/bert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bert.md",
"repo_id": "transformers",
"token_count": 4645
} | 255 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/canine.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/canine.md",
"repo_id": "transformers",
"token_count": 1723
} | 256 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/cvt.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/cvt.md",
"repo_id": "transformers",
"token_count": 1314
} | 257 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/flava.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/flava.md",
"repo_id": "transformers",
"token_count": 916
} | 258 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/gptsan-japanese.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/gptsan-japanese.md",
"repo_id": "transformers",
"token_count": 1659
} | 259 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/led.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/led.md",
"repo_id": "transformers",
"token_count": 1602
} | 260 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/mask2former.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mask2former.md",
"repo_id": "transformers",
"token_count": 1219
} | 261 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/open-llama.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/open-llama.md",
"repo_id": "transformers",
"token_count": 620
} | 262 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/pop2piano.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/pop2piano.md",
"repo_id": "transformers",
"token_count": 2624
} | 263 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/roformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/roformer.md",
"repo_id": "transformers",
"token_count": 1450
} | 264 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/stablelm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/stablelm.md",
"repo_id": "transformers",
"token_count": 1373
} | 265 |
<!--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 applicable law or agreed... | transformers/docs/source/en/model_doc/transfo-xl.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/transfo-xl.md",
"repo_id": "transformers",
"token_count": 2000
} | 266 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/vision-text-dual-encoder.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vision-text-dual-encoder.md",
"repo_id": "transformers",
"token_count": 652
} | 267 |
<!--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 applicable law or agreed... | transformers/docs/source/en/multilingual.md/0 | {
"file_path": "transformers/docs/source/en/multilingual.md",
"repo_id": "transformers",
"token_count": 2588
} | 268 |
<!--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 applicable law or agreed... | transformers/docs/source/en/philosophy.md/0 | {
"file_path": "transformers/docs/source/en/philosophy.md",
"repo_id": "transformers",
"token_count": 1518
} | 269 |
# docstyle-ignore
INSTALL_CONTENT = """
# Transformers installation
! pip install transformers datasets
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/transformers.git
"""
notebook_first_cells = [{"type... | transformers/docs/source/es/_config.py/0 | {
"file_path": "transformers/docs/source/es/_config.py",
"repo_id": "transformers",
"token_count": 155
} | 270 |
<!---
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 applicable law or ... | transformers/docs/source/es/installation.md/0 | {
"file_path": "transformers/docs/source/es/installation.md",
"repo_id": "transformers",
"token_count": 3639
} | 271 |
<!--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 applicable law or agreed... | transformers/docs/source/es/tasks/image_captioning.md/0 | {
"file_path": "transformers/docs/source/es/tasks/image_captioning.md",
"repo_id": "transformers",
"token_count": 3231
} | 272 |
<!--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 applicable law or agreed... | transformers/docs/source/fr/quicktour.md/0 | {
"file_path": "transformers/docs/source/fr/quicktour.md",
"repo_id": "transformers",
"token_count": 10739
} | 273 |
<!---
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 applicable law or ... | transformers/docs/source/it/installation.md/0 | {
"file_path": "transformers/docs/source/it/installation.md",
"repo_id": "transformers",
"token_count": 3585
} | 274 |
<!--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 applicable law or agreed... | transformers/docs/source/it/quicktour.md/0 | {
"file_path": "transformers/docs/source/it/quicktour.md",
"repo_id": "transformers",
"token_count": 6490
} | 275 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/custom_models.md/0 | {
"file_path": "transformers/docs/source/ja/custom_models.md",
"repo_id": "transformers",
"token_count": 7501
} | 276 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/main_classes/processors.md/0 | {
"file_path": "transformers/docs/source/ja/main_classes/processors.md",
"repo_id": "transformers",
"token_count": 3103
} | 277 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/model_doc/bert-generation.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bert-generation.md",
"repo_id": "transformers",
"token_count": 1974
} | 278 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/model_doc/byt5.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/byt5.md",
"repo_id": "transformers",
"token_count": 3268
} | 279 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/model_doc/ctrl.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/ctrl.md",
"repo_id": "transformers",
"token_count": 2127
} | 280 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/multilingual.md/0 | {
"file_path": "transformers/docs/source/ja/multilingual.md",
"repo_id": "transformers",
"token_count": 4144
} | 281 |
<!--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 applicable law or agreed... | transformers/docs/source/ja/tasks/video_classification.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/video_classification.md",
"repo_id": "transformers",
"token_count": 10074
} | 282 |
<!--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 applicable law or agreed... | transformers/docs/source/ko/add_new_model.md/0 | {
"file_path": "transformers/docs/source/ko/add_new_model.md",
"repo_id": "transformers",
"token_count": 43462
} | 283 |
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->
# 열심히 번역 중입니다. 조금 이따 만나요! | transformers/docs/source/ko/in_translation.md/0 | {
"file_path": "transformers/docs/source/ko/in_translation.md",
"repo_id": "transformers",
"token_count": 95
} | 284 |
<!--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 applicable law or agreed... | transformers/docs/source/ko/perf_infer_gpu_one.md/0 | {
"file_path": "transformers/docs/source/ko/perf_infer_gpu_one.md",
"repo_id": "transformers",
"token_count": 6492
} | 285 |
<!--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 applicable law or agreed... | transformers/docs/source/ko/task_summary.md/0 | {
"file_path": "transformers/docs/source/ko/task_summary.md",
"repo_id": "transformers",
"token_count": 15732
} | 286 |
<!--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 applicable law or agreed... | transformers/docs/source/ko/tasks/translation.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/translation.md",
"repo_id": "transformers",
"token_count": 9737
} | 287 |
<!--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 applicable law or agreed... | transformers/docs/source/zh/fast_tokenizers.md/0 | {
"file_path": "transformers/docs/source/zh/fast_tokenizers.md",
"repo_id": "transformers",
"token_count": 1249
} | 288 |
<!--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 applicable law or agreed... | transformers/docs/source/zh/main_classes/callback.md/0 | {
"file_path": "transformers/docs/source/zh/main_classes/callback.md",
"repo_id": "transformers",
"token_count": 2183
} | 289 |
<!--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 applicable law or agreed... | transformers/docs/source/zh/tflite.md/0 | {
"file_path": "transformers/docs/source/zh/tflite.md",
"repo_id": "transformers",
"token_count": 1386
} | 290 |
#!/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/flax/language-modeling/run_mlm_flax.py/0 | {
"file_path": "transformers/examples/flax/language-modeling/run_mlm_flax.py",
"repo_id": "transformers",
"token_count": 17238
} | 291 |
#!/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/flax/text-classification/run_flax_glue.py/0 | {
"file_path": "transformers/examples/flax/text-classification/run_flax_glue.py",
"repo_id": "transformers",
"token_count": 12137
} | 292 |
import argparse
import glob
import logging
import os
import time
from argparse import Namespace
import numpy as np
import torch
from lightning_base import BaseTransformer, add_generic_args, generic_train
from torch.utils.data import DataLoader, TensorDataset
from transformers import glue_compute_metrics as compute_me... | transformers/examples/legacy/pytorch-lightning/run_glue.py/0 | {
"file_path": "transformers/examples/legacy/pytorch-lightning/run_glue.py",
"repo_id": "transformers",
"token_count": 3476
} | 293 |
#!/usr/bin/env python
# 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... | transformers/examples/legacy/seq2seq/convert_model_to_fp16.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/convert_model_to_fp16.py",
"repo_id": "transformers",
"token_count": 450
} | 294 |
#!/usr/bin/env python
# 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... | transformers/examples/legacy/seq2seq/run_distributed_eval.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/run_distributed_eval.py",
"repo_id": "transformers",
"token_count": 4164
} | 295 |
<!---
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 applicable law or a... | transformers/examples/pytorch/README.md/0 | {
"file_path": "transformers/examples/pytorch/README.md",
"repo_id": "transformers",
"token_count": 6250
} | 296 |
#!/usr/bin/env python
# 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/LI... | transformers/examples/pytorch/image-pretraining/run_mim.py/0 | {
"file_path": "transformers/examples/pytorch/image-pretraining/run_mim.py",
"repo_id": "transformers",
"token_count": 8028
} | 297 |
# coding=utf-8
# Copyright 2018 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/examples/pytorch/old_test_xla_examples.py/0 | {
"file_path": "transformers/examples/pytorch/old_test_xla_examples.py",
"repo_id": "transformers",
"token_count": 1249
} | 298 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 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/pytorch/text-classification/run_glue.py/0 | {
"file_path": "transformers/examples/pytorch/text-classification/run_glue.py",
"repo_id": "transformers",
"token_count": 11739
} | 299 |
#!/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/pytorch/translation/run_translation_no_trainer.py/0 | {
"file_path": "transformers/examples/pytorch/translation/run_translation_no_trainer.py",
"repo_id": "transformers",
"token_count": 13757
} | 300 |
# coding=utf-8
# Copyright 2019 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
#
# http://www.a... | transformers/examples/research_projects/bertabs/configuration_bertabs.py/0 | {
"file_path": "transformers/examples/research_projects/bertabs/configuration_bertabs.py",
"repo_id": "transformers",
"token_count": 1345
} | 301 |
from arguments import TokenizerTrainingArguments
from datasets import load_dataset
from tqdm import tqdm
from transformers import AutoTokenizer, HfArgumentParser
from transformers.models.gpt2.tokenization_gpt2 import bytes_to_unicode
# Iterator for Training
def batch_iterator(batch_size=10):
for _ in tqdm(range(... | transformers/examples/research_projects/codeparrot/scripts/bpe_training.py/0 | {
"file_path": "transformers/examples/research_projects/codeparrot/scripts/bpe_training.py",
"repo_id": "transformers",
"token_count": 347
} | 302 |
from __future__ import absolute_import, division, print_function
import argparse
import glob
import logging
import os
import random
import time
import numpy as np
import torch
from torch import nn
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from torch.utils.data.distribute... | transformers/examples/research_projects/deebert/run_glue_deebert.py/0 | {
"file_path": "transformers/examples/research_projects/deebert/run_glue_deebert.py",
"repo_id": "transformers",
"token_count": 13897
} | 303 |
# coding=utf-8
# Copyright 2019-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 a... | transformers/examples/research_projects/distillation/train.py/0 | {
"file_path": "transformers/examples/research_projects/distillation/train.py",
"repo_id": "transformers",
"token_count": 5147
} | 304 |
# Copyright 2022 - Intel Corp. All rights reserved.
# Authors: Mayank Kumar Raunak, Javier Turek, Nicole Backage
import copy
import logging
import random
import joblib
import numpy as np
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AdamW, G... | transformers/examples/research_projects/information-gain-filtration/igf/igf.py/0 | {
"file_path": "transformers/examples/research_projects/information-gain-filtration/igf/igf.py",
"repo_id": "transformers",
"token_count": 6117
} | 305 |
import copy
from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
logger = logging.get_logger(__name__)
class HybridCLIPConfig(PretrainedConfig):
r"""
:class:`HybridCLIPConfig` is the configuration class to store the configuration of a
:class:`~HybridCLIPM... | transformers/examples/research_projects/jax-projects/hybrid_clip/configuration_hybrid_clip.py/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/hybrid_clip/configuration_hybrid_clip.py",
"repo_id": "transformers",
"token_count": 1634
} | 306 |
# Token classification
## PyTorch version, no Trainer
Fine-tuning (m)LUKE for token classification task such as Named Entity Recognition (NER), Parts-of-speech
tagging (POS) or phrase extraction (CHUNKS). You can easily
customize it to your needs if you need extra processing on your datasets.
It will either run on a... | transformers/examples/research_projects/luke/README.md/0 | {
"file_path": "transformers/examples/research_projects/luke/README.md",
"repo_id": "transformers",
"token_count": 667
} | 307 |
# 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... | transformers/examples/research_projects/mm-imdb/run_mmimdb.py/0 | {
"file_path": "transformers/examples/research_projects/mm-imdb/run_mmimdb.py",
"repo_id": "transformers",
"token_count": 10119
} | 308 |
import copy
import itertools
from typing import List, Optional, Tuple
import torch
import torch.nn.functional as F
from transformers import BartConfig
from transformers.generation import GenerationMixin
def _convert_past_list_to_tuple(past_key_values):
"""
In Bart model, the type of past_key_values is tuple... | transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py/0 | {
"file_path": "transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py",
"repo_id": "transformers",
"token_count": 15163
} | 309 |
#! /usr/bin/env python3
# coding=utf-8
# Copyright (c) 2019 Uber Technologies, 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 ... | transformers/examples/research_projects/pplm/run_pplm_discrim_train.py/0 | {
"file_path": "transformers/examples/research_projects/pplm/run_pplm_discrim_train.py",
"repo_id": "transformers",
"token_count": 8849
} | 310 |
import argparse
import logging
import os
from pathlib import Path
from typing import Any, Dict
import pytorch_lightning as pl
from pytorch_lightning.utilities import rank_zero_info
from transformers import (
AdamW,
AutoConfig,
AutoModel,
AutoModelForPreTraining,
AutoModelForQuestionAnswering,
... | transformers/examples/research_projects/rag-end2end-retriever/lightning_base.py/0 | {
"file_path": "transformers/examples/research_projects/rag-end2end-retriever/lightning_base.py",
"repo_id": "transformers",
"token_count": 7006
} | 311 |
import logging
from pathlib import Path
import numpy as np
import pytorch_lightning as pl
import torch
from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
from pytorch_lightning.utilities import rank_zero_only
from utils_rag import save_json
def count_trainable_parameters(model):
model_paramet... | transformers/examples/research_projects/rag/callbacks_rag.py/0 | {
"file_path": "transformers/examples/research_projects/rag/callbacks_rag.py",
"repo_id": "transformers",
"token_count": 1946
} | 312 |
#!/usr/bin/env python3
import argparse
import re
from typing import Dict
import torch
from datasets import Audio, Dataset, load_dataset, load_metric
from transformers import AutoFeatureExtractor, pipeline
def log_results(result: Dataset, args: Dict[str, str]):
"""DO NOT CHANGE. This function computes and logs t... | transformers/examples/research_projects/robust-speech-event/eval.py/0 | {
"file_path": "transformers/examples/research_projects/robust-speech-event/eval.py",
"repo_id": "transformers",
"token_count": 1852
} | 313 |
#!/usr/bin/env bash
export PYTHONPATH="../":"${PYTHONPATH}"
export WANDB_PROJECT=dmar
export MAX_LEN=128
python finetune.py \
--learning_rate=3e-4 \
--do_train \
--do_predict \
--fp16 \
--val_check_interval 0.25 \
--data_dir $ENRO_DIR \
--max_source_length $MAX_LEN --max_target_length $MAX_LEN --val_max_t... | transformers/examples/research_projects/seq2seq-distillation/distil_marian_no_teacher.sh/0 | {
"file_path": "transformers/examples/research_projects/seq2seq-distillation/distil_marian_no_teacher.sh",
"repo_id": "transformers",
"token_count": 274
} | 314 |
#!/usr/bin/env bash
export PYTHONPATH="../":"${PYTHONPATH}"
python finetune.py \
--learning_rate=3e-5 \
--fp16 \
--do_train \
--val_check_interval=0.25 \
--adam_eps 1e-06 \
--num_train_epochs 6 --src_lang en_XX --tgt_lang ro_RO \
--data_dir $ENRO_DIR \
--max_source_length $MAX_LEN --max... | transformers/examples/research_projects/seq2seq-distillation/train_mbart_cc25_enro.sh/0 | {
"file_path": "transformers/examples/research_projects/seq2seq-distillation/train_mbart_cc25_enro.sh",
"repo_id": "transformers",
"token_count": 273
} | 315 |
# Simple VQGAN CLIP
Author: @ErwannMillon
This is a very simple VQGAN-CLIP implementation that was built as a part of the <a href= "https://github.com/ErwannMillon/face-editor"> Face Editor project </a> . This simplified version allows you to generate or edit images using text with just three lines of code. For a mo... | transformers/examples/research_projects/vqgan-clip/README.md/0 | {
"file_path": "transformers/examples/research_projects/vqgan-clip/README.md",
"repo_id": "transformers",
"token_count": 777
} | 316 |
#!/usr/bin/env bash
python run_common_voice.py \
--model_name_or_path="facebook/wav2vec2-large-xlsr-53" \
--dataset_config_name="tr" \
--output_dir=./wav2vec2-large-xlsr-turkish-demo \
--overwrite_output_dir \
--num_train_epochs="5" \
--per_device_train_batch_size="16" \
--evaluation_strateg... | transformers/examples/research_projects/wav2vec2/finetune_wav2vec2_xlsr_turkish.sh/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/finetune_wav2vec2_xlsr_turkish.sh",
"repo_id": "transformers",
"token_count": 316
} | 317 |
<!---
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 applicable law or ... | transformers/examples/tensorflow/benchmarking/README.md/0 | {
"file_path": "transformers/examples/tensorflow/benchmarking/README.md",
"repo_id": "transformers",
"token_count": 501
} | 318 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 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_glue.py/0 | {
"file_path": "transformers/examples/tensorflow/text-classification/run_glue.py",
"repo_id": "transformers",
"token_count": 11377
} | 319 |
#!/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/convert-allenai-wmt19.sh/0 | {
"file_path": "transformers/scripts/fsmt/convert-allenai-wmt19.sh",
"repo_id": "transformers",
"token_count": 950
} | 320 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/setup.py/0 | {
"file_path": "transformers/setup.py",
"repo_id": "transformers",
"token_count": 6420
} | 321 |
# 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/convert.py/0 | {
"file_path": "transformers/src/transformers/commands/convert.py",
"repo_id": "transformers",
"token_count": 3159
} | 322 |
# THIS FILE HAS BEEN AUTOGENERATED. To update:
# 1. modify the `_deps` dict in setup.py
# 2. run `make deps_table_update``
deps = {
"Pillow": "Pillow>=10.0.1,<=15.0",
"accelerate": "accelerate>=0.21.0",
"av": "av==9.2.0",
"beautifulsoup4": "beautifulsoup4",
"codecarbon": "codecarbon==1.2.0",
"co... | transformers/src/transformers/dependency_versions_table.py/0 | {
"file_path": "transformers/src/transformers/dependency_versions_table.py",
"repo_id": "transformers",
"token_count": 1755
} | 323 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/src/transformers/generation/tf_utils.py/0 | {
"file_path": "transformers/src/transformers/generation/tf_utils.py",
"repo_id": "transformers",
"token_count": 76509
} | 324 |
# 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/integrations/peft.py/0 | {
"file_path": "transformers/src/transformers/integrations/peft.py",
"repo_id": "transformers",
"token_count": 9185
} | 325 |
/*!
**************************************************************************************************
* 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/cuda/ms_deform_attn_cuda.h/0 | {
"file_path": "transformers/src/transformers/kernels/deta/cuda/ms_deform_attn_cuda.h",
"repo_id": "transformers",
"token_count": 353
} | 326 |
#include <torch/extension.h>
#include <ATen/ATen.h>
#include <vector>
std::vector<at::Tensor> fast_hash_ver1_kernel(
at::Tensor query_mask,
at::Tensor query_vector,
at::Tensor key_mask,
at::Tensor key_vector,
int num_hash_f,
int hash_code_len,
bool use_cuda
);
at::Tensor lsh_cumulation_ver1_kernel(
at... | transformers/src/transformers/kernels/yoso/fast_lsh_cumulation.h/0 | {
"file_path": "transformers/src/transformers/kernels/yoso/fast_lsh_cumulation.h",
"repo_id": "transformers",
"token_count": 639
} | 327 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/src/transformers/models/albert/configuration_albert.py/0 | {
"file_path": "transformers/src/transformers/models/albert/configuration_albert.py",
"repo_id": "transformers",
"token_count": 3466
} | 328 |
# 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/autoformer/configuration_autoformer.py/0 | {
"file_path": "transformers/src/transformers/models/autoformer/configuration_autoformer.py",
"repo_id": "transformers",
"token_count": 4684
} | 329 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | transformers/src/transformers/models/bert/convert_bert_pytorch_checkpoint_to_original_tf.py/0 | {
"file_path": "transformers/src/transformers/models/bert/convert_bert_pytorch_checkpoint_to_original_tf.py",
"repo_id": "transformers",
"token_count": 1660
} | 330 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/src/transformers/models/big_bird/__init__.py/0 | {
"file_path": "transformers/src/transformers/models/big_bird/__init__.py",
"repo_id": "transformers",
"token_count": 1883
} | 331 |
# coding=utf-8
# Copyright 2021 The Facebook, Inc. and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | transformers/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py/0 | {
"file_path": "transformers/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py",
"repo_id": "transformers",
"token_count": 28645
} | 332 |
# coding=utf-8
# Copyright 2023 The Salesforce Authors and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | transformers/src/transformers/models/blip_2/modeling_blip_2.py/0 | {
"file_path": "transformers/src/transformers/models/blip_2/modeling_blip_2.py",
"repo_id": "transformers",
"token_count": 35175
} | 333 |
# coding=utf-8
# Copyright 2023-present NAVER Corp, 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
#
# ht... | transformers/src/transformers/models/bros/modeling_bros.py/0 | {
"file_path": "transformers/src/transformers/models/bros/modeling_bros.py",
"repo_id": "transformers",
"token_count": 25108
} | 334 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.