text
stringlengths
7
324k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
463
# SWSL ResNeXt A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations)...
pytorch-image-models/docs/models/.templates/models/swsl-resnext.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/swsl-resnext.md", "repo_id": "pytorch-image-models", "token_count": 2646 }
180
- sections: - local: index title: Home - local: quickstart title: Quickstart - local: installation title: Installation title: Get started - sections: - local: feature_extraction title: Using Pretrained Models as Feature Extractors - local: training_script title: Training With The Offici...
pytorch-image-models/hfdocs/source/_toctree.yml/0
{ "file_path": "pytorch-image-models/hfdocs/source/_toctree.yml", "repo_id": "pytorch-image-models", "token_count": 1686 }
181
# EfficientNet (Knapsack Pruned) **EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly...
pytorch-image-models/hfdocs/source/models/efficientnet-pruned.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/efficientnet-pruned.mdx", "repo_id": "pytorch-image-models", "token_count": 2777 }
182
# (Legacy) SE-ResNet **SE ResNet** is a variant of a [ResNet](https://www.paperswithcode.com/method/resnet) that employs [squeeze-and-excitation blocks](https://paperswithcode.com/method/squeeze-and-excitation-block) to enable the network to perform dynamic channel-wise feature recalibration. ## How do I use this mod...
pytorch-image-models/hfdocs/source/models/legacy-se-resnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/legacy-se-resnet.mdx", "repo_id": "pytorch-image-models", "token_count": 3701 }
183
# ResNet **Residual Networks**, or **ResNets**, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping. They stack [residual block...
pytorch-image-models/hfdocs/source/models/resnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/resnet.mdx", "repo_id": "pytorch-image-models", "token_count": 5074 }
184
# (Tensorflow) MixNet **MixNet** is a type of convolutional neural network discovered via AutoML that utilises [MixConvs](https://paperswithcode.com/method/mixconv) instead of regular [depthwise convolutions](https://paperswithcode.com/method/depthwise-convolution). The weights from this model were ported from [Tenso...
pytorch-image-models/hfdocs/source/models/tf-mixnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/tf-mixnet.mdx", "repo_id": "pytorch-image-models", "token_count": 2359 }
185
""" ONNX export script Export PyTorch models as ONNX graphs. This export script originally started as an adaptation of code snippets found at https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html The default parameters work with PyTorch 1.6 and ONNX 1.7 and produce an optimal ONNX graph for h...
pytorch-image-models/onnx_export.py/0
{ "file_path": "pytorch-image-models/onnx_export.py", "repo_id": "pytorch-image-models", "token_count": 1811 }
186
""" Optimzier Tests These tests were adapted from PyTorch' optimizer tests. """ import math import pytest import functools from copy import deepcopy import torch from torch.testing._internal.common_utils import TestCase from torch.nn import Parameter from timm.scheduler import PlateauLRScheduler from timm.optim imp...
pytorch-image-models/tests/test_optim.py/0
{ "file_path": "pytorch-image-models/tests/test_optim.py", "repo_id": "pytorch-image-models", "token_count": 11722 }
187
""" Mixup and Cutmix Papers: mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412) CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (https://arxiv.org/abs/1905.04899) Code Reference: CutMix: https://github.com/clovaai/CutMix-PyTorch Hacked together by / Co...
pytorch-image-models/timm/data/mixup.py/0
{ "file_path": "pytorch-image-models/timm/data/mixup.py", "repo_id": "pytorch-image-models", "token_count": 7225 }
188
""" Tensorflow Preprocessing Adapter Allows use of Tensorflow preprocessing pipeline in PyTorch Transform Copyright of original Tensorflow code below. Hacked together by / Copyright 2020 Ross Wightman """ # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2....
pytorch-image-models/timm/data/tf_preprocessing.py/0
{ "file_path": "pytorch-image-models/timm/data/tf_preprocessing.py", "repo_id": "pytorch-image-models", "token_count": 3775 }
189
""" Conv2d w/ Same Padding Hacked together by / Copyright 2020 Ross Wightman """ import torch import torch.nn as nn import torch.nn.functional as F from typing import Tuple, Optional from .config import is_exportable, is_scriptable from .padding import pad_same, pad_same_arg, get_padding_value _USE_EXPORT_CONV = Fa...
pytorch-image-models/timm/layers/conv2d_same.py/0
{ "file_path": "pytorch-image-models/timm/layers/conv2d_same.py", "repo_id": "pytorch-image-models", "token_count": 1560 }
190
""" Global Response Normalization Module Based on the GRN layer presented in `ConvNeXt-V2 - Co-designing and Scaling ConvNets with Masked Autoencoders` - https://arxiv.org/abs/2301.00808 This implementation * works for both NCHW and NHWC tensor layouts * uses affine param names matching existing torch norm layers * s...
pytorch-image-models/timm/layers/grn.py/0
{ "file_path": "pytorch-image-models/timm/layers/grn.py", "repo_id": "pytorch-image-models", "token_count": 565 }
191
""" Image to Patch Embedding using Conv2d A convolution based approach to patchifying a 2D image w/ embedding projection. Based on code in: * https://github.com/google-research/vision_transformer * https://github.com/google-research/big_vision/tree/main/big_vision Hacked together by / Copyright 2020 Ross Wightma...
pytorch-image-models/timm/layers/patch_embed.py/0
{ "file_path": "pytorch-image-models/timm/layers/patch_embed.py", "repo_id": "pytorch-image-models", "token_count": 4705 }
192
from .asymmetric_loss import AsymmetricLossMultiLabel, AsymmetricLossSingleLabel from .binary_cross_entropy import BinaryCrossEntropy from .cross_entropy import LabelSmoothingCrossEntropy, SoftTargetCrossEntropy from .jsd import JsdCrossEntropy
pytorch-image-models/timm/loss/__init__.py/0
{ "file_path": "pytorch-image-models/timm/loss/__init__.py", "repo_id": "pytorch-image-models", "token_count": 70 }
193
import os import pkgutil from copy import deepcopy from torch import nn as nn from timm.layers import Conv2dSame, BatchNormAct2d, Linear __all__ = ['extract_layer', 'set_layer', 'adapt_model_from_string', 'adapt_model_from_file'] def extract_layer(model, layer): layer = layer.split('.') module = model ...
pytorch-image-models/timm/models/_prune.py/0
{ "file_path": "pytorch-image-models/timm/models/_prune.py", "repo_id": "pytorch-image-models", "token_count": 2021 }
194
"""PyTorch CspNet A PyTorch implementation of Cross Stage Partial Networks including: * CSPResNet50 * CSPResNeXt50 * CSPDarkNet53 * and DarkNet53 for good measure Based on paper `CSPNet: A New Backbone that can Enhance Learning Capability of CNN` - https://arxiv.org/abs/1911.11929 Reference impl via darknet cfg file...
pytorch-image-models/timm/models/cspnet.py/0
{ "file_path": "pytorch-image-models/timm/models/cspnet.py", "repo_id": "pytorch-image-models", "token_count": 19954 }
195
""" FocalNet As described in `Focal Modulation Networks` - https://arxiv.org/abs/2203.11926 Significant modifications and refactoring from the original impl at https://github.com/microsoft/FocalNet This impl is/has: * fully convolutional, NCHW tensor layout throughout, seemed to have minimal performance impact but m...
pytorch-image-models/timm/models/focalnet.py/0
{ "file_path": "pytorch-image-models/timm/models/focalnet.py", "repo_id": "pytorch-image-models", "token_count": 11585 }
196
""" Poolformer from MetaFormer is Actually What You Need for Vision https://arxiv.org/abs/2111.11418 IdentityFormer, RandFormer, PoolFormerV2, ConvFormer, and CAFormer from MetaFormer Baselines for Vision https://arxiv.org/abs/2210.13452 All implemented models support feature extraction and variable input resolution....
pytorch-image-models/timm/models/metaformer.py/0
{ "file_path": "pytorch-image-models/timm/models/metaformer.py", "repo_id": "pytorch-image-models", "token_count": 17521 }
197
""" Res2Net and Res2NeXt Adapted from Official Pytorch impl at: https://github.com/gasvn/Res2Net/ Paper: `Res2Net: A New Multi-scale Backbone Architecture` - https://arxiv.org/abs/1904.01169 """ import math import torch import torch.nn as nn from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD from ._bui...
pytorch-image-models/timm/models/res2net.py/0
{ "file_path": "pytorch-image-models/timm/models/res2net.py", "repo_id": "pytorch-image-models", "token_count": 3659 }
198
"""VGG Adapted from https://github.com/pytorch/vision 'vgg.py' (BSD-3-Clause) with a few changes for timm functionality. Copyright 2021 Ross Wightman """ from typing import Union, List, Dict, Any, cast import torch import torch.nn as nn import torch.nn.functional as F from timm.data import IMAGENET_DEFAULT_MEAN, IM...
pytorch-image-models/timm/models/vgg.py/0
{ "file_path": "pytorch-image-models/timm/models/vgg.py", "repo_id": "pytorch-image-models", "token_count": 5201 }
199
""" AdamW Optimizer Impl copied from PyTorch master NOTE: Builtin optim.AdamW is used by the factory, this impl only serves as a Python based reference, will be removed someday """ import math import torch from torch.optim.optimizer import Optimizer class AdamW(Optimizer): r"""Implements AdamW algorithm. Th...
pytorch-image-models/timm/optim/adamw.py/0
{ "file_path": "pytorch-image-models/timm/optim/adamw.py", "repo_id": "pytorch-image-models", "token_count": 2417 }
200
""" Cosine Scheduler Cosine LR schedule with warmup, cycle/restarts, noise, k-decay. Hacked together by / Copyright 2021 Ross Wightman """ import logging import math import numpy as np import torch from .scheduler import Scheduler _logger = logging.getLogger(__name__) class CosineLRScheduler(Scheduler): """ ...
pytorch-image-models/timm/scheduler/cosine_lr.py/0
{ "file_path": "pytorch-image-models/timm/scheduler/cosine_lr.py", "repo_id": "pytorch-image-models", "token_count": 2031 }
201
""" Logging helpers Hacked together by / Copyright 2020 Ross Wightman """ import logging import logging.handlers class FormatterNoInfo(logging.Formatter): def __init__(self, fmt='%(levelname)s: %(message)s'): logging.Formatter.__init__(self, fmt) def format(self, record): if record.levelno =...
pytorch-image-models/timm/utils/log.py/0
{ "file_path": "pytorch-image-models/timm/utils/log.py", "repo_id": "pytorch-image-models", "token_count": 383 }
202
import pytest from text_generation import __version__ from huggingface_hub.utils import build_hf_headers @pytest.fixture def flan_t5_xxl(): return "google/flan-t5-xxl" @pytest.fixture def fake_model(): return "fake/model" @pytest.fixture def unsupported_model(): return "gpt2" @pytest.fixture def ba...
text-generation-inference/clients/python/tests/conftest.py/0
{ "file_path": "text-generation-inference/clients/python/tests/conftest.py", "repo_id": "text-generation-inference", "token_count": 390 }
203
# Non-core Model Serving TGI supports various LLM architectures (see full list [here](../supported_models)). If you wish to serve a model that is not one of the supported models, TGI will fallback to the `transformers` implementation of that model. This means you will be unable to use some of the features introduced b...
text-generation-inference/docs/source/basic_tutorials/non_core_models.md/0
{ "file_path": "text-generation-inference/docs/source/basic_tutorials/non_core_models.md", "repo_id": "text-generation-inference", "token_count": 472 }
204
import sys import subprocess import contextlib import pytest import asyncio import os import docker import json import math import time import random from docker.errors import NotFound from typing import Optional, List, Dict from syrupy.extensions.json import JSONSnapshotExtension from aiohttp import ClientConnectorEr...
text-generation-inference/integration-tests/conftest.py/0
{ "file_path": "text-generation-inference/integration-tests/conftest.py", "repo_id": "text-generation-inference", "token_count": 7278 }
205
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 2, "logprob": null, "text": "<bos>" }, { "id": 2015, "logprob": -10.0, "text": "Test" ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma_load.json", "repo_id": "text-generation-inference", "token_count": 4916 }
206
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 3735, "logprob": -12.9140625, "text": "Test" }, { "id": 2...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json", "repo_id": "text-generation-inference", "token_count": 1041 }
207
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 589, "logprob": null, "text": "def" }, { "id": 1459, "logprob": -5.6289062, "text": " prin...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_load.json", "repo_id": "text-generation-inference", "token_count": 5176 }
208
{ "details": { "best_of_sequences": null, "finish_reason": "eos_token", "generated_tokens": 9, "prefill": [ { "id": 0, "logprob": null, "text": "<pad>" } ], "seed": 0, "tokens": [ { "id": 16017, "logprob": -0.30908203, "spec...
text-generation-inference/integration-tests/models/__snapshots__/test_mt0_base/test_mt0_base_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_mt0_base/test_mt0_base_all_params.json", "repo_id": "text-generation-inference", "token_count": 831 }
209
import pytest @pytest.fixture(scope="module") def flash_llama_awq_handle_sharded(launcher): with launcher( "abhinavkulkarni/codellama-CodeLlama-7b-Python-hf-w4-g128-awq", num_shard=2, quantize="awq", ) as handle: yield handle @pytest.fixture(scope="module") async def flash_ll...
text-generation-inference/integration-tests/models/test_flash_awq_sharded.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_awq_sharded.py", "repo_id": "text-generation-inference", "token_count": 608 }
210
import pytest import json from text_generation.types import GrammarType @pytest.fixture(scope="module") def non_flash_llama_grammar_handle(launcher): with launcher( "TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=1, disable_grammar_support=False, use_flash_attention=False, ) a...
text-generation-inference/integration-tests/models/test_grammar_llama.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_grammar_llama.py", "repo_id": "text-generation-inference", "token_count": 1338 }
211
use clap::{Parser, ValueEnum}; use nix::sys::signal::{self, Signal}; use nix::unistd::Pid; use serde::Deserialize; use std::env; use std::ffi::OsString; use std::io::{BufRead, BufReader, Lines}; use std::os::unix::process::{CommandExt, ExitStatusExt}; use std::path::Path; use std::process::{Child, Command, ExitStatus, ...
text-generation-inference/launcher/src/main.rs/0
{ "file_path": "text-generation-inference/launcher/src/main.rs", "repo_id": "text-generation-inference", "token_count": 19919 }
212
//! A crate to extract and inject a OpenTelemetry context from and to a gRPC request. //! Inspired by: https://github.com/open-telemetry/opentelemetry-rust gRPC examples use opentelemetry::global; use opentelemetry::propagation::{Extractor, Injector}; use tracing_opentelemetry::OpenTelemetrySpanExt; /// Extract conte...
text-generation-inference/router/grpc-metadata/src/lib.rs/0
{ "file_path": "text-generation-inference/router/grpc-metadata/src/lib.rs", "repo_id": "text-generation-inference", "token_count": 889 }
213
selective_scan_commit := 2a3704fd47ba817b415627b06fd796b971fdc137 causal-conv1d: rm -rf causal-conv1d git clone https://github.com/Dao-AILab/causal-conv1d.git build-causal-conv1d: causal-conv1d cd causal-conv1d/ && git checkout v1.1.1 # known latest working version tag cd causal-conv1d/ && CAUSAL_CONV1D_FORCE_BUI...
text-generation-inference/server/Makefile-selective-scan/0
{ "file_path": "text-generation-inference/server/Makefile-selective-scan", "repo_id": "text-generation-inference", "token_count": 351 }
214
// Adapted from turboderp exllama: https://github.com/turboderp/exllama #ifndef _hip_compat_cuh #define _hip_compat_cuh // Workaround for a bug in hipamd, backported from upstream, this is fixed in ROCm 5.6. __device__ __forceinline__ __half __compat_hrcp(__half x) { return __half_raw{ static_cast<_Float1...
text-generation-inference/server/exllama_kernels/exllama_kernels/hip_compat.cuh/0
{ "file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/hip_compat.cuh", "repo_id": "text-generation-inference", "token_count": 1708 }
215
#ifndef _qdq_3_cuh #define _qdq_3_cuh #include "qdq_util.cuh" #include "../../config.h" #if QMODE_3BIT == 1 // Permutation: // // v9997775 55333111 u8886664 44222000 (u, v lsb) // vjjjhhhf ffdddbbb uiiiggge eecccaaa // vtttrrrp ppnnnlll usssqqqo oommmkkk __forceinline__ __device__ void shuffle_3bit_32 ( uin...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_3.cuh/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_3.cuh", "repo_id": "text-generation-inference", "token_count": 3335 }
216
import pytest import torch from copy import copy from transformers import AutoTokenizer from text_generation_server.pb import generate_pb2 from text_generation_server.models.causal_lm import CausalLM, CausalLMBatch @pytest.fixture(scope="session") def default_causal_lm(): return CausalLM("gpt2") @pytest.fixtu...
text-generation-inference/server/tests/models/test_causal_lm.py/0
{ "file_path": "text-generation-inference/server/tests/models/test_causal_lm.py", "repo_id": "text-generation-inference", "token_count": 5345 }
217
# This code was adapted from https://github.com/lucidrains/flamingo-pytorch licensed under the MIT License. # # MIT License # # Copyright (c) 2020 The Google AI Language Team Authors, The HuggingFace Inc. team and github/lonePatient # # Permission is hereby granted, free of charge, to any person obtaining a copy # of ...
text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_perceiver.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_perceiver.py", "repo_id": "text-generation-inference", "token_count": 5171 }
218
import math import torch import torch.distributed from opentelemetry import trace from transformers.models.qwen2 import Qwen2Tokenizer from typing import Optional from text_generation_server.models.cache_manager import BLOCK_SIZE from text_generation_server.models.flash_mistral import ( BaseFlashMistral, set...
text-generation-inference/server/text_generation_server/models/flash_qwen2.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/flash_qwen2.py", "repo_id": "text-generation-inference", "token_count": 1259 }
219
import torch import time from dataclasses import dataclass from opentelemetry import trace from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, PreTrainedTokenizerBase from typing import Optional, Tuple, List, Type, Dict from text_generation_server.utils.tokens import batch_top_tokens from text_generation_s...
text-generation-inference/server/text_generation_server/models/seq2seq_lm.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/seq2seq_lm.py", "repo_id": "text-generation-inference", "token_count": 16433 }
220
import time import torch.nn as nn import math import json import os import torch import transformers from texttable import Texttable from transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer from huggingface_hub import HfApi from accelerate import init_empty_weights from text_generation_server.utils imp...
text-generation-inference/server/text_generation_server/utils/gptq/quantize.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/gptq/quantize.py", "repo_id": "text-generation-inference", "token_count": 15970 }
221
# EditorConfig helps developers define and maintain consistent # coding styles between different editors or IDEs # http://editorconfig.org root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace =...
tokenizers/bindings/node/.editorconfig/0
{ "file_path": "tokenizers/bindings/node/.editorconfig", "repo_id": "tokenizers", "token_count": 108 }
222
/* tslint:disable */ /* eslint-disable */ /* prettier-ignore */ /* auto-generated by NAPI-RS */ const { existsSync, readFileSync } = require('fs') const { join } = require('path') const { platform, arch } = process let nativeBinding = null let localFileExisted = false let loadError = null function isMusl() { // ...
tokenizers/bindings/node/index.js/0
{ "file_path": "tokenizers/bindings/node/index.js", "repo_id": "tokenizers", "token_count": 4683 }
223
{ "name": "tokenizers-android-arm64", "version": "0.13.4-rc1", "os": [ "android" ], "cpu": [ "arm64" ], "main": "tokenizers.android-arm64.node", "files": [ "tokenizers.android-arm64.node" ], "description": "Tokenizers platform specific bindings", "keywords": [ "napi-rs", "NAPI"...
tokenizers/bindings/node/npm/android-arm64/package.json/0
{ "file_path": "tokenizers/bindings/node/npm/android-arm64/package.json", "repo_id": "tokenizers", "token_count": 264 }
224
{ "name": "tokenizers-linux-x64-musl", "version": "0.13.4-rc1", "os": [ "linux" ], "cpu": [ "x64" ], "main": "tokenizers.linux-x64-musl.node", "files": [ "tokenizers.linux-x64-musl.node" ], "description": "Tokenizers platform specific bindings", "keywords": [ "napi-rs", "NAPI",...
tokenizers/bindings/node/npm/linux-x64-musl/package.json/0
{ "file_path": "tokenizers/bindings/node/npm/linux-x64-musl/package.json", "repo_id": "tokenizers", "token_count": 291 }
225
use crate::arc_rwlock_serde; use serde::{Deserialize, Serialize}; extern crate tokenizers as tk; use napi::bindgen_prelude::*; use napi_derive::napi; use std::sync::{Arc, RwLock}; use tk::processors::PostProcessorWrapper; use tk::Encoding; #[derive(Clone, Serialize, Deserialize)] #[napi] pub struct Processor { #[se...
tokenizers/bindings/node/src/processors.rs/0
{ "file_path": "tokenizers/bindings/node/src/processors.rs", "repo_id": "tokenizers", "token_count": 1336 }
226
<p align="center"> <br> <img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/> <br> <p> <p align="center"> <a href="https://badge.fury.io/py/tokenizers"> <img alt="Build" src="https://badge.fury.io/py/tokenizers.svg"> </a> <a href="https://github.c...
tokenizers/bindings/python/README.md/0
{ "file_path": "tokenizers/bindings/python/README.md", "repo_id": "tokenizers", "token_count": 1621 }
227
from typing import Dict, Iterator, List, Optional, Tuple, Union from .. import AddedToken, Tokenizer, decoders, pre_tokenizers, trainers from ..models import BPE from ..normalizers import BertNormalizer, Lowercase, Sequence, unicode_normalizer_from_str from .base_tokenizer import BaseTokenizer class CharBPETokenizer...
tokenizers/bindings/python/py_src/tokenizers/implementations/char_level_bpe.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/implementations/char_level_bpe.py", "repo_id": "tokenizers", "token_count": 2509 }
228
[project] name = 'tokenizers' requires-python = '>=3.7' authors = [ {name = 'Nicolas Patry', email = 'patry.nicolas@protonmail.com'}, {name = 'Anthony Moi', email = 'anthony@huggingface.co'} ] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audie...
tokenizers/bindings/python/pyproject.toml/0
{ "file_path": "tokenizers/bindings/python/pyproject.toml", "repo_id": "tokenizers", "token_count": 711 }
229
use std::sync::{Arc, RwLock}; use crate::models::PyModel; use crate::tokenizer::PyAddedToken; use crate::utils::PyChar; use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; use serde::{Deserialize, Serialize}; use tk::models::TrainerWrapper; use tk::Trainer; use tokenizers as tk; /// Base class for all tra...
tokenizers/bindings/python/src/trainers.rs/0
{ "file_path": "tokenizers/bindings/python/src/trainers.rs", "repo_id": "tokenizers", "token_count": 17617 }
230
import pickle import numpy as np import pytest from tokenizers import AddedToken, Encoding, Tokenizer from tokenizers.implementations import BertWordPieceTokenizer from tokenizers.models import BPE, Model, Unigram from tokenizers.pre_tokenizers import ByteLevel from tokenizers.processors import RobertaProcessing fro...
tokenizers/bindings/python/tests/bindings/test_tokenizer.py/0
{ "file_path": "tokenizers/bindings/python/tests/bindings/test_tokenizer.py", "repo_id": "tokenizers", "token_count": 8966 }
231
- sections: - local: index title: 🤗 Tokenizers - local: quicktour title: Quicktour - local: installation title: Installation - local: pipeline title: The tokenization pipeline - local: components title: Components - local: training_from_memory title: Training from memory title: G...
tokenizers/docs/source-doc-builder/_toctree.yml/0
{ "file_path": "tokenizers/docs/source-doc-builder/_toctree.yml", "repo_id": "tokenizers", "token_count": 338 }
232
# The tokenization pipeline When calling `Tokenizer.encode` or `Tokenizer.encode_batch`, the input text(s) go through the following pipeline: - `normalization` - `pre-tokenization` - `model` - `post-processing` We'll see in details what happens during each of those steps in detail, as well as when you want t...
tokenizers/docs/source-doc-builder/pipeline.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/pipeline.mdx", "repo_id": "tokenizers", "token_count": 5903 }
233
Documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Rust API Reference is available directly on the `Docs.rs <https://docs.rs/tokenizers>`__ website.
tokenizers/docs/source/api/rust.inc/0
{ "file_path": "tokenizers/docs/source/api/rust.inc", "repo_id": "tokenizers", "token_count": 43 }
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.md/0
{ "file_path": "tokenizers/tokenizers/README.md", "repo_id": "tokenizers", "token_count": 1846 }
235
language: node_js node_js: "10" script: - ./node_modules/.bin/webpack
tokenizers/tokenizers/examples/unstable_wasm/www/.travis.yml/0
{ "file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/.travis.yml", "repo_id": "tokenizers", "token_count": 30 }
236
use crate::decoders::DecoderWrapper; use crate::tokenizer::{Decoder, Result}; use crate::utils::macro_rules_attribute; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug)] #[macro_rules_attribute(impl_serde_type!)] pub struct Sequence { decoders: Vec<DecoderWrapper>, } impl Sequence { pub fn new(decod...
tokenizers/tokenizers/src/decoders/sequence.rs/0
{ "file_path": "tokenizers/tokenizers/src/decoders/sequence.rs", "repo_id": "tokenizers", "token_count": 600 }
237
use super::OrderedVocabIter; use crate::tokenizer::{Model, Result, Token}; use serde_json::Value; use std::collections::HashMap; use std::fs::File; use std::io::{BufReader, Read, Write}; use std::path::{Path, PathBuf}; mod serialization; mod trainer; // Re-export pub use trainer::*; type Vocab = HashMap<String, u32>...
tokenizers/tokenizers/src/models/wordlevel/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/wordlevel/mod.rs", "repo_id": "tokenizers", "token_count": 3383 }
238
use serde::{Deserialize, Serialize}; use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior}; use crate::utils::macro_rules_attribute; #[derive(Copy, Clone, Debug, PartialEq, Eq)] #[non_exhaustive] #[macro_rules_attribute(impl_serde_type!)] pub struct CharDelimiterSplit { pub deli...
tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs/0
{ "file_path": "tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs", "repo_id": "tokenizers", "token_count": 296 }
239
use super::{ normalizer::Range, Model, NormalizedString, Normalizer, Offsets, PreTokenizedString, Token, }; use aho_corasick::{AhoCorasick, AhoCorasickBuilder, MatchKind}; use regex::Regex; use serde::{ser::SerializeSeq, Deserialize, Serialize, Serializer}; use std::collections::{HashMap, HashSet}; /// Represent a...
tokenizers/tokenizers/src/tokenizer/added_vocabulary.rs/0
{ "file_path": "tokenizers/tokenizers/src/tokenizer/added_vocabulary.rs", "repo_id": "tokenizers", "token_count": 16897 }
240
use crate::tokenizer::{Encoding, Result}; use serde::{Deserialize, Serialize}; use std::cmp; use std::mem; #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, Eq, Default)] pub enum TruncationDirection { Left, #[default] Right, } impl std::convert::AsRef<str> for TruncationDirection { fn a...
tokenizers/tokenizers/src/utils/truncation.rs/0
{ "file_path": "tokenizers/tokenizers/src/utils/truncation.rs", "repo_id": "tokenizers", "token_count": 5473 }
241
FROM google/cloud-sdk:slim # Build args. ARG GITHUB_REF=refs/heads/main # TODO: This Dockerfile installs pytorch/xla 3.6 wheels. There are also 3.7 # wheels available; see below. ENV PYTHON_VERSION=3.6 RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ...
transformers/docker/transformers-pytorch-tpu/Dockerfile/0
{ "file_path": "transformers/docker/transformers-pytorch-tpu/Dockerfile", "repo_id": "transformers", "token_count": 1235 }
242
<!--- 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 ...
transformers/docs/source/de/contributing.md/0
{ "file_path": "transformers/docs/source/de/contributing.md", "repo_id": "transformers", "token_count": 8257 }
243
- sections: - local: index title: 🤗 Transformers - local: quicktour title: Quick tour - local: installation title: Installation title: Get started - sections: - local: pipeline_tutorial title: Run inference with pipelines - local: autoclass_tutorial title: Write portable code with AutoC...
transformers/docs/source/en/_toctree.yml/0
{ "file_path": "transformers/docs/source/en/_toctree.yml", "repo_id": "transformers", "token_count": 11006 }
244
<!--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/debugging.md/0
{ "file_path": "transformers/docs/source/en/debugging.md", "repo_id": "transformers", "token_count": 6482 }
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 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/convnext.md/0
{ "file_path": "transformers/docs/source/en/model_doc/convnext.md", "repo_id": "transformers", "token_count": 1215 }
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 agreed...
transformers/docs/source/en/model_doc/dialogpt.md/0
{ "file_path": "transformers/docs/source/en/model_doc/dialogpt.md", "repo_id": "transformers", "token_count": 789 }
250
<!--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/falcon.md/0
{ "file_path": "transformers/docs/source/en/model_doc/falcon.md", "repo_id": "transformers", "token_count": 837 }
251
<!--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/madlad-400.md/0
{ "file_path": "transformers/docs/source/en/model_doc/madlad-400.md", "repo_id": "transformers", "token_count": 930 }
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/model_doc/mms.md/0
{ "file_path": "transformers/docs/source/en/model_doc/mms.md", "repo_id": "transformers", "token_count": 4924 }
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/nougat.md/0
{ "file_path": "transformers/docs/source/en/model_doc/nougat.md", "repo_id": "transformers", "token_count": 1549 }
254
<!--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/roberta-prelayernorm.md/0
{ "file_path": "transformers/docs/source/en/model_doc/roberta-prelayernorm.md", "repo_id": "transformers", "token_count": 1519 }
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/wavlm.md/0
{ "file_path": "transformers/docs/source/en/model_doc/wavlm.md", "repo_id": "transformers", "token_count": 972 }
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_sharing.md/0
{ "file_path": "transformers/docs/source/en/model_sharing.md", "repo_id": "transformers", "token_count": 2967 }
257
<!--- 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/docs/source/en/performance.md/0
{ "file_path": "transformers/docs/source/en/performance.md", "repo_id": "transformers", "token_count": 966 }
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/idefics.md/0
{ "file_path": "transformers/docs/source/en/tasks/idefics.md", "repo_id": "transformers", "token_count": 6890 }
259
<!--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/transformers_agents.md/0
{ "file_path": "transformers/docs/source/en/transformers_agents.md", "repo_id": "transformers", "token_count": 4397 }
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/es/tasks/asr.md/0
{ "file_path": "transformers/docs/source/es/tasks/asr.md", "repo_id": "transformers", "token_count": 6032 }
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 ...
transformers/docs/source/fr/installation.md/0
{ "file_path": "transformers/docs/source/fr/installation.md", "repo_id": "transformers", "token_count": 3849 }
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/it/preprocessing.md/0
{ "file_path": "transformers/docs/source/it/preprocessing.md", "repo_id": "transformers", "token_count": 9562 }
263
<!--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 }
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/ja/model_doc/beit.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/beit.md", "repo_id": "transformers", "token_count": 3840 }
265
<!--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 }
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/model_summary.md/0
{ "file_path": "transformers/docs/source/ja/model_summary.md", "repo_id": "transformers", "token_count": 9488 }
267
<!--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 }
268
<!--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 }
269
<!--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": 7463 }
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 agreed...
transformers/docs/source/ko/accelerate.md/0
{ "file_path": "transformers/docs/source/ko/accelerate.md", "repo_id": "transformers", "token_count": 2885 }
271
<!--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/hpo_train.md/0
{ "file_path": "transformers/docs/source/ko/hpo_train.md", "repo_id": "transformers", "token_count": 3520 }
272
<!--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/serialization.md/0
{ "file_path": "transformers/docs/source/ko/serialization.md", "repo_id": "transformers", "token_count": 6886 }
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/pt/tasks/token_classification.md/0
{ "file_path": "transformers/docs/source/pt/tasks/token_classification.md", "repo_id": "transformers", "token_count": 4235 }
274
<!--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 }
275
#!/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_clm_flax.py/0
{ "file_path": "transformers/examples/flax/language-modeling/run_clm_flax.py", "repo_id": "transformers", "token_count": 16207 }
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 applicabl...
transformers/examples/legacy/seq2seq/rouge_cli.py/0
{ "file_path": "transformers/examples/legacy/seq2seq/rouge_cli.py", "repo_id": "transformers", "token_count": 385 }
277
# 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/token-classification/utils_ner.py/0
{ "file_path": "transformers/examples/legacy/token-classification/utils_ner.py", "repo_id": "transformers", "token_count": 7660 }
278
#!/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_mae.py/0
{ "file_path": "transformers/examples/pytorch/image-pretraining/run_mae.py", "repo_id": "transformers", "token_count": 6396 }
279