text
stringlengths
5
631k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
647
# flake8: noqa import gzip import os import datasets import pytest from ..utils import data_dir, train_files class TestTrainFromIterators: @staticmethod def get_tokenizer_trainer(): # START init_tokenizer_trainer from tokenizers import Tokenizer, decoders, models, normalizers, pre_tokenizers...
tokenizers/bindings/python/tests/documentation/test_tutorial_train_from_iterators.py/0
{ "file_path": "tokenizers/bindings/python/tests/documentation/test_tutorial_train_from_iterators.py", "repo_id": "tokenizers", "token_count": 1595 }
293
# Input Sequences <tokenizerslangcontent> <python> These types represent all the different kinds of sequence that can be used as input of a Tokenizer. Globally, any sequence can be either a string or a list of strings, according to the operating mode of the tokenizer: `raw text` vs `pre-tokenized`. ## TextInputSequen...
tokenizers/docs/source-doc-builder/api/input-sequences.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/api/input-sequences.mdx", "repo_id": "tokenizers", "token_count": 402 }
294
import re from sphinx.directives.other import TocTree class TocTreeTags(TocTree): hasPat = re.compile("^\s*:(.+):(.+)$") def filter_entries(self, entries): filtered = [] for e in entries: m = self.hasPat.match(e) if m != None: if self.env.app.tags.has(m...
tokenizers/docs/source/_ext/toctree_tags.py/0
{ "file_path": "tokenizers/docs/source/_ext/toctree_tags.py", "repo_id": "tokenizers", "token_count": 345 }
295
#[macro_use] extern crate criterion; use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::Path; use std::time::{Duration, Instant}; use criterion::Criterion; use std::hint::black_box; use tokenizers::processors::template::TemplateProcessing; use tokenizers::{EncodeInput, Encoding, PostProcessor, Token...
tokenizers/tokenizers/benches/layout_benchmark.rs/0
{ "file_path": "tokenizers/tokenizers/benches/layout_benchmark.rs", "repo_id": "tokenizers", "token_count": 1161 }
296
<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 }
297
//! [WordPiece](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37842.pdf) //! model. use crate::models::bpe::BPE; use crate::tokenizer::{Model, Result, Token}; use ahash::AHashMap; use std::collections::HashMap; use std::{ borrow::Cow, fs::File, io::prelude::*, io::{Buf...
tokenizers/tokenizers/src/models/wordpiece/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/wordpiece/mod.rs", "repo_id": "tokenizers", "token_count": 4756 }
298
use crate::normalizer::Range; use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result}; use serde::{Deserialize, Serialize}; use crate::utils::macro_rules_attribute; #[derive(Clone, Debug, PartialEq, Eq)] #[macro_rules_attribute(impl_serde_type!)] pub struct FixedLength { #[serde(default = "default_length...
tokenizers/tokenizers/src/pre_tokenizers/fixed_length.rs/0
{ "file_path": "tokenizers/tokenizers/src/pre_tokenizers/fixed_length.rs", "repo_id": "tokenizers", "token_count": 2007 }
299
use crate::parallelism::*; use crate::tokenizer::{Offsets, Token}; use crate::utils::padding::PaddingDirection; use crate::utils::truncation::TruncationDirection; use ahash::AHashMap; use serde::{Deserialize, Serialize}; use std::ops::Range; /// Represents the output of a `Tokenizer`. #[derive(Default, PartialEq, Debu...
tokenizers/tokenizers/src/tokenizer/encoding.rs/0
{ "file_path": "tokenizers/tokenizers/src/tokenizer/encoding.rs", "repo_id": "tokenizers", "token_count": 17200 }
300
mod common; use common::*; use tokenizers::tokenizer::AddedToken; #[test] fn add_tokens() { let mut tokenizer = get_empty(); assert_eq!( tokenizer.add_special_tokens(&[ AddedToken::from("<cls>", true), AddedToken::from("<sep>", true) ]), 2 ); assert_eq!...
tokenizers/tokenizers/tests/added_tokens.rs/0
{ "file_path": "tokenizers/tokenizers/tests/added_tokens.rs", "repo_id": "tokenizers", "token_count": 1770 }
301
# Building a React application In this tutorial, we'll be building a simple React application that performs multilingual translation using Transformers.js! The final product will look something like this: ![Demo](https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/react-translator-demo.gif) Use...
transformers.js/docs/source/tutorials/react.md/0
{ "file_path": "transformers.js/docs/source/tutorials/react.md", "repo_id": "transformers.js", "token_count": 5891 }
302
@font-face { font-family: "bootstrap-icons"; src: url("./bootstrap-icons.woff2") format("woff2"), url("./bootstrap-icons.woff") format("woff"); } .bi::before, [class^="bi-"]::before, [class*=" bi-"]::before { display: inline-block; font-family: bootstrap-icons !important; font-style: normal; font-we...
transformers.js/examples/demo-site/public/css/bootstrap-icons.css/0
{ "file_path": "transformers.js/examples/demo-site/public/css/bootstrap-icons.css", "repo_id": "transformers.js", "token_count": 29385 }
303
///////////////////////////////////////////////////////////////// // Worker.js file for doing all transformer-based computations // // Needed to ensure the UI thread is not blocked when running // ///////////////////////////////////////////////////////////////// import { pipeline, env } from "@xenova/transformers"; ...
transformers.js/examples/demo-site/src/worker.js/0
{ "file_path": "transformers.js/examples/demo-site/src/worker.js", "repo_id": "transformers.js", "token_count": 6373 }
304
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Transformers.js | Sample Electron application</title> <!-- Load styles --> <link rel="stylesheet" href="index.css" /> <!-- Load the client script --> <script src="./client.js" defer></script> </head> <body> <div class="contain...
transformers.js/examples/electron/src/index.html/0
{ "file_path": "transformers.js/examples/electron/src/index.html", "repo_id": "transformers.js", "token_count": 220 }
305
/** @type {import('next').NextConfig} */ const nextConfig = { // (Optional) Export as a standalone site // See https://nextjs.org/docs/pages/api-reference/next-config-js/output#automatically-copying-traced-files output: 'standalone', // Feel free to modify/remove this option // Indicate that these ...
transformers.js/examples/next-server/next.config.js/0
{ "file_path": "transformers.js/examples/next-server/next.config.js", "repo_id": "transformers.js", "token_count": 164 }
306
{ "name": "commonjs", "version": "1.0.0", "description": "Server-side inference with Transformers.js (CommonJS)", "main": "app.js", "keywords": [], "author": "Xenova", "license": "ISC", "dependencies": { "@xenova/transformers": "^2.0.0" } }
transformers.js/examples/node/commonjs/package.json/0
{ "file_path": "transformers.js/examples/node/commonjs/package.json", "repo_id": "transformers.js", "token_count": 109 }
307
{ "name": "semantic-audio-search", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "semantic-audio-search", "version": "0.0.0", "dependencies": { "@xenova/transformers": "^2.10.1", "deepscatter": "github:nomic-ai/deepscatter" ...
transformers.js/examples/semantic-audio-search/package-lock.json/0
{ "file_path": "transformers.js/examples/semantic-audio-search/package-lock.json", "repo_id": "transformers.js", "token_count": 46220 }
308
'use client' import Image from 'next/image' import { downloadImage } from '../utils.js' export function Modal({ currentImage, setCurrentImage }) { const photo_url = currentImage ? `https://unsplash.com/photos/${currentImage.id}` : null; const photo_image_url = currentImage ? `https://images.unsplash.com/${cur...
transformers.js/examples/semantic-image-search-client/src/app/components/Modal.jsx/0
{ "file_path": "transformers.js/examples/semantic-image-search-client/src/app/components/Modal.jsx", "repo_id": "transformers.js", "token_count": 2014 }
309
# Vanilla JS Application This folder contains the source code for a simple web application that detects objects in images using Transformers.js! Check out the demo [here](https://huggingface.co/spaces/Scrimba/vanilla-js-object-detector). If you'd like to build it yourself, you can follow the [written](https://hugging...
transformers.js/examples/vanilla-js/README.md/0
{ "file_path": "transformers.js/examples/vanilla-js/README.md", "repo_id": "transformers.js", "token_count": 237 }
310
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Transformers.js | real-time CLIP</title> </head> <body> <h1> Real-time zero-shot image classification (WebGPU) </h1> <h3> Runs locally in your browser w/...
transformers.js/examples/webgpu-clip/index.html/0
{ "file_path": "transformers.js/examples/webgpu-clip/index.html", "repo_id": "transformers.js", "token_count": 417 }
311
# TODO: Enable once https://github.com/huggingface/optimum/pull/1552 is merged # # Support exporting vision and text models separately: # # Adapted from https://github.com/huggingface/optimum/issues/1186#issuecomment-1637641760 # from optimum.exporters.onnx.model_configs import CLAPTextWithProjectionOnnxConfig, Audio...
transformers.js/scripts/extra/clap.py/0
{ "file_path": "transformers.js/scripts/extra/clap.py", "repo_id": "transformers.js", "token_count": 684 }
312
import { Callable } from "../utils/generic.js"; import { Tensor, interpolate, stack } from "../utils/tensor.js"; import { bankers_round, max, min, softmax } from "../utils/maths.js"; import { RawImage } from "../utils/image.js"; import { calculateReflectOffset } from "../utils/core.js"; import { getModelJSON } from ".....
transformers.js/src/base/image_processors_utils.js/0
{ "file_path": "transformers.js/src/base/image_processors_utils.js", "repo_id": "transformers.js", "token_count": 18547 }
313
import { ImageProcessor, } from "../../base/image_processors_utils.js"; export class BitImageProcessor extends ImageProcessor { }
transformers.js/src/models/bit/image_processing_bit.js/0
{ "file_path": "transformers.js/src/models/bit/image_processing_bit.js", "repo_id": "transformers.js", "token_count": 43 }
314
import { Processor } from "../../base/processing_utils.js"; import { AutoImageProcessor } from "../auto/image_processing_auto.js"; import { AutoFeatureExtractor } from "../auto/feature_extraction_auto.js"; import { AutoTokenizer } from "../../tokenizers.js"; import { RawImage } from "../../utils/image.js"; import { Ra...
transformers.js/src/models/gemma3n/processing_gemma3n.js/0
{ "file_path": "transformers.js/src/models/gemma3n/processing_gemma3n.js", "repo_id": "transformers.js", "token_count": 1150 }
315
import { FeatureExtractor, validate_audio_inputs } from '../../base/feature_extraction_utils.js'; import { Tensor } from '../../utils/tensor.js'; import { max, softmax } from '../../utils/maths.js'; export class PyAnnoteFeatureExtractor extends FeatureExtractor { /** * Asynchronously extracts features from a...
transformers.js/src/models/pyannote/feature_extraction_pyannote.js/0
{ "file_path": "transformers.js/src/models/pyannote/feature_extraction_pyannote.js", "repo_id": "transformers.js", "token_count": 1478 }
316
import { ImageProcessor, } from "../../base/image_processors_utils.js"; export class Swin2SRImageProcessor extends ImageProcessor { pad_image(pixelData, imgDims, padSize, options = {}) { // NOTE: In this case, `padSize` represents the size of the sliding window for the local attention. // In o...
transformers.js/src/models/swin2sr/image_processing_swin2sr.js/0
{ "file_path": "transformers.js/src/models/swin2sr/image_processing_swin2sr.js", "repo_id": "transformers.js", "token_count": 462 }
317
/** * @file Pipelines provide a high-level, easy to use, API for running machine learning models. * * **Example:** Instantiate pipeline using the `pipeline` function. * ```javascript * import { pipeline } from '@huggingface/transformers'; * * const classifier = await pipeline('sentiment-analysis'); * const outp...
transformers.js/src/pipelines.js/0
{ "file_path": "transformers.js/src/pipelines.js", "repo_id": "transformers.js", "token_count": 57285 }
318
import { spawnSync } from "child_process"; const MODULE_NAME = "@huggingface/transformers"; const CODE_BODY = ` const model_id = "hf-internal-testing/tiny-random-LlamaForCausalLM"; const generator = await pipeline("text-generation", model_id, { dtype: "fp32" }); const result = await generator("hello", { max_new_token...
transformers.js/tests/bundles.test.js/0
{ "file_path": "transformers.js/tests/bundles.test.js", "repo_id": "transformers.js", "token_count": 498 }
319
import { AutoFeatureExtractor, ClapFeatureExtractor } from "../../../src/transformers.js"; import { load_cached_audio } from "../../asset_cache.js"; import { MAX_FEATURE_EXTRACTOR_LOAD_TIME, MAX_TEST_EXECUTION_TIME } from "../../init.js"; export default () => { // ClapFeatureExtractor describe("ClapFeatureExtract...
transformers.js/tests/models/clap/test_feature_extraction_clap.js/0
{ "file_path": "transformers.js/tests/models/clap/test_feature_extraction_clap.js", "repo_id": "transformers.js", "token_count": 1203 }
320
import { FalconTokenizer } from "../../../src/tokenizers.js"; import { BASE_TEST_STRINGS, FALCON_TEST_STRINGS } from "../test_strings.js"; export const TOKENIZER_CLASS = FalconTokenizer; export const TEST_CONFIG = { "tiiuae/falcon-7b": { SIMPLE: { text: BASE_TEST_STRINGS.SIMPLE, tokens: ["How", "\u01...
transformers.js/tests/models/falcon/test_tokenization_falcon.js/0
{ "file_path": "transformers.js/tests/models/falcon/test_tokenization_falcon.js", "repo_id": "transformers.js", "token_count": 6152 }
321
import { AutoProcessor, full, GroundingDinoProcessor } from "../../../src/transformers.js"; import { load_cached_image } from "../../asset_cache.js"; import { MAX_PROCESSOR_LOAD_TIME, MAX_TEST_EXECUTION_TIME } from "../../init.js"; export default () => { const model_id = "hf-internal-testing/tiny-random-GroundingDi...
transformers.js/tests/models/grounding_dino/test_processor_grounding_dino.js/0
{ "file_path": "transformers.js/tests/models/grounding_dino/test_processor_grounding_dino.js", "repo_id": "transformers.js", "token_count": 821 }
322
import { LlamaTokenizer, MistralForCausalLM } from "../../../src/transformers.js"; import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js"; export default () => { describe("MistralForCausalLM", () => { const model_id = "hf-internal-testing/tiny...
transformers.js/tests/models/mistral/test_modeling_mistral.js/0
{ "file_path": "transformers.js/tests/models/mistral/test_modeling_mistral.js", "repo_id": "transformers.js", "token_count": 768 }
323
import { PatchTSMixerModel, PatchTSMixerForPrediction, Tensor } from "../../../src/transformers.js"; import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js"; export default () => { const dims = [64, 512, 7]; const prod = dims.reduce((a, b) => a *...
transformers.js/tests/models/patchtsmixer/test_modeling_patchtsmixer.js/0
{ "file_path": "transformers.js/tests/models/patchtsmixer/test_modeling_patchtsmixer.js", "repo_id": "transformers.js", "token_count": 887 }
324
import { pipeline, BackgroundRemovalPipeline, RawImage } from "../../src/transformers.js"; import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js"; import { load_cached_image } from "../asset_cache.js"; const PIPELINE_ID = "background-removal"; export ...
transformers.js/tests/pipelines/test_pipelines_background_removal.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_background_removal.js", "repo_id": "transformers.js", "token_count": 1023 }
325
import { pipeline, TextToAudioPipeline } from "../../src/transformers.js"; import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js"; const PIPELINE_ID = "text-to-audio"; export default () => { describe("Text to Audio", () => { const model_id = "Xe...
transformers.js/tests/pipelines/test_pipelines_text_to_audio.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_text_to_audio.js", "repo_id": "transformers.js", "token_count": 492 }
326
import { Tensor, cat, stack, layer_norm, ones_like, zeros_like, full_like, rand, std_mean } from "../../src/transformers.js"; import { init } from "../init.js"; import { compare } from "../test_utils.js"; init(); describe("Tensor operations", () => { describe("cat", () => { it("should concatenate on dim=0", () ...
transformers.js/tests/utils/tensor.test.js/0
{ "file_path": "transformers.js/tests/utils/tensor.test.js", "repo_id": "transformers.js", "token_count": 10111 }
327
# 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 applicabl...
transformers/benchmark/benchmark.py/0
{ "file_path": "transformers/benchmark/benchmark.py", "repo_id": "transformers", "token_count": 5439 }
328
FROM python:3.9-slim ENV PYTHONDONTWRITEBYTECODE=1 ARG REF=main USER root RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git g++ cmake ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools RUN uv pip install --no-cache-dir "scip...
transformers/docker/jax-light.dockerfile/0
{ "file_path": "transformers/docker/jax-light.dockerfile", "repo_id": "transformers", "token_count": 224 }
329
FROM nvidia/cuda:12.6.0-cudnn-devel-ubuntu22.04 LABEL maintainer="Hugging Face" ARG DEBIAN_FRONTEND=noninteractive RUN apt update RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg RUN python3 -m pip install --no-cache-dir --upgrade pip ARG REF=main RUN git clone https://github...
transformers/docker/transformers-pytorch-gpu/Dockerfile/0
{ "file_path": "transformers/docker/transformers-pytorch-gpu/Dockerfile", "repo_id": "transformers", "token_count": 684 }
330
# BERTology يُشهد في الآونة الأخيرة نمو مجال دراسي يُعنى باستكشاف آلية عمل نماذج المحولات الضخمة مثل BERT (والذي يُطلق عليها البعض اسم "BERTology"). ومن الأمثلة البارزة على هذا المجال ما يلي: - BERT Rediscovers the Classical NLP Pipeline بواسطة Ian Tenney و Dipanjan Das و Ellie Pavlick: https://huggingface.co/paper...
transformers/docs/source/ar/bertology.md/0
{ "file_path": "transformers/docs/source/ar/bertology.md", "repo_id": "transformers", "token_count": 973 }
331
<!--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 to...
transformers/docs/source/ar/tasks/language_modeling.md/0
{ "file_path": "transformers/docs/source/ar/tasks/language_modeling.md", "repo_id": "transformers", "token_count": 9379 }
332
<!--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": 7505 }
333
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/chat_templating.md/0
{ "file_path": "transformers/docs/source/en/chat_templating.md", "repo_id": "transformers", "token_count": 3572 }
334
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/gguf.md/0
{ "file_path": "transformers/docs/source/en/gguf.md", "repo_id": "transformers", "token_count": 892 }
335
<!--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/logging.md/0
{ "file_path": "transformers/docs/source/en/main_classes/logging.md", "repo_id": "transformers", "token_count": 1276 }
336
<!--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/altclip.md/0
{ "file_path": "transformers/docs/source/en/model_doc/altclip.md", "repo_id": "transformers", "token_count": 1522 }
337
<!--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/bertweet.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bertweet.md", "repo_id": "transformers", "token_count": 1111 }
338
<!--Copyright 2021 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/canine.md/0
{ "file_path": "transformers/docs/source/en/model_doc/canine.md", "repo_id": "transformers", "token_count": 1325 }
339
<!--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": 1191 }
340
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
transformers/docs/source/en/model_doc/dinov2_with_registers.md/0
{ "file_path": "transformers/docs/source/en/model_doc/dinov2_with_registers.md", "repo_id": "transformers", "token_count": 1074 }
341
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/flava.md/0
{ "file_path": "transformers/docs/source/en/model_doc/flava.md", "repo_id": "transformers", "token_count": 1040 }
342
<!--Copyright 2025 The ZhipuAI Inc. and The HuggingFace Inc. team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required b...
transformers/docs/source/en/model_doc/glm4v_moe.md/0
{ "file_path": "transformers/docs/source/en/model_doc/glm4v_moe.md", "repo_id": "transformers", "token_count": 1047 }
343
<!--Copyright 2025 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/granitemoeshared.md/0
{ "file_path": "transformers/docs/source/en/model_doc/granitemoeshared.md", "repo_id": "transformers", "token_count": 745 }
344
<!--Copyright 2025 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/ijepa.md/0
{ "file_path": "transformers/docs/source/en/model_doc/ijepa.md", "repo_id": "transformers", "token_count": 1806 }
345
<!--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/layoutxlm.md/0
{ "file_path": "transformers/docs/source/en/model_doc/layoutxlm.md", "repo_id": "transformers", "token_count": 1077 }
346
<!--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/luke.md/0
{ "file_path": "transformers/docs/source/en/model_doc/luke.md", "repo_id": "transformers", "token_count": 2616 }
347
<!--Copyright 2025 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/metaclip_2.md/0
{ "file_path": "transformers/docs/source/en/model_doc/metaclip_2.md", "repo_id": "transformers", "token_count": 1535 }
348
<!--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/nllb-moe.md/0
{ "file_path": "transformers/docs/source/en/model_doc/nllb-moe.md", "repo_id": "transformers", "token_count": 2095 }
349
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/pop2piano.md/0
{ "file_path": "transformers/docs/source/en/model_doc/pop2piano.md", "repo_id": "transformers", "token_count": 2622 }
350
<!--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/unispeech.md/0
{ "file_path": "transformers/docs/source/en/model_doc/unispeech.md", "repo_id": "transformers", "token_count": 1122 }
351
<!--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/xlm-roberta-xl.md/0
{ "file_path": "transformers/docs/source/en/model_doc/xlm-roberta-xl.md", "repo_id": "transformers", "token_count": 1850 }
352
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/models.md/0
{ "file_path": "transformers/docs/source/en/models.md", "repo_id": "transformers", "token_count": 4285 }
353
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/perf_train_gpu_one.md/0
{ "file_path": "transformers/docs/source/en/perf_train_gpu_one.md", "repo_id": "transformers", "token_count": 4509 }
354
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/quicktour.md/0
{ "file_path": "transformers/docs/source/en/quicktour.md", "repo_id": "transformers", "token_count": 4226 }
355
<!--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/language_modeling.md/0
{ "file_path": "transformers/docs/source/en/tasks/language_modeling.md", "repo_id": "transformers", "token_count": 5554 }
356
<!--Copyright 2025 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/visual_document_retrieval.md/0
{ "file_path": "transformers/docs/source/en/tasks/visual_document_retrieval.md", "repo_id": "transformers", "token_count": 2006 }
357
- 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": 1230 }
358
<!--- Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
transformers/docs/source/es/model_memory_anatomy.md/0
{ "file_path": "transformers/docs/source/es/model_memory_anatomy.md", "repo_id": "transformers", "token_count": 4605 }
359
<!--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": 6031 }
360
<!--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/it/add_new_pipeline.md/0
{ "file_path": "transformers/docs/source/it/add_new_pipeline.md", "repo_id": "transformers", "token_count": 4072 }
361
<!--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/perf_infer_gpu_one.md/0
{ "file_path": "transformers/docs/source/it/perf_infer_gpu_one.md", "repo_id": "transformers", "token_count": 2333 }
362
<!-- Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
transformers/docs/source/ja/attention.md/0
{ "file_path": "transformers/docs/source/ja/attention.md", "repo_id": "transformers", "token_count": 1963 }
363
<!--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/internal/generation_utils.md/0
{ "file_path": "transformers/docs/source/ja/internal/generation_utils.md", "repo_id": "transformers", "token_count": 3478 }
364
<!--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/main_classes/model.md/0
{ "file_path": "transformers/docs/source/ja/main_classes/model.md", "repo_id": "transformers", "token_count": 2974 }
365
<!--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/bark.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/bark.md", "repo_id": "transformers", "token_count": 3177 }
366
<!--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/blip.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/blip.md", "repo_id": "transformers", "token_count": 1815 }
367
<!--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/convbert.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/convbert.md", "repo_id": "transformers", "token_count": 2167 }
368
<!--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/dialogpt.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/dialogpt.md", "repo_id": "transformers", "token_count": 1577 }
369
<!--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_gpu_many.md/0
{ "file_path": "transformers/docs/source/ja/perf_train_gpu_many.md", "repo_id": "transformers", "token_count": 18235 }
370
<!--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/asr.md/0
{ "file_path": "transformers/docs/source/ja/tasks/asr.md", "repo_id": "transformers", "token_count": 7049 }
371
# docstyle-ignore INSTALL_CONTENT = """ # Transformers 설치 방법 ! pip install transformers datasets evaluate accelerate # 마지막 릴리스 대신 소스에서 설치하려면, 위 명령을 주석으로 바꾸고 아래 명령을 해제하세요. # ! pip install git+https://github.com/huggingface/transformers.git """ notebook_first_cells = [{"type": "code", "content": INSTALL_CONTENT}] black_...
transformers/docs/source/ko/_config.py/0
{ "file_path": "transformers/docs/source/ko/_config.py", "repo_id": "transformers", "token_count": 259 }
372
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/fsdp.md/0
{ "file_path": "transformers/docs/source/ko/fsdp.md", "repo_id": "transformers", "token_count": 5834 }
373
<!--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/main_classes/pipelines.md/0
{ "file_path": "transformers/docs/source/ko/main_classes/pipelines.md", "repo_id": "transformers", "token_count": 9346 }
374
<!--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/model_doc/biogpt.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/biogpt.md", "repo_id": "transformers", "token_count": 6060 }
375
<!--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 agree...
transformers/docs/source/ko/model_doc/gemma2.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/gemma2.md", "repo_id": "transformers", "token_count": 1279 }
376
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/model_doc/paligemma.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/paligemma.md", "repo_id": "transformers", "token_count": 2814 }
377
<!--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/model_doc/whisper.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/whisper.md", "repo_id": "transformers", "token_count": 2696 }
378
<!--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/perplexity.md/0
{ "file_path": "transformers/docs/source/ko/perplexity.md", "repo_id": "transformers", "token_count": 6268 }
379
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/tasks/asr.md/0
{ "file_path": "transformers/docs/source/ko/tasks/asr.md", "repo_id": "transformers", "token_count": 9518 }
380
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/tasks/prompting.md/0
{ "file_path": "transformers/docs/source/ko/tasks/prompting.md", "repo_id": "transformers", "token_count": 15928 }
381
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ko/trainer.md/0
{ "file_path": "transformers/docs/source/ko/trainer.md", "repo_id": "transformers", "token_count": 15482 }
382
<!--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/quicktour.md/0
{ "file_path": "transformers/docs/source/pt/quicktour.md", "repo_id": "transformers", "token_count": 6103 }
383
<!--版权2020年HuggingFace团队保留所有权利。 根据Apache许可证第2.0版(“许可证”)许可;除非符合许可证,否则您不得使用此文件。您可以在以下网址获取许可证的副本: http://www.apache.org/licenses/LICENSE-2.0 除非适用法律要求或书面同意,否则按“按原样”分发的软件,无论是明示还是暗示的,都没有任何担保或条件。请参阅许可证以了解特定语言下的权限和限制。 ⚠️ 请注意,本文件虽然使用Markdown编写,但包含了特定的语法,适用于我们的doc-builder(类似于MDX),可能无法在您的Markdown查看器中正常渲染。 --> # 基于BERT进行的相关研...
transformers/docs/source/zh/bertology.md/0
{ "file_path": "transformers/docs/source/zh/bertology.md", "repo_id": "transformers", "token_count": 1343 }
384
<!--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/internal/generation_utils.md/0
{ "file_path": "transformers/docs/source/zh/internal/generation_utils.md", "repo_id": "transformers", "token_count": 3447 }
385
<!--版权所有 2020 年 HuggingFace 团队。保留所有权利。 根据 Apache 许可证 2.0 版本许可,除非符合许可证的规定,否则您不得使用此文件。您可以在以下网址获取许可证的副本: http://www.apache.org/licenses/LICENSE-2.0 除非适用法律要求或书面同意,否则依照许可证分发的软件是基于“原样”提供的,不附带任何明示或暗示的担保或条件。有关特定语言下权限的限制和限制,请参阅许可证。--> # 模型 基类 [`PreTrainedModel`]、[`TFPreTrainedModel`] 和 [`FlaxPreTrainedModel`] 实现了从本地文件或目录加载...
transformers/docs/source/zh/main_classes/model.md/0
{ "file_path": "transformers/docs/source/zh/main_classes/model.md", "repo_id": "transformers", "token_count": 3276 }
386
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/zh/perf_torch_compile.md/0
{ "file_path": "transformers/docs/source/zh/perf_torch_compile.md", "repo_id": "transformers", "token_count": 6785 }
387
<!-- 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 agree...
transformers/docs/source/zh/torchscript.md/0
{ "file_path": "transformers/docs/source/zh/torchscript.md", "repo_id": "transformers", "token_count": 4763 }
388
#!/usr/bin/env python # 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 ...
transformers/examples/flax/language-modeling/run_t5_mlm_flax.py/0
{ "file_path": "transformers/examples/flax/language-modeling/run_t5_mlm_flax.py", "repo_id": "transformers", "token_count": 18771 }
389
<!--- 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/token-classification/README.md/0
{ "file_path": "transformers/examples/flax/token-classification/README.md", "repo_id": "transformers", "token_count": 557 }
390
# Install example requirements pip install -r ../requirements.txt # Download glue data python3 ../../utils/download_glue_data.py export TASK=mrpc export DATA_DIR=./glue_data/MRPC/ export MAX_LENGTH=128 export LEARNING_RATE=2e-5 export BERT_MODEL=bert-base-cased export BATCH_SIZE=32 export NUM_EPOCHS=3 export SEED=2 e...
transformers/examples/legacy/pytorch-lightning/run_glue.sh/0
{ "file_path": "transformers/examples/legacy/pytorch-lightning/run_glue.sh", "repo_id": "transformers", "token_count": 360 }
391
#!/usr/bin/env python # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
transformers/examples/legacy/seq2seq/download_wmt.py/0
{ "file_path": "transformers/examples/legacy/seq2seq/download_wmt.py", "repo_id": "transformers", "token_count": 1018 }
392