text stringlengths 5 424k | id stringlengths 13 178 | metadata dict | __index_level_0__ int64 0 672 |
|---|---|---|---|
.sidebar {
background-color: #181818;
color: #CCCCCC;
}
body{
background-color: #1F1F1F;
color: white;
}
.progress-container {
position: relative;
font-size: 16px;
color: white;
/* background-color: #e9ecef; */
border-radius: 8px;
text-align: left;
overflow: hidden;
}
.progress-bar {
padding:... | transformers.js/examples/code-completion/src/App.css/0 | {
"file_path": "transformers.js/examples/code-completion/src/App.css",
"repo_id": "transformers.js",
"token_count": 208
} | 359 |
import { useState, useRef, useEffect, useCallback } from 'react'
import './App.css'
const PLACEHOLDER_TEXTS = [
"'To Kill a Mockingbird' is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
"The novel 'Moby-... | transformers.js/examples/cross-encoder/src/App.jsx/0 | {
"file_path": "transformers.js/examples/cross-encoder/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 2232
} | 360 |
# Transformers.js - Sample browser extension
An example project to show how to run 🤗 Transformers in a browser extension. Although we only provide instructions for running in Chrome, it should be similar for other browsers.
## Getting Started
1. Clone the repo and enter the project directory:
```bash
git cl... | transformers.js/examples/extension/README.md/0 | {
"file_path": "transformers.js/examples/extension/README.md",
"repo_id": "transformers.js",
"token_count": 624
} | 361 |
import { useEffect, useState, useRef } from 'react';
import { AutoTokenizer, MusicgenForConditionalGeneration, BaseStreamer } from '@xenova/transformers';
import { encodeWAV, share } from './utils.js';
import './App.css';
const MODEL_ID = 'Xenova/musicgen-small';
// Adapted from https://huggingface.co/spaces/faceboo... | transformers.js/examples/musicgen-web/src/App.jsx/0 | {
"file_path": "transformers.js/examples/musicgen-web/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 3165
} | 362 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js - Sample react application</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>... | transformers.js/examples/react-translator/index.html/0 | {
"file_path": "transformers.js/examples/react-translator/index.html",
"repo_id": "transformers.js",
"token_count": 133
} | 363 |
{
"extends": "next/core-web-vitals"
}
| transformers.js/examples/semantic-image-search-client/.eslintrc.json/0 | {
"file_path": "transformers.js/examples/semantic-image-search-client/.eslintrc.json",
"repo_id": "transformers.js",
"token_count": 20
} | 364 |
'use client'
import { useState, useEffect, useCallback, useRef } from 'react'
import { Modal } from './components/Modal';
import { SearchBar } from './components/SearchBar';
import { ImageGrid } from './components/ImageGrid';
export default function Home() {
// Application state
const [ready, setReady] = useStat... | transformers.js/examples/semantic-image-search-client/src/app/page.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search-client/src/app/page.js",
"repo_id": "transformers.js",
"token_count": 772
} | 365 |
// Helper script to update the database with image embeddings
import { AutoProcessor, RawImage, CLIPVisionModelWithProjection } from '@xenova/transformers';
import { createClient } from '@supabase/supabase-js'
if (!process.env.SUPABASE_SECRET_KEY) {
throw new Error('Missing `SUPABASE_SECRET_KEY` environment varia... | transformers.js/examples/semantic-image-search/scripts/update-database.mjs/0 | {
"file_path": "transformers.js/examples/semantic-image-search/scripts/update-database.mjs",
"repo_id": "transformers.js",
"token_count": 778
} | 366 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js | Real-time object detection</title>
</head>
<body>
<h1>
Real-time object detection w/
<a href="https://github.com/huggingface/transformers.j... | transformers.js/examples/video-object-detection/index.html/0 | {
"file_path": "transformers.js/examples/video-object-detection/index.html",
"repo_id": "transformers.js",
"token_count": 608
} | 367 |
function formatBytes(size) {
const i = size == 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024));
return +((size / Math.pow(1024, i)).toFixed(2)) * 1 + ['B', 'kB', 'MB', 'GB', 'TB'][i];
}
export default function Progress({ text, percentage, total }) {
percentage ??= 0;
return (
<div className... | transformers.js/examples/webgpu-chat/src/components/Progress.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-chat/src/components/Progress.jsx",
"repo_id": "transformers.js",
"token_count": 290
} | 368 |
* {
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-video-depth-estimation/style.css/0 | {
"file_path": "transformers.js/examples/webgpu-video-depth-estimation/style.css",
"repo_id": "transformers.js",
"token_count": 372
} | 369 |
export default function CrossIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
stro... | transformers.js/examples/webgpu-vlm/src/components/icons/CrossIcon.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-vlm/src/components/icons/CrossIcon.jsx",
"repo_id": "transformers.js",
"token_count": 304
} | 370 |
import { useEffect, useState, useRef, useCallback } from 'react';
import Progress from './components/Progress';
import MediaInput from './components/MediaInput';
import Transcript from './components/Transcript';
import LanguageSelector from './components/LanguageSelector';
async function hasWebGPU() {
if (!navigat... | transformers.js/examples/whisper-word-timestamps/src/App.jsx/0 | {
"file_path": "transformers.js/examples/whisper-word-timestamps/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 3492
} | 371 |
# Support exporting vision and text models separately:
# Adapted from https://github.com/huggingface/optimum/issues/1186#issuecomment-1637641760
from optimum.exporters.onnx.model_configs import SiglipTextOnnxConfig, ViTOnnxConfig
from typing import Dict
class SiglipVisionOnnxConfig(ViTOnnxConfig):
pass
class S... | transformers.js/scripts/extra/siglip.py/0 | {
"file_path": "transformers.js/scripts/extra/siglip.py",
"repo_id": "transformers.js",
"token_count": 496
} | 372 |
/**
* @module generation/logits_process
*/
import { Callable } from "../utils/generic.js";
import { Tensor } from "../utils/tensor.js";
import { max, log_softmax } from "../utils/maths.js";
/**
* Abstract base class for all logit processors that can be applied during generation.
*/
export class LogitsProcessor ... | transformers.js/src/generation/logits_process.js/0 | {
"file_path": "transformers.js/src/generation/logits_process.js",
"repo_id": "transformers.js",
"token_count": 11828
} | 373 |
import { EncodecFeatureExtractor } from '../encodec/feature_extraction_encodec.js';
export class DacFeatureExtractor extends EncodecFeatureExtractor { }
| transformers.js/src/models/dac/feature_extraction_dac.js/0 | {
"file_path": "transformers.js/src/models/dac/feature_extraction_dac.js",
"repo_id": "transformers.js",
"token_count": 46
} | 374 |
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";
import { count } from "../../utils/core.js";
/**
* Prompt with expanded image tokens... | transformers.js/src/models/idefics3/processing_idefics3.js/0 | {
"file_path": "transformers.js/src/models/idefics3/processing_idefics3.js",
"repo_id": "transformers.js",
"token_count": 2081
} | 375 |
import { FeatureExtractor, validate_audio_inputs } from '../../base/feature_extraction_utils.js';
import { Tensor } from '../../utils/tensor.js';
export class MoonshineFeatureExtractor extends FeatureExtractor {
/**
* Asynchronously extracts input values from a given audio using the provided configuration.
... | transformers.js/src/models/moonshine/feature_extraction_moonshine.js/0 | {
"file_path": "transformers.js/src/models/moonshine/feature_extraction_moonshine.js",
"repo_id": "transformers.js",
"token_count": 364
} | 376 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
import { calculateDimensions } from "../../utils/core.js";
import {
interpolate_4d,
Tensor,
} from "../../utils/tensor.js";
/**
* @typedef {object} SamImageProcessorResult
* @property {Tensor} pixel_values
* @property {import("..... | transformers.js/src/models/sam/image_processing_sam.js/0 | {
"file_path": "transformers.js/src/models/sam/image_processing_sam.js",
"repo_id": "transformers.js",
"token_count": 4498
} | 377 |
import { AutoFeatureExtractor } from "../auto/feature_extraction_auto.js"
import { AutoTokenizer } from "../../tokenizers.js"
import { Processor } from "../../base/processing_utils.js"
import { cat } from "../../utils/tensor.js";
const AUDIO_TOKEN = "[AUDIO]";
const BEGIN_AUDIO_TOKEN = "[BEGIN_AUDIO]";
const NUM_AUDIO... | transformers.js/src/models/voxtral/processing_voxtral.js/0 | {
"file_path": "transformers.js/src/models/voxtral/processing_voxtral.js",
"repo_id": "transformers.js",
"token_count": 1488
} | 378 |
/**
* @file Core utility functions/classes for Transformers.js.
*
* These are only used internally, meaning an end-user shouldn't
* need to access anything here.
*
* @module utils/core
*/
/**
* @typedef {Object} InitiateProgressInfo
* @property {'initiate'} status
* @property {string} name The model id or d... | transformers.js/src/utils/core.js/0 | {
"file_path": "transformers.js/src/utils/core.js",
"repo_id": "transformers.js",
"token_count": 2392
} | 379 |
/*
* Test that models loaded outside of the `pipeline` function work correctly (e.g., `AutoModel.from_pretrained(...)`);
*/
import { AutoTokenizer, AutoProcessor, BertForMaskedLM, GPT2LMHeadModel, T5ForConditionalGeneration, BertTokenizer, GPT2Tokenizer, T5Tokenizer, LlamaTokenizer, LlamaForCausalLM, WhisperForCondi... | transformers.js/tests/models.test.js/0 | {
"file_path": "transformers.js/tests/models.test.js",
"repo_id": "transformers.js",
"token_count": 1642
} | 380 |
import { CohereTokenizer, CohereModel, CohereForCausalLM } 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("CohereModel", () => {
const model_id = "hf-internal-testin... | transformers.js/tests/models/cohere/test_modeling_cohere.js/0 | {
"file_path": "transformers.js/tests/models/cohere/test_modeling_cohere.js",
"repo_id": "transformers.js",
"token_count": 1323
} | 381 |
import { GemmaTokenizer, Gemma2ForCausalLM } 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("Gemma2ForCausalLM", () => {
const model_id = "hf-internal-testing/tiny-r... | transformers.js/tests/models/gemma2/test_modeling_gemma2.js/0 | {
"file_path": "transformers.js/tests/models/gemma2/test_modeling_gemma2.js",
"repo_id": "transformers.js",
"token_count": 796
} | 382 |
import { AutoProcessor, VLChatProcessor } from "../../../src/transformers.js";
import { MAX_PROCESSOR_LOAD_TIME, MAX_TEST_EXECUTION_TIME } from "../../init.js";
export default () => {
describe("VLChatProcessor", () => {
const model_id = "onnx-community/Janus-1.3B-ONNX";
/** @type {VLChatProcessor} */
l... | transformers.js/tests/models/janus/test_processor_janus.js/0 | {
"file_path": "transformers.js/tests/models/janus/test_processor_janus.js",
"repo_id": "transformers.js",
"token_count": 849
} | 383 |
import { MPNetTokenizer } from "../../../src/tokenizers.js";
import { BASE_TEST_STRINGS } from "../test_strings.js";
export const TOKENIZER_CLASS = MPNetTokenizer;
export const TEST_CONFIG = {
"Xenova/all-mpnet-base-v2": {
SIMPLE: {
text: BASE_TEST_STRINGS.SIMPLE,
tokens: ["how", "are", "you", "doing... | transformers.js/tests/models/mpnet/test_tokenization_mpnet.js/0 | {
"file_path": "transformers.js/tests/models/mpnet/test_tokenization_mpnet.js",
"repo_id": "transformers.js",
"token_count": 3834
} | 384 |
import { VitsTokenizer } from "../../../src/tokenizers.js";
import { BASE_TEST_STRINGS, VITS_TEST_STRINGS } from "../test_strings.js";
export const TOKENIZER_CLASS = VitsTokenizer;
export const TEST_CONFIG = {
"Xenova/mms-tts-eng": {
SIMPLE: {
text: BASE_TEST_STRINGS.SIMPLE,
tokens: ["k", "h", "k", "... | transformers.js/tests/models/vits/test_tokenization_vits.js/0 | {
"file_path": "transformers.js/tests/models/vits/test_tokenization_vits.js",
"repo_id": "transformers.js",
"token_count": 2597
} | 385 |
import { pipeline, ImageClassificationPipeline } from "../../src/transformers.js";
import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js";
import { load_cached_image } from "../asset_cache.js";
const PIPELINE_ID = "image-classification";
export defaul... | transformers.js/tests/pipelines/test_pipelines_image_classification.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_image_classification.js",
"repo_id": "transformers.js",
"token_count": 1283
} | 386 |
import { pipeline, ZeroShotImageClassificationPipeline } from "../../src/transformers.js";
import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js";
import { load_cached_image } from "../asset_cache.js";
const PIPELINE_ID = "zero-shot-image-classificatio... | transformers.js/tests/pipelines/test_pipelines_zero_shot_image_classification.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_zero_shot_image_classification.js",
"repo_id": "transformers.js",
"token_count": 1549
} | 387 |
# Troubleshooting
This is a document explaining how to deal with various issues on Circle-CI. The entries may include actual solutions or pointers to Issues that cover those.
## Circle CI
* pytest worker runs out of resident RAM and gets killed by `cgroups`: https://github.com/huggingface/transformers/issues/11408
| transformers/.circleci/TROUBLESHOOT.md/0 | {
"file_path": "transformers/.circleci/TROUBLESHOOT.md",
"repo_id": "transformers",
"token_count": 80
} | 388 |
cff-version: "1.2.0"
date-released: 2020-10
message: "If you use this software, please cite it using these metadata."
title: "Transformers: State-of-the-Art Natural Language Processing"
url: "https://github.com/huggingface/transformers"
authors:
- family-names: Wolf
given-names: Thomas
- family-names: Debut
... | transformers/CITATION.cff/0 | {
"file_path": "transformers/CITATION.cff",
"repo_id": "transformers",
"token_count": 824
} | 389 |
apiVersion: 1
providers:
- name: 'Transformers Benchmarks'
orgId: 1
type: file
updateIntervalSeconds: 10
allowUiUpdates: true
options:
path: /etc/grafana/dashboards
| transformers/benchmark/default.yml/0 | {
"file_path": "transformers/benchmark/default.yml",
"repo_id": "transformers",
"token_count": 81
} | 390 |
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
ARG REF=main
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git cmake wget xz-utils build-essential g++5 libprotobuf-dev protobuf-compiler git-lfs curl
ENV UV_PYTHON=/usr/local/bin/python
RUN pip --no-cache-dir install uv && uv pip i... | transformers/docker/custom-tokenizers.dockerfile/0 | {
"file_path": "transformers/docker/custom-tokenizers.dockerfile",
"repo_id": "transformers",
"token_count": 734
} | 391 |
local base = import 'templates/base.libsonnet';
local tpus = import 'templates/tpus.libsonnet';
local utils = import "templates/utils.libsonnet";
local volumes = import "templates/volumes.libsonnet";
local bertBaseCased = base.BaseTest {
frameworkPrefix: "hf",
modelName: "bert-base-cased",
mode: "example",
con... | transformers/docker/transformers-pytorch-tpu/bert-base-cased.jsonnet/0 | {
"file_path": "transformers/docker/transformers-pytorch-tpu/bert-base-cased.jsonnet",
"repo_id": "transformers",
"token_count": 371
} | 392 |
# الدردشة مع المحوّلات
إذا كنت تقرأ هذه المقالة، فمن المؤكد أنك على علم بـ **نماذج الدردشة**. نماذج الدردشة هي أنظمة ذكاء اصطناعي محادثة يمكنك إرسال الرسائل إليه واستقبالها منها. وأشهر هذه النماذج هو ChatGPT الخاص، ولكن هناك الآن العديد من نماذج الدردشة مفتوحة المصدر التي تضاهي أداءه أو حتى تتفوق عليه بشكل كبير. هذه ... | transformers/docs/source/ar/conversations.md/0 | {
"file_path": "transformers/docs/source/ar/conversations.md",
"repo_id": "transformers",
"token_count": 13282
} | 393 |
<!--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/ar/tasks/question_answering.md/0 | {
"file_path": "transformers/docs/source/ar/tasks/question_answering.md",
"repo_id": "transformers",
"token_count": 6706
} | 394 |
<!--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/de/add_new_pipeline.md/0 | {
"file_path": "transformers/docs/source/de/add_new_pipeline.md",
"repo_id": "transformers",
"token_count": 4535
} | 395 |
# Optimizing inference
perf_infer_gpu_many: perf_infer_gpu_one
transformers_agents: agents
quantization: quantization/overview
| transformers/docs/source/en/_redirects.yml/0 | {
"file_path": "transformers/docs/source/en/_redirects.yml",
"repo_id": "transformers",
"token_count": 41
} | 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 ... | transformers/docs/source/en/contributing.md/0 | {
"file_path": "transformers/docs/source/en/contributing.md",
"repo_id": "transformers",
"token_count": 5134
} | 397 |
<!--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/image_processors.md/0 | {
"file_path": "transformers/docs/source/en/image_processors.md",
"repo_id": "transformers",
"token_count": 3596
} | 398 |
<!--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/llm_optims.md/0 | {
"file_path": "transformers/docs/source/en/llm_optims.md",
"repo_id": "transformers",
"token_count": 6721
} | 399 |
<!--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/main_classes/peft.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/peft.md",
"repo_id": "transformers",
"token_count": 355
} | 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/en/model_doc/auto.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/auto.md",
"repo_id": "transformers",
"token_count": 1795
} | 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/en/model_doc/bit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bit.md",
"repo_id": "transformers",
"token_count": 1129
} | 402 |
<!--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/clap.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/clap.md",
"repo_id": "transformers",
"token_count": 1064
} | 403 |
<!--Copyright 2022 The HuggingFace Team and The OpenBMB 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 app... | transformers/docs/source/en/model_doc/cpmant.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/cpmant.md",
"repo_id": "transformers",
"token_count": 625
} | 404 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/deformable_detr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/deformable_detr.md",
"repo_id": "transformers",
"token_count": 1410
} | 405 |
<!--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/dit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dit.md",
"repo_id": "transformers",
"token_count": 1184
} | 406 |
<!--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/ernie4_5_moe.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/ernie4_5_moe.md",
"repo_id": "transformers",
"token_count": 2079
} | 407 |
<!--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/fnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/fnet.md",
"repo_id": "transformers",
"token_count": 1243
} | 408 |
<!--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/levit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/levit.md",
"repo_id": "transformers",
"token_count": 1926
} | 409 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/luke.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/luke.md",
"repo_id": "transformers",
"token_count": 2616
} | 410 |
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/metaclip_2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/metaclip_2.md",
"repo_id": "transformers",
"token_count": 1535
} | 411 |
<!--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](http://www.apache.org/licenses/LICENSE-2.... | transformers/docs/source/en/model_doc/mobilevit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mobilevit.md",
"repo_id": "transformers",
"token_count": 1505
} | 412 |
<!--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/nezha.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nezha.md",
"repo_id": "transformers",
"token_count": 1092
} | 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/en/model_doc/owlvit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/owlvit.md",
"repo_id": "transformers",
"token_count": 2120
} | 414 |
<!--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/pixtral.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/pixtral.md",
"repo_id": "transformers",
"token_count": 2068
} | 415 |
<!--Copyright 2024 The Qwen Team 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 applic... | transformers/docs/source/en/model_doc/qwen3_moe.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/qwen3_moe.md",
"repo_id": "transformers",
"token_count": 531
} | 416 |
<!--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/roformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/roformer.md",
"repo_id": "transformers",
"token_count": 1340
} | 417 |
<!--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/siglip.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/siglip.md",
"repo_id": "transformers",
"token_count": 2346
} | 418 |
<!--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/swin2sr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/swin2sr.md",
"repo_id": "transformers",
"token_count": 1108
} | 419 |
<!--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/trocr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/trocr.md",
"repo_id": "transformers",
"token_count": 1833
} | 420 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/vision-encoder-decoder.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vision-encoder-decoder.md",
"repo_id": "transformers",
"token_count": 2289
} | 421 |
<!--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/wav2vec2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/wav2vec2.md",
"repo_id": "transformers",
"token_count": 3737
} | 422 |
<!--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/xmod.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/xmod.md",
"repo_id": "transformers",
"token_count": 1582
} | 423 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/perf_infer_cpu.md/0 | {
"file_path": "transformers/docs/source/en/perf_infer_cpu.md",
"repo_id": "transformers",
"token_count": 1252
} | 424 |
<!--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/processors.md/0 | {
"file_path": "transformers/docs/source/en/processors.md",
"repo_id": "transformers",
"token_count": 1687
} | 425 |
<!--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/quantization/mxfp4.md/0 | {
"file_path": "transformers/docs/source/en/quantization/mxfp4.md",
"repo_id": "transformers",
"token_count": 994
} | 426 |
<!--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/tasks/prompting.md/0 | {
"file_path": "transformers/docs/source/en/tasks/prompting.md",
"repo_id": "transformers",
"token_count": 3737
} | 427 |
<!--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/tokenizer_summary.md/0 | {
"file_path": "transformers/docs/source/en/tokenizer_summary.md",
"repo_id": "transformers",
"token_count": 4947
} | 428 |
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->
# Uso de un flujo de trabajo para un servidor web
<Tip>
Crear un motor de inferencia es un tema complejo, y la "mejor" solución probablemente depend... | transformers/docs/source/es/pipeline_webserver.md/0 | {
"file_path": "transformers/docs/source/es/pipeline_webserver.md",
"repo_id": "transformers",
"token_count": 2575
} | 429 |
- sections:
- local: pipeline_tutorial
title: पाइपलाइनों के साथ अनुमान चलाएँ
- local: accelerate
title: 🤗 Accelerate के साथ वितरित प्रशिक्षण सेट करें | transformers/docs/source/hi/_toctree.yml/0 | {
"file_path": "transformers/docs/source/hi/_toctree.yml",
"repo_id": "transformers",
"token_count": 135
} | 430 |
<!---
Copyright 2020 The HuggingFace Team. Tutti i diritti riservati.
Concesso in licenza in base alla Licenza Apache, Versione 2.0 (la "Licenza");
non è possibile utilizzare questo file se non in conformità con la Licenza.
È possibile ottenere una copia della Licenza all'indirizzo
http://www.apache.org/licenses/LICE... | transformers/docs/source/it/migration.md/0 | {
"file_path": "transformers/docs/source/it/migration.md",
"repo_id": "transformers",
"token_count": 5576
} | 431 |
<!--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/run_scripts.md/0 | {
"file_path": "transformers/docs/source/it/run_scripts.md",
"repo_id": "transformers",
"token_count": 6132
} | 432 |
<!--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/glossary.md/0 | {
"file_path": "transformers/docs/source/ja/glossary.md",
"repo_id": "transformers",
"token_count": 12796
} | 433 |
<!--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/align.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/align.md",
"repo_id": "transformers",
"token_count": 2912
} | 434 |
<!--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/biogpt.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/biogpt.md",
"repo_id": "transformers",
"token_count": 1982
} | 435 |
<!--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/clipseg.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/clipseg.md",
"repo_id": "transformers",
"token_count": 2203
} | 436 |
<!--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/deformable_detr.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/deformable_detr.md",
"repo_id": "transformers",
"token_count": 1794
} | 437 |
<!--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_gpu_one.md/0 | {
"file_path": "transformers/docs/source/ja/perf_infer_gpu_one.md",
"repo_id": "transformers",
"token_count": 9349
} | 438 |
<!--
Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... | transformers/docs/source/ja/quicktour.md/0 | {
"file_path": "transformers/docs/source/ja/quicktour.md",
"repo_id": "transformers",
"token_count": 11558
} | 439 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/object_detection.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/object_detection.md",
"repo_id": "transformers",
"token_count": 12694
} | 440 |
<!--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
} | 441 |
<!--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": 3290
} | 442 |
<!--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": 9944
} | 443 |
<!--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/encoder-decoder.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/encoder-decoder.md",
"repo_id": "transformers",
"token_count": 5150
} | 444 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/model_doc/mamba2.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/mamba2.md",
"repo_id": "transformers",
"token_count": 3570
} | 445 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/model_doc/timesformer.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/timesformer.md",
"repo_id": "transformers",
"token_count": 2137
} | 446 |
<!--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_infer_gpu_multi.md/0 | {
"file_path": "transformers/docs/source/ko/perf_infer_gpu_multi.md",
"repo_id": "transformers",
"token_count": 11472
} | 447 |
<!--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/quantization/gptq.md/0 | {
"file_path": "transformers/docs/source/ko/quantization/gptq.md",
"repo_id": "transformers",
"token_count": 4640
} | 448 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/knowledge_distillation_for_image_classification.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/knowledge_distillation_for_image_classification.md",
"repo_id": "transformers",
"token_count": 5193
} | 449 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/zero_shot_image_classification.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/zero_shot_image_classification.md",
"repo_id": "transformers",
"token_count": 3889
} | 450 |
<!---
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/pt/installation.md/0 | {
"file_path": "transformers/docs/source/pt/installation.md",
"repo_id": "transformers",
"token_count": 3770
} | 451 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/chat_templating.md/0 | {
"file_path": "transformers/docs/source/zh/chat_templating.md",
"repo_id": "transformers",
"token_count": 11132
} | 452 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/main_classes/output.md/0 | {
"file_path": "transformers/docs/source/zh/main_classes/output.md",
"repo_id": "transformers",
"token_count": 2202
} | 453 |
<!---
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | transformers/examples/legacy/benchmarking/README.md/0 | {
"file_path": "transformers/examples/legacy/benchmarking/README.md",
"repo_id": "transformers",
"token_count": 499
} | 454 |
#!/usr/bin/env python
import torch
from transformers import CamembertForMaskedLM, CamembertTokenizer
def fill_mask(masked_input, model, tokenizer, topk=5):
# Adapted from https://github.com/pytorch/fairseq/blob/master/fairseq/models/roberta/hub_interface.py
assert masked_input.count("<mask>") == 1
input_... | transformers/examples/legacy/run_camembert.py/0 | {
"file_path": "transformers/examples/legacy/run_camembert.py",
"repo_id": "transformers",
"token_count": 882
} | 455 |
# Copyright 2020 Huggingface
#
# 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 in writing, ... | transformers/examples/legacy/seq2seq/old_test_fsmt_bleu_score.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/old_test_fsmt_bleu_score.py",
"repo_id": "transformers",
"token_count": 982
} | 456 |
#!/usr/bin/env python
import json
import subprocess
pairs = [
["en", "ru"],
["ru", "en"],
["en", "de"],
["de", "en"],
]
n_objs = 8
def get_all_data(pairs, n_objs):
text = {}
for src, tgt in pairs:
pair = f"{src}-{tgt}"
cmd = f"sacrebleu -t wmt19 -l {pair} --echo src".split(... | transformers/examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/test_data/fsmt/build-eval-data.py",
"repo_id": "transformers",
"token_count": 405
} | 457 |
## Token classification
Based on the scripts [`run_ner.py`](https://github.com/huggingface/transformers/blob/main/examples/legacy/token-classification/run_ner.py).
The following examples are covered in this section:
* NER on the GermEval 2014 (German NER) dataset
* Emerging and Rare Entities task: WNUT’17 (English N... | transformers/examples/legacy/token-classification/README.md/0 | {
"file_path": "transformers/examples/legacy/token-classification/README.md",
"repo_id": "transformers",
"token_count": 4566
} | 458 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.