text
stringlengths
7
1.24M
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
519
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 3735, "logprob": -8.5625, "text": "Test" }, { "id": 2159,...
text-generation-inference/integration-tests/models/__snapshots__/test_idefics2/test_flash_idefics2_next_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_idefics2/test_flash_idefics2_next_all_params.json", "repo_id": "text-generation-inference", "token_count": 1042 }
207
{ "details": { "best_of_sequences": null, "finish_reason": "eos_token", "generated_tokens": 5, "prefill": [ { "id": 0, "logprob": null, "text": "<pad>" } ], "seed": 0, "tokens": [ { "id": 926, "logprob": -4.3554688, "special...
text-generation-inference/integration-tests/models/__snapshots__/test_mt0_base/test_mt0_base.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_mt0_base/test_mt0_base.json", "repo_id": "text-generation-inference", "token_count": 532 }
208
{ "choices": [ { "delta": { "content": null, "role": "assistant", "tool_calls": { "function": { "arguments": "</s>", "name": null }, "id": "", "index": 0, "type": "function" } }, "finish_rea...
text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_stream.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_stream.json", "repo_id": "text-generation-inference", "token_count": 318 }
209
import pytest @pytest.fixture(scope="module") def flash_llama_fp8_handle(launcher): with launcher("meta-llama/Meta-Llama-3-8B", num_shard=2, quantize="fp8") as handle: yield handle @pytest.fixture(scope="module") async def flash_llama_fp8(flash_llama_fp8_handle): await flash_llama_fp8_handle.health(...
text-generation-inference/integration-tests/models/test_flash_llama_fp8.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_llama_fp8.py", "repo_id": "text-generation-inference", "token_count": 802 }
210
import pytest import requests from pydantic import BaseModel from typing import List @pytest.fixture(scope="module") def llama_grammar_handle(launcher): with launcher( "TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=1, disable_grammar_support=False, use_flash_attention=False, ...
text-generation-inference/integration-tests/models/test_grammar_response_format_llama.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_grammar_response_format_llama.py", "repo_id": "text-generation-inference", "token_count": 1493 }
211
use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(tag = "model_type")] #[serde(rename_all = "snake_case")] pub struct LlavaNext { pub(crate) text_config: TextConfig, pub(crate) vision_config: VisionConfig, pub(crate) image_grid_pinpoints: Vec<(usize, usize)>, } f...
text-generation-inference/router/src/config.rs/0
{ "file_path": "text-generation-inference/router/src/config.rs", "repo_id": "text-generation-inference", "token_count": 3017 }
212
// Adapted from turboderp exllama: https://github.com/turboderp/exllama #ifndef _cuda_compat_cuh #define _cuda_compat_cuh // atomicAdd for half types, to support CC < 7.x __device__ __forceinline__ void atomicAdd_half(half* address, half val) { unsigned int * address_as_ui = (unsigned int *) ((char *)address - (...
text-generation-inference/server/exllama_kernels/exllama_kernels/cu_compat.cuh/0
{ "file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cu_compat.cuh", "repo_id": "text-generation-inference", "token_count": 692 }
213
#ifndef _util_h #define _util_h #define DBGS(__x) printf("%s\n", __x) #define DBGI(__x) printf("%s: %i\n", #__x, __x) #define DBGI2(__x, __y) printf("%s, %s: %i, %i\n", #__x, #__y, __x, __y) #define DBGI3(__x, __y, __z) printf("%s, %s, %s: %i, %i, %i\n", #__x, #__y, #__z, __x, __y, __z) #define DBGF(__x) printf("%s: %...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cpp/util.h/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cpp/util.h", "repo_id": "text-generation-inference", "token_count": 296 }
214
#ifndef _util_cuh #define _util_cuh #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cstdio> #include <ATen/cuda/CUDAContext.h> #define DIVIDE(x, size) (((x) + (size) - 1) / (size)) #define DBGS(__x) printf("%s\n", __x) #define DBGI(__x) printf("%s: %i\n", #__x, __x) #define DBGI2(__x, _...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/util.cuh/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/util.cuh", "repo_id": "text-generation-inference", "token_count": 1115 }
215
import os import tempfile import pytest import huggingface_hub.constants import text_generation_server.utils.hub from text_generation_server.utils.hub import ( weight_hub_files, download_weights, weight_files, EntryNotFoundError, LocalEntryNotFoundError, RevisionNotFoundError, ) @pytest.fix...
text-generation-inference/server/tests/utils/test_hub.py/0
{ "file_path": "text-generation-inference/server/tests/utils/test_hub.py", "repo_id": "text-generation-inference", "token_count": 1250 }
216
import torch from text_generation_server.utils.import_utils import SYSTEM from text_generation_server.models.globals import ( ATTENTION, BLOCK_SIZE, ) from text_generation_server.layers.attention import Seqlen from typing import Optional major, minor = torch.cuda.get_device_capability() is_sm75 = major == 7 an...
text-generation-inference/server/text_generation_server/layers/attention/cuda.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/attention/cuda.py", "repo_id": "text-generation-inference", "token_count": 5731 }
217
import math import numpy as np import torch import torch.nn as nn from torch.cuda.amp import custom_fwd import triton import triton.language as tl from . import custom_autotune # code based https://github.com/fpgaminer/GPTQ-triton @custom_autotune.autotune( configs=[ triton.Config( { ...
text-generation-inference/server/text_generation_server/layers/gptq/quant_linear.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/gptq/quant_linear.py", "repo_id": "text-generation-inference", "token_count": 6287 }
218
# ruff: noqa: F821 # the above line disables the `undefined-name` rule for the model type variables import torch import enum import os from loguru import logger from transformers.configuration_utils import PretrainedConfig from transformers.models.auto import modeling_auto from huggingface_hub import hf_hub_download,...
text-generation-inference/server/text_generation_server/models/__init__.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/__init__.py", "repo_id": "text-generation-inference", "token_count": 24348 }
219
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
text-generation-inference/server/text_generation_server/models/custom_modeling/flash_neox_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_neox_modeling.py", "repo_id": "text-generation-inference", "token_count": 6480 }
220
"""A simple, flexible implementation of a GPT model. Inspired by https://github.com/karpathy/minGPT/blob/master/mingpt/model.py """ import math import warnings from typing import List, Optional, Tuple, Union import torch import torch.nn as nn import torch.nn.functional as F from transformers import PreTrainedModel, P...
text-generation-inference/server/text_generation_server/models/custom_modeling/mpt_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/mpt_modeling.py", "repo_id": "text-generation-inference", "token_count": 23706 }
221
import torch from abc import ABC, abstractmethod from dataclasses import dataclass from typing import List, Optional from transformers import PreTrainedTokenizerBase from text_generation_server.pb import generate_pb2 from text_generation_server.pb.generate_pb2 import FinishReason class Batch(ABC): @abstractmet...
text-generation-inference/server/text_generation_server/models/types.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/types.py", "repo_id": "text-generation-inference", "token_count": 1219 }
222
import os from typing import Union from loguru import logger import torch from transformers import AutoTokenizer from peft import AutoPeftModelForCausalLM, AutoPeftModelForSeq2SeqLM def download_and_unload_peft(model_id, revision, trust_remote_code): torch_dtype = torch.float16 logger.info("Trying to load a...
text-generation-inference/server/text_generation_server/utils/peft.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/peft.py", "repo_id": "text-generation-inference", "token_count": 981 }
223
# `tokenizers-darwin-x64` This is the **x86_64-apple-darwin** binary for `tokenizers`
tokenizers/bindings/node/npm/darwin-x64/README.md/0
{ "file_path": "tokenizers/bindings/node/npm/darwin-x64/README.md", "repo_id": "tokenizers", "token_count": 34 }
224
# `tokenizers-win32-ia32-msvc` This is the **i686-pc-windows-msvc** binary for `tokenizers`
tokenizers/bindings/node/npm/win32-ia32-msvc/README.md/0
{ "file_path": "tokenizers/bindings/node/npm/win32-ia32-msvc/README.md", "repo_id": "tokenizers", "token_count": 37 }
225
extern crate tokenizers as tk; use crate::encoding::*; use crate::tokenizer::Tokenizer; use napi::bindgen_prelude::*; use tk::tokenizer::{EncodeInput, Encoding}; pub struct EncodeTask<'s> { pub tokenizer: Tokenizer, pub input: Option<EncodeInput<'s>>, pub add_special_tokens: bool, } impl Task for EncodeTask<'s...
tokenizers/bindings/node/src/tasks/tokenizer.rs/0
{ "file_path": "tokenizers/bindings/node/src/tasks/tokenizer.rs", "repo_id": "tokenizers", "token_count": 1295 }
226
from typing import List import jieba from tokenizers import NormalizedString, PreTokenizedString, Regex, Tokenizer from tokenizers.decoders import Decoder from tokenizers.models import BPE from tokenizers.normalizers import Normalizer from tokenizers.pre_tokenizers import PreTokenizer class JiebaPreTokenizer: de...
tokenizers/bindings/python/examples/custom_components.py/0
{ "file_path": "tokenizers/bindings/python/examples/custom_components.py", "repo_id": "tokenizers", "token_count": 1293 }
227
import json import os from typing import Iterator, List, Optional, Union, Tuple from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers from tokenizers.models import Unigram from .base_tokenizer import BaseTokenizer class SentencePieceUnigramTokenizer(BaseTokenizer): ...
tokenizers/bindings/python/py_src/tokenizers/implementations/sentencepiece_unigram.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/implementations/sentencepiece_unigram.py", "repo_id": "tokenizers", "token_count": 3405 }
228
import transformers from tokenizers.implementations import SentencePieceUnigramTokenizer, BaseTokenizer from tokenizers.processors import TemplateProcessing from tokenizers.models import Unigram, BPE from tokenizers import decoders from tokenizers import Tokenizer, Regex from tokenizers.normalizers import ( StripAc...
tokenizers/bindings/python/scripts/convert.py/0
{ "file_path": "tokenizers/bindings/python/scripts/convert.py", "repo_id": "tokenizers", "token_count": 6304 }
229
use std::marker::PhantomData; use std::sync::{Arc, Mutex}; mod iterators; mod normalization; mod pretokenization; mod regex; pub mod serde_pyo3; pub use iterators::*; pub use normalization::*; pub use pretokenization::*; pub use regex::*; // RefMut utils pub trait DestroyPtr { fn destroy(&mut self); } pub stru...
tokenizers/bindings/python/src/utils/mod.rs/0
{ "file_path": "tokenizers/bindings/python/src/utils/mod.rs", "repo_id": "tokenizers", "token_count": 759 }
230
import copy import os import pickle import pytest from tokenizers import ( AddedToken, SentencePieceUnigramTokenizer, Tokenizer, models, normalizers, pre_tokenizers, trainers, ) from ..utils import data_dir, train_files class TestBpeTrainer: def test_can_modify(self): traine...
tokenizers/bindings/python/tests/bindings/test_trainers.py/0
{ "file_path": "tokenizers/bindings/python/tests/bindings/test_trainers.py", "repo_id": "tokenizers", "token_count": 4957 }
231
# Added Tokens <tokenizerslangcontent> <python> ## AddedToken [[autodoc]] tokenizers.AddedToken - content - lstrip - normalized - rstrip - single_word </python> <rust> The Rust API Reference is available directly on the [Docs.rs](https://docs.rs/tokenizers/latest/tokenizers/) website. </rust> <nod...
tokenizers/docs/source-doc-builder/api/added-tokens.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/api/added-tokens.mdx", "repo_id": "tokenizers", "token_count": 134 }
232
# Quicktour Let's have a quick look at the 🤗 Tokenizers library features. The library provides an implementation of today's most used tokenizers that is both easy to use and blazing fast. ## Build a tokenizer from scratch To illustrate how fast the 🤗 Tokenizers library is, let's train a new tokenizer on [wikitext-...
tokenizers/docs/source-doc-builder/quicktour.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/quicktour.mdx", "repo_id": "tokenizers", "token_count": 7936 }
233
Components ==================================================================================================== When building a Tokenizer, you can attach various types of components to this Tokenizer in order to customize its behavior. This page lists most provided components. .. _normalizers: .. entities:: python ...
tokenizers/docs/source/components.rst/0
{ "file_path": "tokenizers/docs/source/components.rst", "repo_id": "tokenizers", "token_count": 4236 }
234
<p align="center"> <br> <img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/> <br> <p> <p align="center"> <img alt="Build" src="https://github.com/huggingface/tokenizers/workflows/Rust/badge.svg"> <a href="https://github.com/huggingface/tokenizers/blob/master/...
tokenizers/tokenizers/README.tpl/0
{ "file_path": "tokenizers/tokenizers/README.tpl", "repo_id": "tokenizers", "token_count": 259 }
235
pub mod bpe; pub mod byte_fallback; pub mod ctc; pub mod fuse; pub mod sequence; pub mod strip; pub mod wordpiece; // Re-export these as decoders pub use super::pre_tokenizers::byte_level; pub use super::pre_tokenizers::metaspace; use serde::{Deserialize, Deserializer, Serialize}; use crate::decoders::bpe::BPEDecode...
tokenizers/tokenizers/src/decoders/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/decoders/mod.rs", "repo_id": "tokenizers", "token_count": 4660 }
236
use std::collections::HashMap; use std::hash::Hash; #[derive(Default)] pub struct TrieBuilder<Label> { trie: Trie<Label>, } impl<Label: Eq + Hash + Copy> TrieBuilder<Label> { pub fn push(&mut self, element: &[Label]) { self.trie.push(element); } pub fn build(self) -> Trie<Label> { sel...
tokenizers/tokenizers/src/models/unigram/trie.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/unigram/trie.rs", "repo_id": "tokenizers", "token_count": 944 }
237
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior}; use crate::utils::macro_rules_attribute; use unicode_categories::UnicodeCategories; fn is_bert_punc(x: char) -> bool { char::is_ascii_punctuation(&x) || x.is_punctuation() } #[derive(Copy, Clone, Debug, PartialEq, Eq)] #[mac...
tokenizers/tokenizers/src/pre_tokenizers/bert.rs/0
{ "file_path": "tokenizers/tokenizers/src/pre_tokenizers/bert.rs", "repo_id": "tokenizers", "token_count": 1460 }
238
use crate::processors::PostProcessorWrapper; use crate::tokenizer::{Encoding, PostProcessor, Result}; use crate::utils::macro_rules_attribute; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Eq)] #[macro_rules_attribute(impl_serde_type!)] pub struct Sequence { processors: Vec<PostProcessorWr...
tokenizers/tokenizers/src/processors/sequence.rs/0
{ "file_path": "tokenizers/tokenizers/src/processors/sequence.rs", "repo_id": "tokenizers", "token_count": 2313 }
239
//! //! This module defines helpers to allow optional Rayon usage. //! use rayon::iter::IterBridge; use rayon::prelude::*; use rayon_cond::CondIterator; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; // Re-export rayon current_num_threads pub use rayon::current_num_threads; pub const ENV_VARIABL...
tokenizers/tokenizers/src/utils/parallelism.rs/0
{ "file_path": "tokenizers/tokenizers/src/utils/parallelism.rs", "repo_id": "tokenizers", "token_count": 3472 }
240
.PHONY: deps_table_update modified_only_fixup extra_style_checks quality style fixup fix-copies test test-examples benchmark # 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 := "" modif...
transformers/Makefile/0
{ "file_path": "transformers/Makefile", "repo_id": "transformers", "token_count": 1413 }
241
local base = import 'templates/base.libsonnet'; local tpus = import 'templates/tpus.libsonnet'; local utils = import "templates/utils.libsonnet"; local volumes = import "templates/volumes.libsonnet"; local bertBaseCased = base.BaseTest { frameworkPrefix: "hf", modelName: "bert-base-cased", mode: "example", con...
transformers/docker/transformers-pytorch-tpu/bert-base-cased.jsonnet/0
{ "file_path": "transformers/docker/transformers-pytorch-tpu/bert-base-cased.jsonnet", "repo_id": "transformers", "token_count": 371 }
242
<!--- 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/de/installation.md/0
{ "file_path": "transformers/docs/source/de/installation.md", "repo_id": "transformers", "token_count": 4000 }
243
<!--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/add_new_model.md/0
{ "file_path": "transformers/docs/source/en/add_new_model.md", "repo_id": "transformers", "token_count": 14006 }
244
<!--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/fast_tokenizers.md/0
{ "file_path": "transformers/docs/source/en/fast_tokenizers.md", "repo_id": "transformers", "token_count": 792 }
245
<!--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/main_classes/onnx.md/0
{ "file_path": "transformers/docs/source/en/main_classes/onnx.md", "repo_id": "transformers", "token_count": 523 }
246
<!--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/bart.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bart.md", "repo_id": "transformers", "token_count": 3297 }
247
<!--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/bloom.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bloom.md", "repo_id": "transformers", "token_count": 1158 }
248
<!--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/fuyu.md/0
{ "file_path": "transformers/docs/source/en/model_doc/fuyu.md", "repo_id": "transformers", "token_count": 1657 }
249
<!--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/layoutlmv2.md/0
{ "file_path": "transformers/docs/source/en/model_doc/layoutlmv2.md", "repo_id": "transformers", "token_count": 5361 }
250
<!--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/m2m_100.md/0
{ "file_path": "transformers/docs/source/en/model_doc/m2m_100.md", "repo_id": "transformers", "token_count": 2341 }
251
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Copyright (c) 2024, 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/lic...
transformers/docs/source/en/model_doc/nemotron.md/0
{ "file_path": "transformers/docs/source/en/model_doc/nemotron.md", "repo_id": "transformers", "token_count": 1671 }
252
<!--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/pegasus.md/0
{ "file_path": "transformers/docs/source/en/model_doc/pegasus.md", "repo_id": "transformers", "token_count": 1966 }
253
<!--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/rwkv.md/0
{ "file_path": "transformers/docs/source/en/model_doc/rwkv.md", "repo_id": "transformers", "token_count": 2548 }
254
<!--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/trocr.md/0
{ "file_path": "transformers/docs/source/en/model_doc/trocr.md", "repo_id": "transformers", "token_count": 2132 }
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/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 }
256
<!--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/perplexity.md/0
{ "file_path": "transformers/docs/source/en/perplexity.md", "repo_id": "transformers", "token_count": 2263 }
257
<!--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/quantization/quanto.md/0
{ "file_path": "transformers/docs/source/en/quantization/quanto.md", "repo_id": "transformers", "token_count": 958 }
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/tasks/knowledge_distillation_for_image_classification.md/0
{ "file_path": "transformers/docs/source/en/tasks/knowledge_distillation_for_image_classification.md", "repo_id": "transformers", "token_count": 2621 }
259
<!--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/tasks/video_text_to_text.md/0
{ "file_path": "transformers/docs/source/en/tasks/video_text_to_text.md", "repo_id": "transformers", "token_count": 2016 }
260
<!--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/es/add_new_pipeline.md/0
{ "file_path": "transformers/docs/source/es/add_new_pipeline.md", "repo_id": "transformers", "token_count": 4249 }
261
<!--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/es/multilingual.md/0
{ "file_path": "transformers/docs/source/es/multilingual.md", "repo_id": "transformers", "token_count": 3094 }
262
<!--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/es/tasks/image_classification.md/0
{ "file_path": "transformers/docs/source/es/tasks/image_classification.md", "repo_id": "transformers", "token_count": 2441 }
263
<!--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": 10740 }
264
<!--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/it/debugging.md/0
{ "file_path": "transformers/docs/source/it/debugging.md", "repo_id": "transformers", "token_count": 5635 }
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 ...
transformers/docs/source/it/pr_checks.md/0
{ "file_path": "transformers/docs/source/it/pr_checks.md", "repo_id": "transformers", "token_count": 2370 }
266
<!--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/create_a_model.md/0
{ "file_path": "transformers/docs/source/ja/create_a_model.md", "repo_id": "transformers", "token_count": 8236 }
267
<!--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/pipelines.md/0
{ "file_path": "transformers/docs/source/ja/main_classes/pipelines.md", "repo_id": "transformers", "token_count": 6647 }
268
<!--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/beit.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/beit.md", "repo_id": "transformers", "token_count": 3840 }
269
<!--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/model_doc/bros.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/bros.md", "repo_id": "transformers", "token_count": 3458 }
270
<!--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/model_summary.md/0
{ "file_path": "transformers/docs/source/ja/model_summary.md", "repo_id": "transformers", "token_count": 9488 }
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/ja/perf_train_tpu_tf.md/0
{ "file_path": "transformers/docs/source/ja/perf_train_tpu_tf.md", "repo_id": "transformers", "token_count": 7360 }
272
<!--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/image_captioning.md/0
{ "file_path": "transformers/docs/source/ja/tasks/image_captioning.md", "repo_id": "transformers", "token_count": 3779 }
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 agreed...
transformers/docs/source/ja/tasks/translation.md/0
{ "file_path": "transformers/docs/source/ja/tasks/translation.md", "repo_id": "transformers", "token_count": 7208 }
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/ko/accelerate.md/0
{ "file_path": "transformers/docs/source/ko/accelerate.md", "repo_id": "transformers", "token_count": 2885 }
275
<!--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/ko/fsdp.md/0
{ "file_path": "transformers/docs/source/ko/fsdp.md", "repo_id": "transformers", "token_count": 5834 }
276
<!--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/multilingual.md/0
{ "file_path": "transformers/docs/source/ko/multilingual.md", "repo_id": "transformers", "token_count": 5686 }
277
<!--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/ko/preprocessing.md/0
{ "file_path": "transformers/docs/source/ko/preprocessing.md", "repo_id": "transformers", "token_count": 17108 }
278
<!--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/image_classification.md/0
{ "file_path": "transformers/docs/source/ko/tasks/image_classification.md", "repo_id": "transformers", "token_count": 11497 }
279
<!--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": 9508 }
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/pt/tasks/token_classification.md/0
{ "file_path": "transformers/docs/source/pt/tasks/token_classification.md", "repo_id": "transformers", "token_count": 4235 }
281
<!--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/zh/debugging.md/0
{ "file_path": "transformers/docs/source/zh/debugging.md", "repo_id": "transformers", "token_count": 7278 }
282
<!-- 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 agree...
transformers/docs/source/zh/tasks/asr.md/0
{ "file_path": "transformers/docs/source/zh/tasks/asr.md", "repo_id": "transformers", "token_count": 7230 }
283
<!--- 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 ...
transformers/examples/flax/speech-recognition/README.md/0
{ "file_path": "transformers/examples/flax/speech-recognition/README.md", "repo_id": "transformers", "token_count": 1039 }
284
# 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/examples/legacy/question-answering/run_squad_trainer.py/0
{ "file_path": "transformers/examples/legacy/question-answering/run_squad_trainer.py", "repo_id": "transformers", "token_count": 2569 }
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 applicabl...
transformers/examples/legacy/seq2seq/old_test_datasets.py/0
{ "file_path": "transformers/examples/legacy/seq2seq/old_test_datasets.py", "repo_id": "transformers", "token_count": 5152 }
286
# 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/examples/legacy/seq2seq/seq2seq_training_args.py/0
{ "file_path": "transformers/examples/legacy/seq2seq/seq2seq_training_args.py", "repo_id": "transformers", "token_count": 888 }
287
# 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/examples/pytorch/object-detection/run_object_detection_no_trainer.py/0
{ "file_path": "transformers/examples/pytorch/object-detection/run_object_detection_no_trainer.py", "repo_id": "transformers", "token_count": 13064 }
288
<!--- 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 ...
transformers/examples/pytorch/speech-pretraining/README.md/0
{ "file_path": "transformers/examples/pytorch/speech-pretraining/README.md", "repo_id": "transformers", "token_count": 2600 }
289
#!/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_classification.py/0
{ "file_path": "transformers/examples/pytorch/text-classification/run_classification.py", "repo_id": "transformers", "token_count": 13913 }
290
#!/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.py/0
{ "file_path": "transformers/examples/pytorch/translation/run_translation.py", "repo_id": "transformers", "token_count": 12306 }
291
from dataclasses import dataclass, field from typing import Optional @dataclass class TrainingArguments: """ Configuration for training model. """ model_ckpt: Optional[str] = field( default="codeparrot/codeparrot", metadata={"help": "Model name or path of model to be trained."} ) save...
transformers/examples/research_projects/codeparrot/scripts/arguments.py/0
{ "file_path": "transformers/examples/research_projects/codeparrot/scripts/arguments.py", "repo_id": "transformers", "token_count": 3565 }
292
# 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/scripts/token_counts.py/0
{ "file_path": "transformers/examples/research_projects/distillation/scripts/token_counts.py", "repo_id": "transformers", "token_count": 726 }
293
<!--- 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 ...
transformers/examples/research_projects/jax-projects/hybrid_clip/README.md/0
{ "file_path": "transformers/examples/research_projects/jax-projects/hybrid_clip/README.md", "repo_id": "transformers", "token_count": 2322 }
294
## MM-IMDb Based on the script [`run_mmimdb.py`](https://github.com/huggingface/transformers/blob/main/examples/research_projects/mm-imdb/run_mmimdb.py). [MM-IMDb](http://lisi1.unal.edu.co/mmimdb/) is a Multimodal dataset with around 26,000 movies including images, plots and other metadata. ### Training on MM-IMDb ...
transformers/examples/research_projects/mm-imdb/README.md/0
{ "file_path": "transformers/examples/research_projects/mm-imdb/README.md", "repo_id": "transformers", "token_count": 287 }
295
<!--- 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 a...
transformers/examples/research_projects/onnx/summarization/README.md/0
{ "file_path": "transformers/examples/research_projects/onnx/summarization/README.md", "repo_id": "transformers", "token_count": 463 }
296
#! /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.py/0
{ "file_path": "transformers/examples/research_projects/pplm/run_pplm.py", "repo_id": "transformers", "token_count": 13443 }
297
import os from functools import partial from glob import glob import faiss from datasets import Features, Sequence, Value, concatenate_datasets, load_dataset, load_from_disk from transformers import DPRContextEncoder, DPRContextEncoderTokenizerFast def split_text(text, n=100, character=" "): """Split the text e...
transformers/examples/research_projects/rag-end2end-retriever/kb_encode_utils.py/0
{ "file_path": "transformers/examples/research_projects/rag-end2end-retriever/kb_encode_utils.py", "repo_id": "transformers", "token_count": 1231 }
298
import json import logging import os import sys from pathlib import Path import finetune_rag from transformers.file_utils import is_apex_available from transformers.testing_utils import ( TestCasePlus, execute_subprocess_async, require_ray, require_torch_gpu, require_torch_multi_gpu, ) logging.b...
transformers/examples/research_projects/rag/_test_finetune_rag.py/0
{ "file_path": "transformers/examples/research_projects/rag/_test_finetune_rag.py", "repo_id": "transformers", "token_count": 1994 }
299
# Robust Speech Challenge 🤗 Welcome to the robust speech recognition challenge 🎙️ ! The goal of this event is to build **robust**, **real-world** speech recognition (ASR) systems in as many languages as possible 🌏🌍🌎. If necessary and available, free access to a V100S 32 GB GPU will kindly be provided by the [OVH...
transformers/examples/research_projects/robust-speech-event/README.md/0
{ "file_path": "transformers/examples/research_projects/robust-speech-event/README.md", "repo_id": "transformers", "token_count": 12253 }
300
#!/usr/bin/env bash export PYTHONPATH="../":"${PYTHONPATH}" export WANDB_PROJECT=dmar # export MAX_LEN=128 python distillation.py \ --learning_rate=3e-4 \ --do_train \ --fp16 \ --val_check_interval 0.25 \ --teacher Helsinki-NLP/opus-mt-en-ro \ --max_source_length $MAX_LEN --max_target_length $MAX_LEN --val_...
transformers/examples/research_projects/seq2seq-distillation/distil_marian_enro_teacher.sh/0
{ "file_path": "transformers/examples/research_projects/seq2seq-distillation/distil_marian_enro_teacher.sh", "repo_id": "transformers", "token_count": 310 }
301
#!/usr/bin/env bash export PYTHONPATH="../":"${PYTHONPATH}" python distillation.py \ --teacher facebook/bart-large-xsum --data_dir xsum \ --tokenizer_name facebook/bart-large-xsum \ --student_decoder_layers 6 --student_encoder_layers 12 \ --freeze_encoder --freeze_embeds \ --learning_rate=3e-4 \ --do_train ...
transformers/examples/research_projects/seq2seq-distillation/train_distilbart_xsum.sh/0
{ "file_path": "transformers/examples/research_projects/seq2seq-distillation/train_distilbart_xsum.sh", "repo_id": "transformers", "token_count": 317 }
302
#!/usr/bin/env bash python run_asr.py \ --output_dir="./wav2vec2-large-lv60-100h" \ --num_train_epochs="30" \ --per_device_train_batch_size="16" \ --per_device_eval_batch_size="16" \ --eval_strategy="steps" \ --save_total_limit="3" \ --save_steps="500" \ --eval_steps="100" \ --logging_steps="50" \ --learning_rate="5e-4...
transformers/examples/research_projects/wav2vec2/finetune_large_lv60_100.sh/0
{ "file_path": "transformers/examples/research_projects/wav2vec2/finetune_large_lv60_100.sh", "repo_id": "transformers", "token_count": 254 }
303
#!/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/run_on_remote.py/0
{ "file_path": "transformers/examples/run_on_remote.py", "repo_id": "transformers", "token_count": 1321 }
304
#!/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/LI...
transformers/examples/tensorflow/language-modeling-tpu/run_mlm.py/0
{ "file_path": "transformers/examples/tensorflow/language-modeling-tpu/run_mlm.py", "repo_id": "transformers", "token_count": 4387 }
305
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
transformers/examples/tensorflow/test_tensorflow_examples.py/0
{ "file_path": "transformers/examples/tensorflow/test_tensorflow_examples.py", "repo_id": "transformers", "token_count": 5486 }
306