text
stringlengths
7
318k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
439
# ResNeSt A **ResNeSt** is a variant on a [ResNet](https://paperswithcode.com/method/resnet), which instead stacks [Split-Attention blocks](https://paperswithcode.com/method/split-attention). The cardinal group representations are then concatenated along the channel dimension: $V = \text{Concat}${$V^{1},V^{2},\cdots{V...
pytorch-image-models/docs/models/.templates/models/resnest.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/resnest.md", "repo_id": "pytorch-image-models", "token_count": 4643 }
157
# (Tensorflow) EfficientNet Lite **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/docs/models/.templates/models/tf-efficientnet-lite.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/tf-efficientnet-lite.md", "repo_id": "pytorch-image-models", "token_count": 2543 }
158
# Sharing and Loading Models From the Hugging Face Hub The `timm` library has a built-in integration with the Hugging Face Hub, making it easy to share and load models from the 🤗 Hub. In this short guide, we'll see how to: 1. Share a `timm` model on the Hub 2. How to load that model back from the Hub ## Authent...
pytorch-image-models/hfdocs/source/hf_hub.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/hf_hub.mdx", "repo_id": "pytorch-image-models", "token_count": 594 }
159
[tool.pytest.ini_options] markers = [ "base: marker for model tests using the basic setup", "cfg: marker for model tests checking the config", "torchscript: marker for model tests using torchscript", "features: marker for model tests checking feature extraction", "fxforward: marker for model tests u...
pytorch-image-models/pyproject.toml/0
{ "file_path": "pytorch-image-models/pyproject.toml", "repo_id": "pytorch-image-models", "token_count": 169 }
160
""" 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 }
161
""" 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 }
162
""" 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 }
163
""" 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 }
164
""" 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 }
165
""" 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 }
166
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 }
167
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 }
168
"""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 }
169
""" 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 }
170
""" MLP-Mixer, ResMLP, and gMLP in PyTorch This impl originally based on MLP-Mixer paper. Official JAX impl: https://github.com/google-research/vision_transformer/blob/linen/vit_jax/models_mixer.py Paper: 'MLP-Mixer: An all-MLP Architecture for Vision' - https://arxiv.org/abs/2105.01601 @article{tolstikhin2021, t...
pytorch-image-models/timm/models/mlp_mixer.py/0
{ "file_path": "pytorch-image-models/timm/models/mlp_mixer.py", "repo_id": "pytorch-image-models", "token_count": 11661 }
171
"""PyTorch ResNet This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with additional dropout and dynamic global avg/max pool. ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman Copyright 2019, Ross Wightman """ import math fro...
pytorch-image-models/timm/models/resnet.py/0
{ "file_path": "pytorch-image-models/timm/models/resnet.py", "repo_id": "pytorch-image-models", "token_count": 44237 }
172
""" Vision Transformer (ViT) in PyTorch A PyTorch implement of Vision Transformers as described in: 'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale' - https://arxiv.org/abs/2010.11929 `How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers` - https:...
pytorch-image-models/timm/models/vision_transformer.py/0
{ "file_path": "pytorch-image-models/timm/models/vision_transformer.py", "repo_id": "pytorch-image-models", "token_count": 57595 }
173
""" PyTorch Lamb optimizer w/ behaviour similar to NVIDIA FusedLamb This optimizer code was adapted from the following (starting with latest) * https://github.com/HabanaAI/Model-References/blob/2b435114fe8e31f159b1d3063b8280ae37af7423/PyTorch/nlp/bert/pretraining/lamb.py * https://github.com/NVIDIA/DeepLearningExample...
pytorch-image-models/timm/optim/lamb.py/0
{ "file_path": "pytorch-image-models/timm/optim/lamb.py", "repo_id": "pytorch-image-models", "token_count": 3768 }
174
""" Plateau Scheduler Adapts PyTorch plateau scheduler and allows application of noise, warmup. Hacked together by / Copyright 2020 Ross Wightman """ import torch from .scheduler import Scheduler class PlateauLRScheduler(Scheduler): """Decay the LR by a factor every time the validation loss plateaus.""" d...
pytorch-image-models/timm/scheduler/plateau_lr.py/0
{ "file_path": "pytorch-image-models/timm/scheduler/plateau_lr.py", "repo_id": "pytorch-image-models", "token_count": 1800 }
175
""" Misc utils Hacked together by / Copyright 2020 Ross Wightman """ import argparse import ast import re def natural_key(string_): """See http://www.codinghorror.com/blog/archives/001018.html""" return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_.lower())] def add_bool_arg(parser, nam...
pytorch-image-models/timm/utils/misc.py/0
{ "file_path": "pytorch-image-models/timm/utils/misc.py", "repo_id": "pytorch-image-models", "token_count": 451 }
176
mod app; mod event; mod generation; mod table; mod utils; use crate::app::App; use crate::event::Event; use crossterm::ExecutableCommand; use std::io; use text_generation_client::{NextTokenChooserParameters, ShardedClient}; use tokenizers::Tokenizer; use tokio::sync::{broadcast, mpsc}; use tui::backend::CrosstermBacke...
text-generation-inference/benchmark/src/lib.rs/0
{ "file_path": "text-generation-inference/benchmark/src/lib.rs", "repo_id": "text-generation-inference", "token_count": 1852 }
177
from typing import Dict # Text Generation Inference Errors class ValidationError(Exception): def __init__(self, message: str): super().__init__(message) class GenerationError(Exception): def __init__(self, message: str): super().__init__(message) class OverloadedError(Exception): def _...
text-generation-inference/clients/python/text_generation/errors.py/0
{ "file_path": "text-generation-inference/clients/python/text_generation/errors.py", "repo_id": "text-generation-inference", "token_count": 1080 }
178
# Streaming ## What is Streaming? Token streaming is the mode in which the server returns the tokens one by one as the model generates them. This enables showing progressive generations to the user rather than waiting for the whole generation. Streaming is an essential aspect of the end-user experience as it reduces ...
text-generation-inference/docs/source/conceptual/streaming.md/0
{ "file_path": "text-generation-inference/docs/source/conceptual/streaming.md", "repo_id": "text-generation-inference", "token_count": 1981 }
179
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 1724, "logprob": -7.6914062, "text": "What" ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_awq_sharded/test_flash_llama_awq_load_sharded.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_awq_sharded/test_flash_llama_awq_load_sharded.json", "repo_id": "text-generation-inference", "token_count": 5776 }
180
[ { "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" ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_load.json", "repo_id": "text-generation-inference", "token_count": 4897 }
181
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 4911, "logprob": -6.9765625, "text": "User" }, { "id": 29...
text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics.json", "repo_id": "text-generation-inference", "token_count": 2062 }
182
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": 624 }
183
import pytest @pytest.fixture(scope="module") def neox_sharded_handle(launcher): with launcher( "OpenAssistant/oasst-sft-1-pythia-12b", num_shard=2, use_flash_attention=False ) as handle: yield handle @pytest.fixture(scope="module") async def neox_sharded(neox_sharded_handle): await neox...
text-generation-inference/integration-tests/models/test_neox_sharded.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_neox_sharded.py", "repo_id": "text-generation-inference", "token_count": 507 }
184
# Router Also named `webserver` throughout the docs. This router is handling most of the logic to handle the "batches" tell when to pass new `prefill` requests and pausing `decode` requests, which ones etc... It uses gRPC to communicate with the shards which can therefore be kept much simpler and focus on having the...
text-generation-inference/router/README.md/0
{ "file_path": "text-generation-inference/router/README.md", "repo_id": "text-generation-inference", "token_count": 1177 }
185
/// Payload validation logic use crate::validation::ValidationError::{BestOfSampling, BestOfSeed, EmptyInput}; use crate::{GenerateParameters, GenerateRequest}; use rand::{thread_rng, Rng}; use text_generation_client::{NextTokenChooserParameters, StoppingCriteriaParameters}; use thiserror::Error; use tokenizers::tokeni...
text-generation-inference/router/src/validation.rs/0
{ "file_path": "text-generation-inference/router/src/validation.rs", "repo_id": "text-generation-inference", "token_count": 11273 }
186
// Adapted from turboderp exllama: https://github.com/turboderp/exllama #ifndef _cuda_buffers_cuh #define _cuda_buffers_cuh #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cstdint> #include <cstdio> const int CUDA_MAX_DEVICES = 16; // #ifndef _cuda_buffers_cu // extern __constant__ half2 q4_table[16][256...
text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh/0
{ "file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh", "repo_id": "text-generation-inference", "token_count": 471 }
187
#ifndef _matrix_view_cuh #define _matrix_view_cuh #include <cuda_runtime.h> #include <cuda_fp16.h> #include "quant/qdq_util.cuh" class MatrixView_half { public: const half* data; const int height; const int width; __device__ __forceinline__ MatrixView_half(const half* data, const int height, const i...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/matrix_view.cuh/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/matrix_view.cuh", "repo_id": "text-generation-inference", "token_count": 1861 }
188
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension import torch extra_cuda_cflags = ["-lineinfo", "-O3"] if torch.version.hip: extra_cuda_cflags += ["-DHIPBLAS_USE_HIP_HALF"] extra_compile_args = { "nvcc": extra_cuda_cflags, } setup( name="exllamav2_kernels"...
text-generation-inference/server/exllamav2_kernels/setup.py/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/setup.py", "repo_id": "text-generation-inference", "token_count": 363 }
189
# test_watermark_logits_processor.py import os import numpy as np import torch from text_generation_server.utils.watermark import WatermarkLogitsProcessor GAMMA = os.getenv("WATERMARK_GAMMA", 0.5) DELTA = os.getenv("WATERMARK_DELTA", 2.0) def test_seed_rng(): input_ids = [101, 2036, 3731, 102, 2003, 103] p...
text-generation-inference/server/tests/utils/test_watermark.py/0
{ "file_path": "text-generation-inference/server/tests/utils/test_watermark.py", "repo_id": "text-generation-inference", "token_count": 781 }
190
import torch import torch.distributed from torch import nn from transformers.modeling_utils import PreTrainedModel from transformers.configuration_utils import PretrainedConfig from typing import Optional, List, Tuple from text_generation_server.utils import paged_attention, flash_attn from text_generation_server.uti...
text-generation-inference/server/text_generation_server/models/custom_modeling/flash_rw_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_rw_modeling.py", "repo_id": "text-generation-inference", "token_count": 10032 }
191
import torch from typing import Optional from text_generation_server.models.flash_mistral import BaseFlashMistral from text_generation_server.models.custom_modeling.flash_mixtral_modeling import ( MixtralConfig, FlashMixtralForCausalLM, ) class FlashMixtral(BaseFlashMistral): def __init__( self,...
text-generation-inference/server/text_generation_server/models/flash_mixtral.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/flash_mixtral.py", "repo_id": "text-generation-inference", "token_count": 379 }
192
import torch import torch.distributed from typing import List, Optional, Tuple from transformers import ( AutoTokenizer, AutoConfig, ) from text_generation_server.models import Seq2SeqLM from text_generation_server.models.custom_modeling.t5_modeling import ( T5ForConditionalGeneration, ) from text_genera...
text-generation-inference/server/text_generation_server/models/t5.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/t5.py", "repo_id": "text-generation-inference", "token_count": 1617 }
193
import torch IS_ROCM_SYSTEM = torch.version.hip is not None IS_CUDA_SYSTEM = torch.version.cuda is not None
text-generation-inference/server/text_generation_server/utils/import_utils.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/import_utils.py", "repo_id": "text-generation-inference", "token_count": 40 }
194
# `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 }
195
# `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 }
196
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 }
197
import argparse import logging import time from tqdm import tqdm logging.getLogger("transformers").disabled = True logging.getLogger("transformers.tokenization_utils").disabled = True from tokenizers import Tokenizer, decoders, pre_tokenizers from tokenizers.models import BPE, WordPiece from tokenizers.normalizers ...
tokenizers/bindings/python/examples/example.py/0
{ "file_path": "tokenizers/bindings/python/examples/example.py", "repo_id": "tokenizers", "token_count": 1783 }
198
# Generated content DO NOT EDIT from .. import models Model = models.Model BPE = models.BPE Unigram = models.Unigram WordLevel = models.WordLevel WordPiece = models.WordPiece
tokenizers/bindings/python/py_src/tokenizers/models/__init__.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/models/__init__.py", "repo_id": "tokenizers", "token_count": 56 }
199
from argparse import ArgumentParser from json import dump from logging import basicConfig, getLogger from os import linesep, remove from os.path import exists from tempfile import NamedTemporaryFile from typing import Dict, List, Tuple from requests import get from sentencepiece import SentencePieceProcessor from tqdm...
tokenizers/bindings/python/scripts/sentencepiece_extractor.py/0
{ "file_path": "tokenizers/bindings/python/scripts/sentencepiece_extractor.py", "repo_id": "tokenizers", "token_count": 2267 }
200
use super::regex::PyRegex; use super::{DestroyPtr, RefMutContainer, RefMutGuard}; use crate::error::ToPyResult; use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; use tk::normalizer::{char_to_bytes, NormalizedString, Range, SplitDelimiterBehavior}; use tk::pattern::Pattern; /// Represents a Pattern as use...
tokenizers/bindings/python/src/utils/normalization.rs/0
{ "file_path": "tokenizers/bindings/python/src/utils/normalization.rs", "repo_id": "tokenizers", "token_count": 8467 }
201
from tokenizers import Tokenizer from ..utils import data_dir, doc_pipeline_bert_tokenizer, doc_wiki_tokenizer disable_printing = True original_print = print def print(*args, **kwargs): if not disable_printing: original_print(*args, **kwargs) class TestPipeline: def test_pipeline(self, doc_wiki_t...
tokenizers/bindings/python/tests/documentation/test_pipeline.py/0
{ "file_path": "tokenizers/bindings/python/tests/documentation/test_pipeline.py", "repo_id": "tokenizers", "token_count": 3351 }
202
# Encode Inputs <tokenizerslangcontent> <python> These types represent all the different kinds of input that a [`~tokenizers.Tokenizer`] accepts when using [`~tokenizers.Tokenizer.encode_batch`]. ## TextEncodeInput[[[[tokenizers.TextEncodeInput]]]] <code>tokenizers.TextEncodeInput</code> Represents a textual input ...
tokenizers/docs/source-doc-builder/api/encode-inputs.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/api/encode-inputs.mdx", "repo_id": "tokenizers", "token_count": 716 }
203
from collections import defaultdict, abc from typing import cast from docutils import nodes from docutils.parsers.rst import Directive import sphinx from sphinx.locale import _ from sphinx.util.docutils import SphinxDirective from sphinx.errors import ExtensionError from conf import languages as LANGUAGES logger = ...
tokenizers/docs/source/_ext/entities.py/0
{ "file_path": "tokenizers/docs/source/_ext/entities.py", "repo_id": "tokenizers", "token_count": 4032 }
204
.. entities:: python :global: class class classmethod class method Tokenizer :class:`~tokenizers.Tokenizer` Tokenizer.train :meth:`~tokenizers.Tokenizer.train` Tokenizer.save :meth:`~tokenizers.Tokenizer.save` Tokenizer.from_file :meth:`~toke...
tokenizers/docs/source/entities.inc/0
{ "file_path": "tokenizers/docs/source/entities.inc", "repo_id": "tokenizers", "token_count": 2078 }
205
#[macro_use] extern crate criterion; mod common; use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::Path; use criterion::Criterion; use tokenizers::models::bpe::{BpeTrainerBuilder, BPE}; use tokenizers::models::TrainerWrapper; use tokenizers::pre_tokenizers::byte_level::ByteLevel; use tokenizers::p...
tokenizers/tokenizers/benches/bpe_benchmark.rs/0
{ "file_path": "tokenizers/tokenizers/benches/bpe_benchmark.rs", "repo_id": "tokenizers", "token_count": 1621 }
206
<div align="center"> <h1><code>create-wasm-app</code></h1> <strong>An <code>npm init</code> template for kick starting a project that uses NPM packages containing Rust-generated WebAssembly and bundles them with Webpack.</strong> <p> <a href="https://travis-ci.org/rustwasm/create-wasm-app"><img src="https:...
tokenizers/tokenizers/examples/unstable_wasm/www/README.md/0
{ "file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/README.md", "repo_id": "tokenizers", "token_count": 893 }
207
use crate::tokenizer::{Decoder, Result}; use serde::{Deserialize, Serialize}; #[derive(Deserialize, Clone, Debug, Serialize)] /// The WordPiece decoder takes care of decoding a list of wordpiece tokens /// back into a readable string. #[serde(tag = "type")] #[non_exhaustive] pub struct WordPiece { /// The prefix ...
tokenizers/tokenizers/src/decoders/wordpiece.rs/0
{ "file_path": "tokenizers/tokenizers/src/decoders/wordpiece.rs", "repo_id": "tokenizers", "token_count": 1275 }
208
use super::WordLevel; use crate::utils::parallelism::*; use crate::{AddedToken, Result, Trainer}; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::collections::HashMap; #[non_exhaustive] #[derive(Debug, Clone, Builder, Serialize, Deserialize)] pub struct WordLevelTrainer { /// The minimum freq...
tokenizers/tokenizers/src/models/wordlevel/trainer.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/wordlevel/trainer.rs", "repo_id": "tokenizers", "token_count": 2735 }
209
use crate::tokenizer::{Decoder, PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior}; use serde::{Deserialize, Deserializer, Serialize}; /// Enum representing options for the metaspace prepending scheme. #[derive(Debug, Clone, PartialEq, Serialize, Eq, Deserialize, Copy)] #[serde(rename_all = "snake_case"...
tokenizers/tokenizers/src/pre_tokenizers/metaspace.rs/0
{ "file_path": "tokenizers/tokenizers/src/pre_tokenizers/metaspace.rs", "repo_id": "tokenizers", "token_count": 6508 }
210
//! Represents a tokenization pipeline. //! //! A [`Tokenizer`](struct.Tokenizer.html) is composed of some of the following parts. //! - [`Normalizer`](trait.Normalizer.html): Takes care of the text normalization (like unicode normalization). //! - [`PreTokenizer`](trait.PreTokenizer.html): Takes care of the pre to...
tokenizers/tokenizers/src/tokenizer/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/tokenizer/mod.rs", "repo_id": "tokenizers", "token_count": 18666 }
211
use tokenizers::decoders::wordpiece::WordPiece as WordPieceDecoder; use tokenizers::models::bpe::BPE; use tokenizers::models::wordpiece::WordPiece; use tokenizers::normalizers::bert::BertNormalizer; use tokenizers::pre_tokenizers::bert::BertPreTokenizer; use tokenizers::pre_tokenizers::byte_level::ByteLevel; use tokeni...
tokenizers/tokenizers/tests/common/mod.rs/0
{ "file_path": "tokenizers/tokenizers/tests/common/mod.rs", "repo_id": "tokenizers", "token_count": 771 }
212
.PHONY: deps_table_update modified_only_fixup extra_style_checks quality style fixup fix-copies test test-examples # make sure to test the local checkout in scripts and not the pre-installed one (don't use quotes!) export PYTHONPATH = src check_dirs := examples tests src utils exclude_folders := examples/research_pr...
transformers/Makefile/0
{ "file_path": "transformers/Makefile", "repo_id": "transformers", "token_count": 1325 }
213
FROM python:3.10 LABEL maintainer="Hugging Face" RUN apt update RUN git clone https://github.com/huggingface/transformers RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder ./transformers[dev] RUN apt-get -y update && apt-get...
transformers/docker/transformers-doc-builder/Dockerfile/0
{ "file_path": "transformers/docker/transformers-doc-builder/Dockerfile", "repo_id": "transformers", "token_count": 292 }
214
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/de/run_scripts.md/0
{ "file_path": "transformers/docs/source/de/run_scripts.md", "repo_id": "transformers", "token_count": 7455 }
215
<!--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/chat_templating.md/0
{ "file_path": "transformers/docs/source/en/chat_templating.md", "repo_id": "transformers", "token_count": 6714 }
216
<!--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/clipseg.md/0
{ "file_path": "transformers/docs/source/en/model_doc/clipseg.md", "repo_id": "transformers", "token_count": 1221 }
217
<!--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/deformable_detr.md/0
{ "file_path": "transformers/docs/source/en/model_doc/deformable_detr.md", "repo_id": "transformers", "token_count": 1014 }
218
<!--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/electra.md/0
{ "file_path": "transformers/docs/source/en/model_doc/electra.md", "repo_id": "transformers", "token_count": 2211 }
219
<!--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": 1655 }
220
<!--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/idefics.md/0
{ "file_path": "transformers/docs/source/en/model_doc/idefics.md", "repo_id": "transformers", "token_count": 776 }
221
<!--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/longformer.md/0
{ "file_path": "transformers/docs/source/en/model_doc/longformer.md", "repo_id": "transformers", "token_count": 2395 }
222
<!--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/nat.md/0
{ "file_path": "transformers/docs/source/en/model_doc/nat.md", "repo_id": "transformers", "token_count": 1229 }
223
<!--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/perceiver.md/0
{ "file_path": "transformers/docs/source/en/model_doc/perceiver.md", "repo_id": "transformers", "token_count": 2762 }
224
<!--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/rembert.md/0
{ "file_path": "transformers/docs/source/en/model_doc/rembert.md", "repo_id": "transformers", "token_count": 1363 }
225
<!--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/speech_to_text.md/0
{ "file_path": "transformers/docs/source/en/model_doc/speech_to_text.md", "repo_id": "transformers", "token_count": 1920 }
226
<!--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-encoder-decoder.md/0
{ "file_path": "transformers/docs/source/en/model_doc/vision-encoder-decoder.md", "repo_id": "transformers", "token_count": 2525 }
227
<!--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/whisper.md/0
{ "file_path": "transformers/docs/source/en/model_doc/whisper.md", "repo_id": "transformers", "token_count": 1994 }
228
<!--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": 2258 }
229
<!--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/image_captioning.md/0
{ "file_path": "transformers/docs/source/en/tasks/image_captioning.md", "repo_id": "transformers", "token_count": 2702 }
230
<!--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/tasks/translation.md/0
{ "file_path": "transformers/docs/source/en/tasks/translation.md", "repo_id": "transformers", "token_count": 5199 }
231
- sections: - local: index title: 🤗 Transformers - local: quicktour title: Tour rápido - local: installation title: Instalación title: Empezar - sections: - local: pipeline_tutorial title: Pipelines para inferencia - local: autoclass_tutorial title: Carga instancias preentrenadas con un...
transformers/docs/source/es/_toctree.yml/0
{ "file_path": "transformers/docs/source/es/_toctree.yml", "repo_id": "transformers", "token_count": 948 }
232
<!--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/autoclass_tutorial.md/0
{ "file_path": "transformers/docs/source/it/autoclass_tutorial.md", "repo_id": "transformers", "token_count": 1933 }
233
<!--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/model_doc/audio-spectrogram-transformer.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/audio-spectrogram-transformer.md", "repo_id": "transformers", "token_count": 2249 }
234
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ja/model_doc/blenderbot-small.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/blenderbot-small.md", "repo_id": "transformers", "token_count": 1831 }
235
<!--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/code_llama.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/code_llama.md", "repo_id": "transformers", "token_count": 4010 }
236
<!--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/deplot.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/deplot.md", "repo_id": "transformers", "token_count": 2027 }
237
<!--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/run_scripts.md/0
{ "file_path": "transformers/docs/source/ja/run_scripts.md", "repo_id": "transformers", "token_count": 8185 }
238
<!--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/prompting.md/0
{ "file_path": "transformers/docs/source/ja/tasks/prompting.md", "repo_id": "transformers", "token_count": 9967 }
239
<!--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/tokenizer_summary.md/0
{ "file_path": "transformers/docs/source/ja/tokenizer_summary.md", "repo_id": "transformers", "token_count": 9811 }
240
<!--- 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/ko/contributing.md/0
{ "file_path": "transformers/docs/source/ko/contributing.md", "repo_id": "transformers", "token_count": 15871 }
241
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # 웹 서버를 위한 파이프라인 사용하기[[using_pipelines_for_a_webserver]] <Tip> 추론 엔진을 만드는 것은 복잡한 주제이며, "최선의" 솔루션은 문제 공간에 따라 달라질 가능성이 높습니다. CPU 또는 GPU를 사용하는지에 따라 다르고...
transformers/docs/source/ko/pipeline_webserver.md/0
{ "file_path": "transformers/docs/source/ko/pipeline_webserver.md", "repo_id": "transformers", "token_count": 6174 }
242
<!--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/tokenizer_summary.md/0
{ "file_path": "transformers/docs/source/ko/tokenizer_summary.md", "repo_id": "transformers", "token_count": 15141 }
243
<!--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/multilingual.md/0
{ "file_path": "transformers/docs/source/pt/multilingual.md", "repo_id": "transformers", "token_count": 3154 }
244
<!--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/zh/big_models.md/0
{ "file_path": "transformers/docs/source/zh/big_models.md", "repo_id": "transformers", "token_count": 3096 }
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/zh/serialization.md/0
{ "file_path": "transformers/docs/source/zh/serialization.md", "repo_id": "transformers", "token_count": 4917 }
246
#!/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_bart_dlm_flax.py/0
{ "file_path": "transformers/examples/flax/language-modeling/run_bart_dlm_flax.py", "repo_id": "transformers", "token_count": 18354 }
247
<!--- Copyright 2021 The Google Flax Team Authors and HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless r...
transformers/examples/flax/text-classification/README.md/0
{ "file_path": "transformers/examples/flax/text-classification/README.md", "repo_id": "transformers", "token_count": 2757 }
248
<!--- Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
transformers/examples/legacy/seq2seq/README.md/0
{ "file_path": "transformers/examples/legacy/seq2seq/README.md", "repo_id": "transformers", "token_count": 5081 }
249
### Motivation Without processing, english-> romanian mbart-large-en-ro gets BLEU score 26.8 on the WMT data. With post processing, it can score 37.. Here is the postprocessing code, stolen from @mjpost in this [issue](https://github.com/pytorch/fairseq/issues/1758) ### Instructions Note: You need to have your test_...
transformers/examples/legacy/seq2seq/romanian_postprocessing.md/0
{ "file_path": "transformers/examples/legacy/seq2seq/romanian_postprocessing.md", "repo_id": "transformers", "token_count": 723 }
250
import logging import os from typing import List, TextIO, Union from conllu import parse_incr from utils_ner import InputExample, Split, TokenClassificationTask logger = logging.getLogger(__name__) class NER(TokenClassificationTask): def __init__(self, label_idx=-1): # in NER datasets, the last column ...
transformers/examples/legacy/token-classification/tasks.py/0
{ "file_path": "transformers/examples/legacy/token-classification/tasks.py", "repo_id": "transformers", "token_count": 3163 }
251
# coding=utf-8 # Copyright 2018 HuggingFace Inc.. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
transformers/examples/pytorch/old_test_xla_examples.py/0
{ "file_path": "transformers/examples/pytorch/old_test_xla_examples.py", "repo_id": "transformers", "token_count": 1245 }
252
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
transformers/examples/pytorch/text-classification/run_glue.py/0
{ "file_path": "transformers/examples/pytorch/text-classification/run_glue.py", "repo_id": "transformers", "token_count": 11733 }
253
# coding=utf-8 # Copyright 2019 The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
transformers/examples/research_projects/bertabs/configuration_bertabs.py/0
{ "file_path": "transformers/examples/research_projects/bertabs/configuration_bertabs.py", "repo_id": "transformers", "token_count": 1345 }
254
from arguments import TokenizerTrainingArguments from datasets import load_dataset from tqdm import tqdm from transformers import AutoTokenizer, HfArgumentParser from transformers.models.gpt2.tokenization_gpt2 import bytes_to_unicode # Iterator for Training def batch_iterator(batch_size=10): for _ in tqdm(range(...
transformers/examples/research_projects/codeparrot/scripts/bpe_training.py/0
{ "file_path": "transformers/examples/research_projects/codeparrot/scripts/bpe_training.py", "repo_id": "transformers", "token_count": 347 }
255
from __future__ import absolute_import, division, print_function import argparse import glob import logging import os import random import time import numpy as np import torch from torch import nn from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset from torch.utils.data.distribute...
transformers/examples/research_projects/deebert/run_glue_deebert.py/0
{ "file_path": "transformers/examples/research_projects/deebert/run_glue_deebert.py", "repo_id": "transformers", "token_count": 13897 }
256