text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
#[macro_use]
extern crate criterion;
mod common;
use criterion::{Criterion, Throughput};
use tokenizers::models::bpe::{BpeTrainerBuilder, BPE};
use tokenizers::models::TrainerWrapper;
use tokenizers::pre_tokenizers::byte_level::ByteLevel;
use tokenizers::pre_tokenizers::whitespace::Whitespace;
use tokenizers::tokeniz... | tokenizers/tokenizers/benches/bpe_benchmark.rs/0 | {
"file_path": "tokenizers/tokenizers/benches/bpe_benchmark.rs",
"repo_id": "tokenizers",
"token_count": 1925
} | 327 |
use crate::tokenizer::{Decoder, Result};
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Clone, Debug, Serialize, Default)]
/// Strip is a simple trick which converts tokens looking like `<0x61>`
/// to pure bytes, and attempts to make them into a string. If the tokens
/// cannot be decoded you will get � ... | tokenizers/tokenizers/src/decoders/strip.rs/0 | {
"file_path": "tokenizers/tokenizers/src/decoders/strip.rs",
"repo_id": "tokenizers",
"token_count": 1217
} | 328 |
use super::{super::OrderedVocabIter, WordLevel, WordLevelBuilder};
use ahash::AHashSet;
use serde::{
de::{MapAccess, Visitor},
ser::SerializeStruct,
Deserialize, Deserializer, Serialize, Serializer,
};
impl Serialize for WordLevel {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
w... | tokenizers/tokenizers/src/models/wordlevel/serialization.rs/0 | {
"file_path": "tokenizers/tokenizers/src/models/wordlevel/serialization.rs",
"repo_id": "tokenizers",
"token_count": 2084
} | 329 |
use serde::{Deserialize, Serialize};
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior};
use crate::utils::macro_rules_attribute;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[non_exhaustive]
#[macro_rules_attribute(impl_serde_type!)]
pub struct CharDelimiterSplit {
pub deli... | tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/delimiter.rs",
"repo_id": "tokenizers",
"token_count": 296
} | 330 |
//! # Template Processing
//!
//! Provides a way to specify templates in order to add the special tokens to each
//! input sequence as relevant.
//!
//! ## Example
//!
//! Let's take `BERT` tokenizer as an example. It uses two special tokens, used to
//! delimitate each sequence. `[CLS]` is always used at the beginning... | tokenizers/tokenizers/src/processors/template.rs/0 | {
"file_path": "tokenizers/tokenizers/src/processors/template.rs",
"repo_id": "tokenizers",
"token_count": 21754
} | 331 |
#[cfg(feature = "progressbar")]
pub(crate) use indicatif::{ProgressBar, ProgressStyle};
#[cfg(not(feature = "progressbar"))]
mod progressbar {
use std::borrow::Cow;
pub struct ProgressBar;
impl ProgressBar {
pub fn new(_length: u64) -> Self {
Self {}
}
pub fn set_length... | tokenizers/tokenizers/src/utils/progress.rs/0 | {
"file_path": "tokenizers/tokenizers/src/utils/progress.rs",
"repo_id": "tokenizers",
"token_count": 403
} | 332 |
# Building a Next.js application
In this tutorial, we'll build a simple Next.js application that performs sentiment analysis using Transformers.js!
Since Transformers.js can run in the browser or in Node.js, you can choose whether you want to perform inference [client-side](#client-side-inference) or [server-side](#s... | transformers.js/docs/source/tutorials/next.md/0 | {
"file_path": "transformers.js/docs/source/tutorials/next.md",
"repo_id": "transformers.js",
"token_count": 5397
} | 333 |
.progress-bar {
align-items: start;
width: 0%;
padding: 2px 8px;
min-height: 22px;
}
.progress {
height: auto;
}
.form-control:checked[type=checkbox] {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linec... | transformers.js/examples/demo-site/src/style.css/0 | {
"file_path": "transformers.js/examples/demo-site/src/style.css",
"repo_id": "transformers.js",
"token_count": 1131
} | 334 |
// This script handles interaction with the user interface, as well as communication
// between the renderer thread (UI) and the worker thread (processing).
const inputElement = document.getElementById('text');
const outputElement = document.getElementById('output');
// 1. Send input data to the worker thread when it... | transformers.js/examples/electron/src/client.js/0 | {
"file_path": "transformers.js/examples/electron/src/client.js",
"repo_id": "transformers.js",
"token_count": 163
} | 335 |
// popup.js - handles interaction with the extension's popup, sends requests to the
// service worker (background.js), and updates the popup's UI (popup.html) on completion.
const inputElement = document.getElementById('text');
const outputElement = document.getElementById('output');
// Listen for changes made to the... | transformers.js/examples/extension/src/popup.js/0 | {
"file_path": "transformers.js/examples/extension/src/popup.js",
"repo_id": "transformers.js",
"token_count": 245
} | 336 |
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
| transformers.js/examples/next-client/jsconfig.json/0 | {
"file_path": "transformers.js/examples/next-client/jsconfig.json",
"repo_id": "transformers.js",
"token_count": 44
} | 337 |
{
"name": "audio-processing",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@xenova/transformers": "^2.2.0",
"wavefile... | transformers.js/examples/node-audio-processing/package.json/0 | {
"file_path": "transformers.js/examples/node-audio-processing/package.json",
"repo_id": "transformers.js",
"token_count": 149
} | 338 |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Semantic Audio Search | Transformers.js</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<div id="header">
<div id="title">In-browser Semant... | transformers.js/examples/semantic-audio-search/index.html/0 | {
"file_path": "transformers.js/examples/semantic-audio-search/index.html",
"repo_id": "transformers.js",
"token_count": 275
} | 339 |
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
| transformers.js/examples/semantic-image-search/jsconfig.json/0 | {
"file_path": "transformers.js/examples/semantic-image-search/jsconfig.json",
"repo_id": "transformers.js",
"token_count": 44
} | 340 |
// Create a custom request handler for the /classify route.
// For more information, see https://nextjs.org/docs/app/building-your-application/routing/router-handlers
import { NextResponse } from 'next/server'
import ApplicationSingleton from '../app.js'
const parseInputs = (searchParams) => {
const text = search... | transformers.js/examples/semantic-image-search/src/app/search/route.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search/src/app/search/route.js",
"repo_id": "transformers.js",
"token_count": 917
} | 341 |
import { env, Tensor, AutoTokenizer, SpeechT5ForTextToSpeech, SpeechT5HifiGan } from '@xenova/transformers';
import { encodeWAV } from './utils';
// Disable local model checks
env.allowLocalModels = false;
// Use the Singleton pattern to enable lazy construction of the pipeline.
class MyTextToSpeechPipeline {
... | transformers.js/examples/text-to-speech-client/src/worker.js/0 | {
"file_path": "transformers.js/examples/text-to-speech-client/src/worker.js",
"repo_id": "transformers.js",
"token_count": 1398
} | 342 |
{
"name": "@huggingface/transformers",
"version": "3.7.2",
"description": "State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!",
"main": "./src/transformers.js",
"types": "./types/transformers.d.ts",
"type": "module",
"exports": {
"no... | transformers.js/package.json/0 | {
"file_path": "transformers.js/package.json",
"repo_id": "transformers.js",
"token_count": 1221
} | 343 |
/**
* @file Handler file for choosing the correct version of ONNX Runtime, based on the environment.
* Ideally, we could import the `onnxruntime-web` and `onnxruntime-node` packages only when needed,
* but dynamic imports don't seem to work with the current webpack version and/or configuration.
* This is possibly d... | transformers.js/src/backends/onnx.js/0 | {
"file_path": "transformers.js/src/backends/onnx.js",
"repo_id": "transformers.js",
"token_count": 3084
} | 344 |
import { IMAGE_PROCESSOR_NAME } from '../../utils/constants.js';
import { getModelJSON } from '../../utils/hub.js';
import { Processor } from '../../base/processing_utils.js';
import * as AllProcessors from '../processors.js';
import * as AllImageProcessors from '../image_processors.js';
import * as AllFeatureExtrac... | transformers.js/src/models/auto/processing_auto.js/0 | {
"file_path": "transformers.js/src/models/auto/processing_auto.js",
"repo_id": "transformers.js",
"token_count": 1377
} | 345 |
import { Processor } from "../../base/processing_utils.js";
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
import { AutoTokenizer } from "../../tokenizers.js";
export class Florence2Processor extends Processor {
static tokenizer_class = AutoTokenizer
static image_processor_class = AutoI... | transformers.js/src/models/florence2/processing_florence2.js/0 | {
"file_path": "transformers.js/src/models/florence2/processing_florence2.js",
"repo_id": "transformers.js",
"token_count": 2350
} | 346 |
import {
ImageProcessor,
post_process_panoptic_segmentation,
post_process_instance_segmentation,
} from "../../base/image_processors_utils.js";
export class MaskFormerImageProcessor extends ImageProcessor {
/** @type {typeof post_process_panoptic_segmentation} */
post_process_panoptic_segmentatio... | transformers.js/src/models/maskformer/image_processing_maskformer.js/0 | {
"file_path": "transformers.js/src/models/maskformer/image_processing_maskformer.js",
"repo_id": "transformers.js",
"token_count": 229
} | 347 |
export * from './florence2/processing_florence2.js';
export * from './gemma3n/processing_gemma3n.js';
export * from './grounding_dino/processing_grounding_dino.js';
export * from './idefics3/processing_idefics3.js';
export * from './janus/processing_janus.js';
export * from './jina_clip/processing_jina_clip.js';
export... | transformers.js/src/models/processors.js/0 | {
"file_path": "transformers.js/src/models/processors.js",
"repo_id": "transformers.js",
"token_count": 428
} | 348 |
import { FeatureExtractor } from "../../base/feature_extraction_utils.js";
export class SpeechT5FeatureExtractor extends FeatureExtractor { }
| transformers.js/src/models/speecht5/feature_extraction_speecht5.js/0 | {
"file_path": "transformers.js/src/models/speecht5/feature_extraction_speecht5.js",
"repo_id": "transformers.js",
"token_count": 39
} | 349 |
import {
ImageProcessor,
post_process_object_detection,
} from "../../base/image_processors_utils.js";
export class YolosImageProcessor extends ImageProcessor {
/** @type {typeof post_process_object_detection} */
post_process_object_detection(...args) {
return post_process_object_detection(...... | transformers.js/src/models/yolos/image_processing_yolos.js/0 | {
"file_path": "transformers.js/src/models/yolos/image_processing_yolos.js",
"repo_id": "transformers.js",
"token_count": 140
} | 350 |
import { RawImage } from "./image.js";
import { apis } from "../env.js";
export class RawVideoFrame {
/**
* @param {RawImage} image
* @param {number} timestamp
*/
constructor(image, timestamp) {
this.image = image;
this.timestamp = timestamp;
}
}
export class RawVideo {
... | transformers.js/src/utils/video.js/0 | {
"file_path": "transformers.js/src/utils/video.js",
"repo_id": "transformers.js",
"token_count": 1547
} | 351 |
import { BloomTokenizer, BloomForCausalLM } 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("BloomForCausalLM", () => {
const model_id = "hf-internal-testing/tiny-ran... | transformers.js/tests/models/bloom/test_modeling_bloom.js/0 | {
"file_path": "transformers.js/tests/models/bloom/test_modeling_bloom.js",
"repo_id": "transformers.js",
"token_count": 742
} | 352 |
import { EfficientNetImageProcessor } from "../../../src/transformers.js";
import { load_cached_image } from "../../asset_cache.js";
import { MAX_TEST_EXECUTION_TIME } from "../../init.js";
export default () => {
// EfficientNetImageProcessor
// - tests include_top
describe("EfficientNetImageProcessor", () => ... | transformers.js/tests/models/efficientnet/test_image_processing_efficientnet.js/0 | {
"file_path": "transformers.js/tests/models/efficientnet/test_image_processing_efficientnet.js",
"repo_id": "transformers.js",
"token_count": 637
} | 353 |
import { MgpstrProcessor, MgpstrForSceneTextRecognition } from "../../../src/transformers.js";
import { load_cached_image } from "../../asset_cache.js";
import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js";
export default () => {
describe("Mgpst... | transformers.js/tests/models/mgp_str/test_modeling_mgp_str.js/0 | {
"file_path": "transformers.js/tests/models/mgp_str/test_modeling_mgp_str.js",
"repo_id": "transformers.js",
"token_count": 1680
} | 354 |
import { PaliGemmaProcessor, PaliGemmaForConditionalGeneration, RawImage } 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 text = "<image>What is on the flower?";
// Empt... | transformers.js/tests/models/paligemma/test_modeling_paligemma.js/0 | {
"file_path": "transformers.js/tests/models/paligemma/test_modeling_paligemma.js",
"repo_id": "transformers.js",
"token_count": 790
} | 355 |
import { T5Tokenizer, T5Model, T5ForConditionalGeneration } 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("T5Model", () => {
const model_id = "hf-internal-testing/t... | transformers.js/tests/models/t5/test_modeling_t5.js/0 | {
"file_path": "transformers.js/tests/models/t5/test_modeling_t5.js",
"repo_id": "transformers.js",
"token_count": 1496
} | 356 |
import { pipeline, AudioClassificationPipeline } 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 = "audio-classification";
export default () => {
describe("Audio Classification", () => {
... | transformers.js/tests/pipelines/test_pipelines_audio_classification.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_audio_classification.js",
"repo_id": "transformers.js",
"token_count": 1277
} | 357 |
import { pipeline, TextClassificationPipeline } 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-classification";
export default () => {
describe("Text Classification", () => {
c... | transformers.js/tests/pipelines/test_pipelines_text_classification.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_text_classification.js",
"repo_id": "transformers.js",
"token_count": 1699
} | 358 |
import {
// Pipelines
pipeline,
TextGenerationPipeline,
} from "../../src/transformers.js";
import { init } from "../init.js";
import { compare } from "../test_utils.js";
init();
const MAX_MODEL_LOAD_TIME = 10_000; // 10 seconds
const MAX_TEST_EXECUTION_TIME = 10_000; // 10 seconds
const MAX_MODEL_DISPOSE_TIME ... | transformers.js/tests/utils/logits_process.test.js/0 | {
"file_path": "transformers.js/tests/utils/logits_process.test.js",
"repo_id": "transformers.js",
"token_count": 1780
} | 359 |
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-08.html
FROM nvcr.io/nvidia/pytorch:24.08-py3
LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive
ARG PYTORCH='2.8.0'
# Example: `cu102`, `cu113`, etc.
ARG CUDA='cu126'
RUN apt -y update
RUN apt install -y libaio-dev
RUN py... | transformers/docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 975
} | 360 |
# تشريح عملية تدريب النموذج
لفهم تقنيات تحسين الأداء التي يمكن تطبيقها لتحسين كفاءة استخدام الذاكرة وسرعة تدريب النموذج، من المفيد التعرف على كيفية استخدام وحدة معالجة الرسوميات (GPU) أثناء التدريب، وكيف تختلف كثافة العمليات الحسابية باختلاف العملية التي يتم تنفيذها.
لنبدأ باستكشاف مثال توضيحي على استخدام وحدة GPU وت... | transformers/docs/source/ar/model_memory_anatomy.md/0 | {
"file_path": "transformers/docs/source/ar/model_memory_anatomy.md",
"repo_id": "transformers",
"token_count": 8005
} | 361 |
# التصدير إلى ONNX
غالباً ما يتطلب نشر نماذج 🤗 Transformers في بيئات الإنتاج أو يمكن أن يستفيد من تصدير النماذج إلى تنسيق تسلسلي يُمكن تحميله وتنفيذه على أجهزة وبرامج تشغيل مُتخصصة.
🤗 Optimum هو امتداد لـ Transformers يمكّن من تصدير النماذج من PyTorch أو TensorFlow إلى تنسيقات مُتسلسلة مثل ONNX و TFLite من خلال وحد... | transformers/docs/source/ar/serialization.md/0 | {
"file_path": "transformers/docs/source/ar/serialization.md",
"repo_id": "transformers",
"token_count": 5874
} | 362 |
<!--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/preprocessing.md/0 | {
"file_path": "transformers/docs/source/de/preprocessing.md",
"repo_id": "transformers",
"token_count": 10560
} | 363 |
<!--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/cache_explanation.md/0 | {
"file_path": "transformers/docs/source/en/cache_explanation.md",
"repo_id": "transformers",
"token_count": 3405
} | 364 |
<!--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/generation_features.md/0 | {
"file_path": "transformers/docs/source/en/generation_features.md",
"repo_id": "transformers",
"token_count": 1323
} | 365 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/image_processor.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/image_processor.md",
"repo_id": "transformers",
"token_count": 1086
} | 366 |
<!--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/albert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/albert.md",
"repo_id": "transformers",
"token_count": 2452
} | 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/en/model_doc/bert-japanese.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bert-japanese.md",
"repo_id": "transformers",
"token_count": 947
} | 368 |
<!--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/byt5.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/byt5.md",
"repo_id": "transformers",
"token_count": 1611
} | 369 |
<!--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/decision_transformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/decision_transformer.md",
"repo_id": "transformers",
"token_count": 734
} | 370 |
<!--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/dinat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dinat.md",
"repo_id": "transformers",
"token_count": 1467
} | 371 |
<!--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/flan-ul2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/flan-ul2.md",
"repo_id": "transformers",
"token_count": 889
} | 372 |
<!--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/glm4_moe.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/glm4_moe.md",
"repo_id": "transformers",
"token_count": 880
} | 373 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/granitemoe.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/granitemoe.md",
"repo_id": "transformers",
"token_count": 1308
} | 374 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/idefics2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/idefics2.md",
"repo_id": "transformers",
"token_count": 3410
} | 375 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/layoutlmv2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/layoutlmv2.md",
"repo_id": "transformers",
"token_count": 5491
} | 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/en/model_doc/longformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/longformer.md",
"repo_id": "transformers",
"token_count": 1968
} | 377 |
<!--Copyright 2021 NVIDIA Corporation and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | transformers/docs/source/en/model_doc/megatron-bert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/megatron-bert.md",
"repo_id": "transformers",
"token_count": 1830
} | 378 |
<!--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/mobilenet_v2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mobilenet_v2.md",
"repo_id": "transformers",
"token_count": 1829
} | 379 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/lic... | transformers/docs/source/en/model_doc/nemotron.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nemotron.md",
"repo_id": "transformers",
"token_count": 1869
} | 380 |
<!--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/owlvit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/owlvit.md",
"repo_id": "transformers",
"token_count": 2120
} | 381 |
<!--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/plbart.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/plbart.md",
"repo_id": "transformers",
"token_count": 1782
} | 382 |
<!--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/rag.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/rag.md",
"repo_id": "transformers",
"token_count": 1410
} | 383 |
<!--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/sam2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/sam2.md",
"repo_id": "transformers",
"token_count": 4434
} | 384 |
<!--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": 1921
} | 385 |
<!--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/t5v1.1.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/t5v1.1.md",
"repo_id": "transformers",
"token_count": 1064
} | 386 |
<!--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/vit_msn.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vit_msn.md",
"repo_id": "transformers",
"token_count": 2330
} | 387 |
<!--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/xglm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/xglm.md",
"repo_id": "transformers",
"token_count": 1065
} | 388 |
<!---
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/en/model_memory_anatomy.md/0 | {
"file_path": "transformers/docs/source/en/model_memory_anatomy.md",
"repo_id": "transformers",
"token_count": 3299
} | 389 |
<!--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/perf_train_gaudi.md/0 | {
"file_path": "transformers/docs/source/en/perf_train_gaudi.md",
"repo_id": "transformers",
"token_count": 579
} | 390 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/quantization/compressed_tensors.md/0 | {
"file_path": "transformers/docs/source/en/quantization/compressed_tensors.md",
"repo_id": "transformers",
"token_count": 3681
} | 391 |
<!--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/quantization/torchao.md/0 | {
"file_path": "transformers/docs/source/en/quantization/torchao.md",
"repo_id": "transformers",
"token_count": 9446
} | 392 |
<!--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/keypoint_detection.md/0 | {
"file_path": "transformers/docs/source/en/tasks/keypoint_detection.md",
"repo_id": "transformers",
"token_count": 2398
} | 393 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/es/serialization.md/0 | {
"file_path": "transformers/docs/source/es/serialization.md",
"repo_id": "transformers",
"token_count": 10517
} | 394 |
- sections:
- local: index
title: 🤗 Transformers
- local: quicktour
title: Visite rapide
- local: installation
title: Installation
title: Démarrer
- sections:
- local: tutoriel_pipeline
title: Pipelines pour l'inférence
- local: autoclass_tutorial
title: Chargement d'instances pré-entra... | transformers/docs/source/fr/_toctree.yml/0 | {
"file_path": "transformers/docs/source/fr/_toctree.yml",
"repo_id": "transformers",
"token_count": 377
} | 395 |
<!--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/accelerate.md/0 | {
"file_path": "transformers/docs/source/it/accelerate.md",
"repo_id": "transformers",
"token_count": 1891
} | 396 |
<!--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_cpu.md/0 | {
"file_path": "transformers/docs/source/it/perf_infer_cpu.md",
"repo_id": "transformers",
"token_count": 1497
} | 397 |
<!--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/accelerate.md/0 | {
"file_path": "transformers/docs/source/ja/accelerate.md",
"repo_id": "transformers",
"token_count": 2185
} | 398 |
<!--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/internal/audio_utils.md/0 | {
"file_path": "transformers/docs/source/ja/internal/audio_utils.md",
"repo_id": "transformers",
"token_count": 554
} | 399 |
<!--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/auto.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/auto.md",
"repo_id": "transformers",
"token_count": 3325
} | 400 |
<!--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.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/blenderbot.md",
"repo_id": "transformers",
"token_count": 2296
} | 401 |
<!--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/codegen.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/codegen.md",
"repo_id": "transformers",
"token_count": 2154
} | 402 |
<!--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/deta.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/deta.md",
"repo_id": "transformers",
"token_count": 1896
} | 403 |
<!--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/perf_train_cpu.md/0 | {
"file_path": "transformers/docs/source/ja/perf_train_cpu.md",
"repo_id": "transformers",
"token_count": 1666
} | 404 |
<!--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/serialization.md/0 | {
"file_path": "transformers/docs/source/ja/serialization.md",
"repo_id": "transformers",
"token_count": 4847
} | 405 |
<!--Copyright (c) Meta Platforms, Inc. and affiliates.
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... | transformers/docs/source/ko/executorch.md/0 | {
"file_path": "transformers/docs/source/ko/executorch.md",
"repo_id": "transformers",
"token_count": 1257
} | 406 |
<!--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/output.md/0 | {
"file_path": "transformers/docs/source/ko/main_classes/output.md",
"repo_id": "transformers",
"token_count": 5116
} | 407 |
<!--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/model_doc/bert.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/bert.md",
"repo_id": "transformers",
"token_count": 10656
} | 408 |
<!--Copyright 2025 The LG AI Research and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | transformers/docs/source/ko/model_doc/exaone4.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/exaone4.md",
"repo_id": "transformers",
"token_count": 3936
} | 409 |
<!--Copyright 2023 Mistral AI and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicabl... | transformers/docs/source/ko/model_doc/mistral.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/mistral.md",
"repo_id": "transformers",
"token_count": 7039
} | 410 |
<!--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/ko/model_doc/vit.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/vit.md",
"repo_id": "transformers",
"token_count": 8310
} | 411 |
<!--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/perf_train_gpu_one.md/0 | {
"file_path": "transformers/docs/source/ko/perf_train_gpu_one.md",
"repo_id": "transformers",
"token_count": 13668
} | 412 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/serialization.md/0 | {
"file_path": "transformers/docs/source/ko/serialization.md",
"repo_id": "transformers",
"token_count": 6886
} | 413 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/multiple_choice.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/multiple_choice.md",
"repo_id": "transformers",
"token_count": 8001
} | 414 |
<!--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": 15148
} | 415 |
<!--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": 3212
} | 416 |
<!--版权2023年HuggingFace团队保留所有权利。
根据Apache许可证第2.0版(“许可证”)许可;除非符合许可证,否则您不得使用此文件。您可以在以下网址获取许可证的副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则按“按原样”分发的软件,无论是明示还是暗示的,都没有任何担保或条件。请参阅许可证以了解特定语言下的权限和限制。
⚠️ 请注意,本文件虽然使用Markdown编写,但包含了特定的语法,适用于我们的doc-builder(类似于MDX),可能无法在您的Markdown查看器中正常渲染。
-->
# 注意力机制
大多数 t... | transformers/docs/source/zh/attention.md/0 | {
"file_path": "transformers/docs/source/zh/attention.md",
"repo_id": "transformers",
"token_count": 2385
} | 417 |
<!---
Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | transformers/docs/source/zh/perf_hardware.md/0 | {
"file_path": "transformers/docs/source/zh/perf_hardware.md",
"repo_id": "transformers",
"token_count": 3946
} | 418 |
<!--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/zh/tiktoken.md/0 | {
"file_path": "transformers/docs/source/zh/tiktoken.md",
"repo_id": "transformers",
"token_count": 1169
} | 419 |
#!/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_clm_flax.py/0 | {
"file_path": "transformers/examples/flax/language-modeling/run_clm_flax.py",
"repo_id": "transformers",
"token_count": 15959
} | 420 |
import os
import sys
sys.path.insert(1, os.path.dirname(os.path.realpath(__file__)))
| transformers/examples/legacy/seq2seq/__init__.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/__init__.py",
"repo_id": "transformers",
"token_count": 34
} | 421 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/examples/legacy/seq2seq/rouge_cli.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/rouge_cli.py",
"repo_id": "transformers",
"token_count": 385
} | 422 |
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licens... | transformers/examples/legacy/token-classification/utils_ner.py/0 | {
"file_path": "transformers/examples/legacy/token-classification/utils_ner.py",
"repo_id": "transformers",
"token_count": 7654
} | 423 |
#!/bin/bash
# Iterate over each file in the current directory
for file in examples/modular-transformers/modular_*; do
# Check if it's a regular file
if [ -f "$file" ]; then
# Call the Python script with the file name as an argument
python utils/modular_model_converter.py --files_to_parse "$file... | transformers/examples/modular-transformers/convert_examples.sh/0 | {
"file_path": "transformers/examples/modular-transformers/convert_examples.sh",
"repo_id": "transformers",
"token_count": 118
} | 424 |
from transformers.models.clip.modeling_clip import CLIPEncoderLayer
# Check if we can correctly grab dependencies with correct naming from all UPPERCASE old model
class FromUppercaseModelEncoderLayer(CLIPEncoderLayer):
pass
| transformers/examples/modular-transformers/modular_from_uppercase_model.py/0 | {
"file_path": "transformers/examples/modular-transformers/modular_from_uppercase_model.py",
"repo_id": "transformers",
"token_count": 62
} | 425 |
#!/usr/bin/env python
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | transformers/examples/pytorch/image-pretraining/run_mim_no_trainer.py/0 | {
"file_path": "transformers/examples/pytorch/image-pretraining/run_mim_no_trainer.py",
"repo_id": "transformers",
"token_count": 12940
} | 426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.