text
stringlengths
5
424k
id
stringlengths
13
178
metadata
dict
__index_level_0__
int64
0
672
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_processing.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_processing.py", "repo_id": "text-generation-inference", "token_count": 8120 }
300
import torch import os from loguru import logger from typing import Dict, Optional from text_generation_server.utils.log import log_master REQUEST_LOGPROBS = os.getenv("REQUEST_LOGPROBS", "0").lower() in {"1", "true"} ATTENTION = os.environ["ATTENTION"] # default_prefix_caching = "1" if ATTENTION in {"flashinfer", "f...
text-generation-inference/server/text_generation_server/models/globals.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/globals.py", "repo_id": "text-generation-inference", "token_count": 917 }
301
[package] authors = ["Nicolas Patry <nicolas@huggingface.co>"] edition = "2021" name = "node" version = "0.22.2-dev.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] crate-type = ["cdylib"] [dependencies] napi = "2" napi-derive = "2" serde = { v...
tokenizers/bindings/node/Cargo.toml/0
{ "file_path": "tokenizers/bindings/node/Cargo.toml", "repo_id": "tokenizers", "token_count": 221 }
302
import { prependNormalizer, stripAccentsNormalizer, stripNormalizer } from '../../' describe('stripNormalizer', () => { it('instantiates with no parameters', () => { const normalizer = stripNormalizer() expect(normalizer.constructor.name).toEqual('Normalizer') }) it('accepts `undefined` as first paramet...
tokenizers/bindings/node/lib/bindings/normalizers.test.ts/0
{ "file_path": "tokenizers/bindings/node/lib/bindings/normalizers.test.ts", "repo_id": "tokenizers", "token_count": 468 }
303
{ "name": "tokenizers-linux-arm-gnueabihf", "version": "0.13.4-rc1", "os": [ "linux" ], "cpu": [ "arm" ], "main": "tokenizers.linux-arm-gnueabihf.node", "files": [ "tokenizers.linux-arm-gnueabihf.node" ], "description": "Tokenizers platform specific bindings", "keywords": [ "napi-r...
tokenizers/bindings/node/npm/linux-arm-gnueabihf/package.json/0
{ "file_path": "tokenizers/bindings/node/npm/linux-arm-gnueabihf/package.json", "repo_id": "tokenizers", "token_count": 278 }
304
tab_spaces = 2
tokenizers/bindings/node/rustfmt.toml/0
{ "file_path": "tokenizers/bindings/node/rustfmt.toml", "repo_id": "tokenizers", "token_count": 7 }
305
export type TextInputSequence = string export type PreTokenizedInputSequence = string[] export type InputSequence = TextInputSequence | PreTokenizedInputSequence export type TextEncodeInput = TextInputSequence | [TextInputSequence, TextInputSequence] export type PreTokenizedEncodeInput = PreTokenizedInputSequence | [P...
tokenizers/bindings/node/types.ts/0
{ "file_path": "tokenizers/bindings/node/types.ts", "repo_id": "tokenizers", "token_count": 114 }
306
<jupyter_start><jupyter_code>!wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt -O /tmp/bert-base-uncased-vocab.txt from tokenizers import BertWordPieceTokenizer from tokenizers.tools import EncodingVisualizer EncodingVisualizer.unk_token_regex.search("aaa[udsnk]aaa") text = """Mathia...
tokenizers/bindings/python/examples/using_the_visualizer.ipynb/0
{ "file_path": "tokenizers/bindings/python/examples/using_the_visualizer.ipynb", "repo_id": "tokenizers", "token_count": 1222 }
307
# Generated content DO NOT EDIT from .. import pre_tokenizers PreTokenizer = pre_tokenizers.PreTokenizer BertPreTokenizer = pre_tokenizers.BertPreTokenizer ByteLevel = pre_tokenizers.ByteLevel CharDelimiterSplit = pre_tokenizers.CharDelimiterSplit Digits = pre_tokenizers.Digits FixedLength = pre_tokenizers.FixedLength...
tokenizers/bindings/python/py_src/tokenizers/pre_tokenizers/__init__.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/pre_tokenizers/__init__.py", "repo_id": "tokenizers", "token_count": 188 }
308
use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; use tk::tokenizer::{Offsets, PaddingDirection}; use tk::utils::truncation::TruncationDirection; use tokenizers as tk; use crate::error::{deprecation_warning, PyError}; /// The :class:`~tokenizers.Encoding` represents the output of a :class:`~tokenizers.T...
tokenizers/bindings/python/src/encoding.rs/0
{ "file_path": "tokenizers/bindings/python/src/encoding.rs", "repo_id": "tokenizers", "token_count": 7328 }
309
import argparse import inspect import os from pathlib import Path INDENT = " " * 4 GENERATED_COMMENT = "# Generated content DO NOT EDIT\n" def do_indent(text: str, indent: str): return text.replace("\n", f"\n{indent}") def function(obj, indent, text_signature=None): if text_signature is None: text...
tokenizers/bindings/python/stub.py/0
{ "file_path": "tokenizers/bindings/python/stub.py", "repo_id": "tokenizers", "token_count": 2392 }
310
# Models <tokenizerslangcontent> <python> ## BPE [[autodoc]] tokenizers.models.BPE ## Model [[autodoc]] tokenizers.models.Model ## Unigram [[autodoc]] tokenizers.models.Unigram ## WordLevel [[autodoc]] tokenizers.models.WordLevel ## WordPiece [[autodoc]] tokenizers.models.WordPiece </python> <rust> The Rust A...
tokenizers/docs/source-doc-builder/api/models.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/api/models.mdx", "repo_id": "tokenizers", "token_count": 179 }
311
Installation with npm ---------------------------------------------------------------------------------------------------- You can simply install 🤗 Tokenizers with npm using:: npm install tokenizers
tokenizers/docs/source/installation/node.inc/0
{ "file_path": "tokenizers/docs/source/installation/node.inc", "repo_id": "tokenizers", "token_count": 31 }
312
#[macro_use] extern crate criterion; mod common; use common::{iter_bench_encode, iter_bench_encode_batch, iter_bench_train}; use criterion::{Criterion, Throughput}; use std::hint::black_box; use tokenizers::{ models::{bpe::BpeTrainerBuilder, TrainerWrapper}, EncodeInput, Tokenizer, }; static BATCH_SIZE: usiz...
tokenizers/tokenizers/benches/llama3_benchmark.rs/0
{ "file_path": "tokenizers/tokenizers/benches/llama3_benchmark.rs", "repo_id": "tokenizers", "token_count": 1034 }
313
// A dependency graph that contains any wasm must all be imported // asynchronously. This `bootstrap.js` file does the single async import, so // that no one else needs to worry about it again. import("./index.js") .catch(e => console.error("Error importing `index.js`:", e));
tokenizers/tokenizers/examples/unstable_wasm/www/bootstrap.js/0
{ "file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/bootstrap.js", "repo_id": "tokenizers", "token_count": 79 }
314
//! [Byte Pair Encoding](https://www.aclweb.org/anthology/P16-1162/) model. use std::{iter, mem}; mod model; mod serialization; pub mod trainer; mod word; type Pair = (u32, u32); /// Errors that can be encountered while using or constructing a `BPE` model. #[derive(thiserror::Error, Debug)] pub enum Error { /// ...
tokenizers/tokenizers/src/models/bpe/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/bpe/mod.rs", "repo_id": "tokenizers", "token_count": 893 }
315
use super::{super::OrderedVocabIter, WordPiece, WordPieceBuilder}; use ahash::{AHashMap, AHashSet}; use serde::{ de::{MapAccess, Visitor}, ser::SerializeStruct, Deserialize, Deserializer, Serialize, Serializer, }; impl Serialize for WordPiece { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::...
tokenizers/tokenizers/src/models/wordpiece/serialization.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/wordpiece/serialization.rs", "repo_id": "tokenizers", "token_count": 2534 }
316
use crate::tokenizer::{Decoder, PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior}; use serde::{de, Deserialize, Deserializer, Serialize}; /// Enum representing options for the metaspace prepending scheme. #[derive(Debug, Clone, PartialEq, Serialize, Eq, Deserialize, Copy)] #[serde(rename_all = "snake_c...
tokenizers/tokenizers/src/pre_tokenizers/metaspace.rs/0
{ "file_path": "tokenizers/tokenizers/src/pre_tokenizers/metaspace.rs", "repo_id": "tokenizers", "token_count": 6687 }
317
//! Represents a tokenization pipeline. //! //! A [`Tokenizer`](struct.Tokenizer.html) is composed of some of the following parts. //! - [`Normalizer`](trait.Normalizer.html): Takes care of the text normalization (like unicode normalization). //! - [`PreTokenizer`](trait.PreTokenizer.html): Takes care of the pre to...
tokenizers/tokenizers/src/tokenizer/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/tokenizer/mod.rs", "repo_id": "tokenizers", "token_count": 23100 }
318
use tokenizers::decoders::wordpiece::WordPiece as WordPieceDecoder; use tokenizers::models::bpe::BPE; use tokenizers::models::wordpiece::WordPiece; use tokenizers::normalizers::bert::BertNormalizer; use tokenizers::pre_tokenizers::bert::BertPreTokenizer; use tokenizers::pre_tokenizers::byte_level::ByteLevel; use tokeni...
tokenizers/tokenizers/tests/common/mod.rs/0
{ "file_path": "tokenizers/tokenizers/tests/common/mod.rs", "repo_id": "tokenizers", "token_count": 811 }
319
# Ignore artifacts: .github dist docs examples scripts types *.md
transformers.js/.prettierignore/0
{ "file_path": "transformers.js/.prettierignore", "repo_id": "transformers.js", "token_count": 22 }
320
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Transformers.js - Depth Anything</title> </head> <body> <h1>Depth Anything w/ 🤗 Transformers.js</h1> <div id="container"> <label id="upload-button" for="uploa...
transformers.js/examples/depth-anything-client/index.html/0
{ "file_path": "transformers.js/examples/depth-anything-client/index.html", "repo_id": "transformers.js", "token_count": 597 }
321
// See the Electron documentation for details on how to use preload scripts: // https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts const { contextBridge, ipcRenderer } = require('electron'); // Here, we use the `contextBridge` API to expose a custom API to the renderer process. // This API ...
transformers.js/examples/electron/src/preload.js/0
{ "file_path": "transformers.js/examples/electron/src/preload.js", "repo_id": "transformers.js", "token_count": 153 }
322
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Florence2 WebGPU</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.jsx"></script> </body> </html>
transformers.js/examples/florence2-webgpu/index.html/0
{ "file_path": "transformers.js/examples/florence2-webgpu/index.html", "repo_id": "transformers.js", "token_count": 130 }
323
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
transformers.js/examples/next-server/postcss.config.js/0
{ "file_path": "transformers.js/examples/next-server/postcss.config.js", "repo_id": "transformers.js", "token_count": 38 }
324
// Adapted from https://github.com/xenova/transformers.js/blob/c367f9d68b809bbbf81049c808bf6d219d761d23/src/utils/hub.js#L330 export async function getCachedFile(url) { let cache; try { cache = await caches.open('semantic-audio-search'); const cachedResponse = await cache.match(url); if...
transformers.js/examples/semantic-audio-search/utils.js/0
{ "file_path": "transformers.js/examples/semantic-audio-search/utils.js", "repo_id": "transformers.js", "token_count": 502 }
325
html, body { font-family: Arial, Helvetica, sans-serif; } .container { margin: 40px auto; width: max(50vw, 400px); display: flex; flex-direction: column; align-items: center; } .custom-file-upload { display: flex; align-items: center; cursor: pointer; gap: 10px; border: 2p...
transformers.js/examples/vanilla-js/style.css/0
{ "file_path": "transformers.js/examples/vanilla-js/style.css", "repo_id": "transformers.js", "token_count": 389 }
326
* { box-sizing: border-box; padding: 0; margin: 0; font-family: sans-serif; } html, body { height: 100%; } body { padding: 16px 32px; } body, #container { display: flex; flex-direction: column; justify-content: center; align-items: center; } #controls { display: flex; padding: 1rem; gap: 1...
transformers.js/examples/webgpu-clip/style.css/0
{ "file_path": "transformers.js/examples/webgpu-clip/style.css", "repo_id": "transformers.js", "token_count": 510 }
327
import './style.css'; import { AutoModel, AutoProcessor, RawImage } from '@xenova/transformers'; async function hasFp16() { try { const adapter = await navigator.gpu.requestAdapter() return adapter.features.has('shader-f16') } catch (e) { return false } } // Reference the elements...
transformers.js/examples/webgpu-video-depth-estimation/main.js/0
{ "file_path": "transformers.js/examples/webgpu-video-depth-estimation/main.js", "repo_id": "transformers.js", "token_count": 1857 }
328
import json from transformers.utils import cached_file def generate_tokenizer_json(model_path, tokenizer): # Marian models use two separate tokenizers for source and target languages. # So, we merge them into a single tokenizer. vocab_file = cached_file(model_path, 'vocab.json') with open(vocab_file)...
transformers.js/scripts/extra/marian.py/0
{ "file_path": "transformers.js/scripts/extra/marian.py", "repo_id": "transformers.js", "token_count": 1677 }
329
/** * @file Module used to configure Transformers.js. * * **Example:** Disable remote models. * ```javascript * import { env } from '@huggingface/transformers'; * env.allowRemoteModels = false; * ``` * * **Example:** Set local model path. * ```javascript * import { env } from '@huggingface/transformers'; ...
transformers.js/src/env.js/0
{ "file_path": "transformers.js/src/env.js", "repo_id": "transformers.js", "token_count": 2230 }
330
import { ImageProcessor, } from "../../base/image_processors_utils.js"; export class CLIPImageProcessor extends ImageProcessor { } export class CLIPFeatureExtractor extends CLIPImageProcessor { }
transformers.js/src/models/clip/image_processing_clip.js/0
{ "file_path": "transformers.js/src/models/clip/image_processing_clip.js", "repo_id": "transformers.js", "token_count": 60 }
331
import { Processor } from "../../base/processing_utils.js"; import { AutoImageProcessor } from "../auto/image_processing_auto.js"; import { AutoTokenizer } from "../../tokenizers.js"; import { center_to_corners_format } from "../../base/image_processors_utils.js"; /** * Get token ids of phrases from posmaps and input...
transformers.js/src/models/grounding_dino/processing_grounding_dino.js/0
{ "file_path": "transformers.js/src/models/grounding_dino/processing_grounding_dino.js", "repo_id": "transformers.js", "token_count": 1714 }
332
import { Processor } from "../../base/processing_utils.js"; import { AutoImageProcessor } from "../auto/image_processing_auto.js"; import { AutoTokenizer } from "../../tokenizers.js"; import { RawImage } from "../../utils/image.js"; export class Qwen2VLProcessor extends Processor { static image_processor_class = A...
transformers.js/src/models/qwen2_vl/processing_qwen2_vl.js/0
{ "file_path": "transformers.js/src/models/qwen2_vl/processing_qwen2_vl.js", "repo_id": "transformers.js", "token_count": 819 }
333
import { ImageProcessor, } from "../../base/image_processors_utils.js"; import { stack, cat, } from "../../utils/tensor.js"; export class VitMatteImageProcessor extends ImageProcessor { /** * Calls the feature extraction process on an array of images, preprocesses * each image, and concaten...
transformers.js/src/models/vitmatte/image_processing_vitmatte.js/0
{ "file_path": "transformers.js/src/models/vitmatte/image_processing_vitmatte.js", "repo_id": "transformers.js", "token_count": 746 }
334
/** * @file Helper module for audio processing. * * These functions and classes are only used internally, * meaning an end-user shouldn't need to access anything here. * * @module utils/audio */ import { getFile, } from './hub.js'; import { FFT, max } from './maths.js'; import { calculateReflectOffs...
transformers.js/src/utils/audio.js/0
{ "file_path": "transformers.js/src/utils/audio.js", "repo_id": "transformers.js", "token_count": 13124 }
335
import { init } from "./init.js"; import { collect_and_execute_tests } from "./test_utils.js"; init(); await collect_and_execute_tests("Image processors", "image_processing");
transformers.js/tests/image_processors.test.js/0
{ "file_path": "transformers.js/tests/image_processors.test.js", "repo_id": "transformers.js", "token_count": 55 }
336
import { GemmaTokenizer, GemmaForCausalLM } 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("GemmaForCausalLM", () => { const model_id = "Xenova/tiny-random-GemmaForC...
transformers.js/tests/models/gemma/test_modeling_gemma.js/0
{ "file_path": "transformers.js/tests/models/gemma/test_modeling_gemma.js", "repo_id": "transformers.js", "token_count": 806 }
337
import { Idefics3Processor, Idefics3ForConditionalGeneration, 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 conversation = [ { role: "user", con...
transformers.js/tests/models/idefics3/test_modeling_idefics3.js/0
{ "file_path": "transformers.js/tests/models/idefics3/test_modeling_idefics3.js", "repo_id": "transformers.js", "token_count": 2233 }
338
import { AutoFeatureExtractor, MoonshineFeatureExtractor } 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 () => { // MoonshineFeatureExtractor describe("Moonshin...
transformers.js/tests/models/moonshine/test_feature_extraction_moonshine.js/0
{ "file_path": "transformers.js/tests/models/moonshine/test_feature_extraction_moonshine.js", "repo_id": "transformers.js", "token_count": 465 }
339
import { AutoProcessor, Phi3VProcessor } 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 = "onnx-community/Phi-3.5-vision-instruct"; describe("Phi...
transformers.js/tests/models/phi3_v/test_processor_phi3_v.js/0
{ "file_path": "transformers.js/tests/models/phi3_v/test_processor_phi3_v.js", "repo_id": "transformers.js", "token_count": 1404 }
340
import { AutoImageProcessor, VitMatteImageProcessor } 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 () => { // VitMatteImageProcessor // - tests custom overrides // ...
transformers.js/tests/models/vitmatte/test_image_processing_vitmatte.js/0
{ "file_path": "transformers.js/tests/models/vitmatte/test_image_processing_vitmatte.js", "repo_id": "transformers.js", "token_count": 1213 }
341
import { pipeline, FeatureExtractionPipeline } 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 = "feature-extraction"; export default () => { describe("Feature Extraction", () => { cons...
transformers.js/tests/pipelines/test_pipelines_feature_extraction.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_feature_extraction.js", "repo_id": "transformers.js", "token_count": 2082 }
342
import { pipeline, ZeroShotClassificationPipeline } 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 = "zero-shot-classification"; export default () => { describe("Zero-shot Classification",...
transformers.js/tests/pipelines/test_pipelines_zero_shot.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_zero_shot.js", "repo_id": "transformers.js", "token_count": 1523 }
343
{ // Only include files in the src directory "include": ["src/**/*"], "compilerOptions": { // Tells the compiler to check JS files "checkJs": true, "target": "esnext", "module": "nodenext", "moduleResolution": "nodenext", "outDir": "types", "strict": false, "skipLibCheck": true, ...
transformers.js/tsconfig.json/0
{ "file_path": "transformers.js/tsconfig.json", "repo_id": "transformers.js", "token_count": 196 }
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 applicabl...
transformers/benchmark/benchmarks_entrypoint.py/0
{ "file_path": "transformers/benchmark/benchmarks_entrypoint.py", "repo_id": "transformers", "token_count": 8858 }
345
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": 667 }
346
# قوالب نماذج الدردشة ## مقدمة تعد **الدردشة** أحد استخدامات نماذج اللغات الكبيرة (LLMs) شائعة الاستخدام بشكل متزايد. ففي سياق الدردشة، وبدلاً من متابعة سلسلة نصية واحدة (كما هو الحال مع نماذج اللغات القياسية)، يواصل النموذج بدلاً من ذلك محادثة تتكون من رسالة واحدة أو أكثر، تتضمن كل منها دورًا، مثل "المستخدم" أو "الم...
transformers/docs/source/ar/chat_templating.md/0
{ "file_path": "transformers/docs/source/ar/chat_templating.md", "repo_id": "transformers", "token_count": 33667 }
347
# المحولات النمطية مكتبة `transformers` هي إطار عمل ذو فلسفة محدد؛ يتم تعريف فلسفتنا في [الدليل المفاهيمي](./philosophy). جوهر هذه الفلسفة يتمثل في مبدأ [نموذج واحد، ملف واحد](https://huggingface.co/blog/transformers-design-philosophy) في المكتبة. الجانب السلبي لهذا المكون هو تقييده لوراثة واستيراد مكونات الملفات. ن...
transformers/docs/source/ar/modular_transformers.md/0
{ "file_path": "transformers/docs/source/ar/modular_transformers.md", "repo_id": "transformers", "token_count": 6710 }
348
<!--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/masked_language_modeling.md/0
{ "file_path": "transformers/docs/source/ar/tasks/masked_language_modeling.md", "repo_id": "transformers", "token_count": 7314 }
349
<!--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/accelerate.md/0
{ "file_path": "transformers/docs/source/de/accelerate.md", "repo_id": "transformers", "token_count": 1929 }
350
<!--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_writing.md/0
{ "file_path": "transformers/docs/source/en/chat_templating_writing.md", "repo_id": "transformers", "token_count": 4015 }
351
<!--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/how_to_hack_models.md/0
{ "file_path": "transformers/docs/source/en/how_to_hack_models.md", "repo_id": "transformers", "token_count": 2758 }
352
# Jan: using the serving API as a local LLM provider This example shows how to use `transformers serve` as a local LLM provider for the [Jan](https://jan.ai/) app. Jan is a ChatGPT-alternative graphical interface, fully running on your machine. The requests to `transformers serve` come directly from the local app -- w...
transformers/docs/source/en/jan.md/0
{ "file_path": "transformers/docs/source/en/jan.md", "repo_id": "transformers", "token_count": 598 }
353
<!--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/optimizer_schedules.md/0
{ "file_path": "transformers/docs/source/en/main_classes/optimizer_schedules.md", "repo_id": "transformers", "token_count": 907 }
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/model_doc/aria.md/0
{ "file_path": "transformers/docs/source/en/model_doc/aria.md", "repo_id": "transformers", "token_count": 2104 }
355
<!--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/bigbird_pegasus.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bigbird_pegasus.md", "repo_id": "transformers", "token_count": 2491 }
356
<!--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/chameleon.md/0
{ "file_path": "transformers/docs/source/en/model_doc/chameleon.md", "repo_id": "transformers", "token_count": 2941 }
357
<!--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/dinov3.md/0
{ "file_path": "transformers/docs/source/en/model_doc/dinov3.md", "repo_id": "transformers", "token_count": 2230 }
358
<!--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/ernie.md/0
{ "file_path": "transformers/docs/source/en/model_doc/ernie.md", "repo_id": "transformers", "token_count": 2014 }
359
<!--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 ag...
transformers/docs/source/en/model_doc/flex_olmo.md/0
{ "file_path": "transformers/docs/source/en/model_doc/flex_olmo.md", "repo_id": "transformers", "token_count": 1627 }
360
<!--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 }
361
<!--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 }
362
<!--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": 1807 }
363
<!--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 }
364
<!--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 }
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/model_doc/mobilenet_v1.md/0
{ "file_path": "transformers/docs/source/en/model_doc/mobilenet_v1.md", "repo_id": "transformers", "token_count": 1665 }
366
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/nat.md/0
{ "file_path": "transformers/docs/source/en/model_doc/nat.md", "repo_id": "transformers", "token_count": 1417 }
367
<!--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/ovis2.md/0
{ "file_path": "transformers/docs/source/en/model_doc/ovis2.md", "repo_id": "transformers", "token_count": 1170 }
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/en/model_doc/phobert.md/0
{ "file_path": "transformers/docs/source/en/model_doc/phobert.md", "repo_id": "transformers", "token_count": 806 }
369
<!--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/qwen2_vl.md/0
{ "file_path": "transformers/docs/source/en/model_doc/qwen2_vl.md", "repo_id": "transformers", "token_count": 4426 }
370
<!--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/roberta.md/0
{ "file_path": "transformers/docs/source/en/model_doc/roberta.md", "repo_id": "transformers", "token_count": 1407 }
371
<!--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/trajectory_transformer.md/0
{ "file_path": "transformers/docs/source/en/model_doc/trajectory_transformer.md", "repo_id": "transformers", "token_count": 872 }
372
<!--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/vilt.md/0
{ "file_path": "transformers/docs/source/en/model_doc/vilt.md", "repo_id": "transformers", "token_count": 1350 }
373
<!--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/xlsr_wav2vec2.md/0
{ "file_path": "transformers/docs/source/en/model_doc/xlsr_wav2vec2.md", "repo_id": "transformers", "token_count": 909 }
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 to...
transformers/docs/source/en/peft.md/0
{ "file_path": "transformers/docs/source/en/peft.md", "repo_id": "transformers", "token_count": 1948 }
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 agreed...
transformers/docs/source/en/pipeline_webserver.md/0
{ "file_path": "transformers/docs/source/en/pipeline_webserver.md", "repo_id": "transformers", "token_count": 2087 }
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/quantization/higgs.md/0
{ "file_path": "transformers/docs/source/en/quantization/higgs.md", "repo_id": "transformers", "token_count": 1201 }
377
<!--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/asr.md/0
{ "file_path": "transformers/docs/source/en/tasks/asr.md", "repo_id": "transformers", "token_count": 4877 }
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/tasks/multiple_choice.md/0
{ "file_path": "transformers/docs/source/en/tasks/multiple_choice.md", "repo_id": "transformers", "token_count": 2848 }
379
<!--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/testing.md/0
{ "file_path": "transformers/docs/source/en/testing.md", "repo_id": "transformers", "token_count": 13462 }
380
<!--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/bertology.md/0
{ "file_path": "transformers/docs/source/es/bertology.md", "repo_id": "transformers", "token_count": 764 }
381
<!--Copyright 2020 de The HuggingFace Team. Todos los derechos reservados Con licencia bajo la Licencia Apache, Versión 2.0 (la "Licencia"); No puedes usar este archivo excepto de conformidad con la Licencia. Puedes obtener una copia de la Licencia en http://www.apache.org/licenses/LICENSE-2.0 Al menos que sea requr...
transformers/docs/source/es/philosophy.md/0
{ "file_path": "transformers/docs/source/es/philosophy.md", "repo_id": "transformers", "token_count": 1964 }
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/es/tasks/question_answering.md/0
{ "file_path": "transformers/docs/source/es/tasks/question_answering.md", "repo_id": "transformers", "token_count": 3137 }
383
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/it/preprocessing.md/0
{ "file_path": "transformers/docs/source/it/preprocessing.md", "repo_id": "transformers", "token_count": 9562 }
384
<!--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/fast_tokenizers.md/0
{ "file_path": "transformers/docs/source/ja/fast_tokenizers.md", "repo_id": "transformers", "token_count": 1187 }
385
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ja/main_classes/callback.md/0
{ "file_path": "transformers/docs/source/ja/main_classes/callback.md", "repo_id": "transformers", "token_count": 2359 }
386
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ja/main_classes/trainer.md/0
{ "file_path": "transformers/docs/source/ja/main_classes/trainer.md", "repo_id": "transformers", "token_count": 19579 }
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/ja/model_doc/big_bird.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/big_bird.md", "repo_id": "transformers", "token_count": 2478 }
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 agreed...
transformers/docs/source/ja/model_doc/clap.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/clap.md", "repo_id": "transformers", "token_count": 1774 }
389
<!--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/deberta.md/0
{ "file_path": "transformers/docs/source/ja/model_doc/deberta.md", "repo_id": "transformers", "token_count": 3392 }
390
<!--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_infer_cpu.md/0
{ "file_path": "transformers/docs/source/ja/perf_infer_cpu.md", "repo_id": "transformers", "token_count": 1977 }
391
<!--- 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/ja/pr_checks.md/0
{ "file_path": "transformers/docs/source/ja/pr_checks.md", "repo_id": "transformers", "token_count": 5982 }
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/ja/tasks/monocular_depth_estimation.md/0
{ "file_path": "transformers/docs/source/ja/tasks/monocular_depth_estimation.md", "repo_id": "transformers", "token_count": 2264 }
393
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/ja/tokenizer_summary.md/0
{ "file_path": "transformers/docs/source/ja/tokenizer_summary.md", "repo_id": "transformers", "token_count": 9818 }
394
<!--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/debugging.md/0
{ "file_path": "transformers/docs/source/ko/debugging.md", "repo_id": "transformers", "token_count": 9860 }
395
<!--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/internal/generation_utils.md/0
{ "file_path": "transformers/docs/source/ko/internal/generation_utils.md", "repo_id": "transformers", "token_count": 3553 }
396
<!--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/onnx.md/0
{ "file_path": "transformers/docs/source/ko/main_classes/onnx.md", "repo_id": "transformers", "token_count": 1115 }
397
<!--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/bartpho.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/bartpho.md", "repo_id": "transformers", "token_count": 2261 }
398
<!--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/ko/model_doc/deepseek_v3.md/0
{ "file_path": "transformers/docs/source/ko/model_doc/deepseek_v3.md", "repo_id": "transformers", "token_count": 9073 }
399