text stringlengths 5 409k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 572 |
|---|---|---|---|
import Image from 'next/image'
import { blurHashToDataURL } from '../utils.js'
export function ImageGrid({ images, setCurrentImage }) {
return (
<div className="columns-2 gap-4 sm:columns-3 xl:columns-4 2xl:columns-5">
{images && images.map(({
photo_id,
photo_url... | transformers.js/examples/semantic-image-search/src/app/components/ImageGrid.jsx/0 | {
"file_path": "transformers.js/examples/semantic-image-search/src/app/components/ImageGrid.jsx",
"repo_id": "transformers.js",
"token_count": 1339
} | 272 |
import React, { useState, useEffect, useRef } from 'react';
import AudioPlayer from './components/AudioPlayer';
import Progress from './components/Progress';
import { SPEAKERS, DEFAULT_SPEAKER } from './constants';
const App = () => {
// Model loading
const [ready, setReady] = useState(null);
const [disabled, ... | transformers.js/examples/text-to-speech-client/src/App.jsx/0 | {
"file_path": "transformers.js/examples/text-to-speech-client/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 2478
} | 273 |
import './style.css';
import { env, AutoModel, ones } from '@xenova/transformers';
import Chart from 'chart.js/auto';
// Throw an error if WebGPU is not supported
if (!navigator.gpu) {
const err = 'WebGPU is not supported by this browser.';
alert(err)
throw Error(err);
}
env.backends.onnx.wasm.wasmPaths = 'http... | transformers.js/examples/webgpu-embedding-benchmark/main.js/0 | {
"file_path": "transformers.js/examples/webgpu-embedding-benchmark/main.js",
"repo_id": "transformers.js",
"token_count": 3269
} | 274 |
export default function StopIcon(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"
strok... | transformers.js/examples/webgpu-vlm/src/components/icons/StopIcon.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-vlm/src/components/icons/StopIcon.jsx",
"repo_id": "transformers.js",
"token_count": 375
} | 275 |
import { useRef, useCallback, useEffect } from "react";
export function AudioVisualizer({ stream, ...props }) {
const canvasRef = useRef(null);
const visualize = useCallback((stream) => {
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
const source = audioContext... | transformers.js/examples/webgpu-whisper/src/components/AudioVisualizer.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-whisper/src/components/AudioVisualizer.jsx",
"repo_id": "transformers.js",
"token_count": 865
} | 276 |
import { useState, forwardRef, useRef, useImperativeHandle, useEffect, useCallback } from 'react';
const EXAMPLE_URL = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/whisper-timestamps-demo.mp4';
const MediaInput = forwardRef(({ onInputChange, onTimeUpdate, ...props }, ref) => {
// UI s... | transformers.js/examples/whisper-word-timestamps/src/components/MediaInput.jsx/0 | {
"file_path": "transformers.js/examples/whisper-word-timestamps/src/components/MediaInput.jsx",
"repo_id": "transformers.js",
"token_count": 3304
} | 277 |
def generate_tokenizer_json(tokenizer):
vocab = tokenizer.get_vocab()
normalizers = []
if tokenizer.normalize:
# Lowercase the input string
normalizers.append({
"type": "Lowercase",
})
if tokenizer.language == 'ron':
# Replace diacritics
normalize... | transformers.js/scripts/extra/vits.py/0 | {
"file_path": "transformers.js/scripts/extra/vits.py",
"repo_id": "transformers.js",
"token_count": 1431
} | 278 |
/**
* @module generation/streamers
*/
import { mergeArrays } from '../utils/core.js';
import { is_chinese_char } from '../tokenizers.js';
import { apis } from '../env.js';
export class BaseStreamer {
/**
* Function that is called by `.generate()` to push new tokens
* @param {bigint[][]} value
*... | transformers.js/src/generation/streamers.js/0 | {
"file_path": "transformers.js/src/generation/streamers.js",
"repo_id": "transformers.js",
"token_count": 3390
} | 279 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class EfficientNetImageProcessor extends ImageProcessor {
constructor(config) {
super(config);
// @ts-expect-error TS2339
this.include_top = this.config.include_top ?? true;
if (this.include_top) {
... | transformers.js/src/models/efficientnet/image_processing_efficientnet.js/0 | {
"file_path": "transformers.js/src/models/efficientnet/image_processing_efficientnet.js",
"repo_id": "transformers.js",
"token_count": 173
} | 280 |
import { Processor } from "../../base/processing_utils.js";
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
import { AutoTokenizer } from "../../tokenizers.js";
import { max, softmax } from "../../utils/maths.js";
const DECODE_TYPE_MAPPING = {
'char': ['char_decode', 1],
'bpe': ['bpe_dec... | transformers.js/src/models/mgp_str/processing_mgp_str.js/0 | {
"file_path": "transformers.js/src/models/mgp_str/processing_mgp_str.js",
"repo_id": "transformers.js",
"token_count": 2810
} | 281 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class PvtImageProcessor extends ImageProcessor { }
| transformers.js/src/models/pvt/image_processing_pvt.js/0 | {
"file_path": "transformers.js/src/models/pvt/image_processing_pvt.js",
"repo_id": "transformers.js",
"token_count": 44
} | 282 |
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
} | 283 |
export const GITHUB_ISSUE_URL = 'https://github.com/huggingface/transformers.js/issues/new/choose';
export const CONFIG_NAME = "config.json"
export const FEATURE_EXTRACTOR_NAME = "preprocessor_config.json"
export const IMAGE_PROCESSOR_NAME = FEATURE_EXTRACTOR_NAME
export const PROCESSOR_NAME = "processor_config.json"... | transformers.js/src/utils/constants.js/0 | {
"file_path": "transformers.js/src/utils/constants.js",
"repo_id": "transformers.js",
"token_count": 148
} | 284 |
/*
* Test that models loaded outside of the `pipeline` function work correctly (e.g., `AutoModel.from_pretrained(...)`);
*/
import { AutoTokenizer, AutoModel, BertModel, GPT2Model, T5ForConditionalGeneration, BertTokenizer, GPT2Tokenizer, T5Tokenizer } from "../src/transformers.js";
import { init, MAX_TEST_EXECUTION... | transformers.js/tests/models.test.js/0 | {
"file_path": "transformers.js/tests/models.test.js",
"repo_id": "transformers.js",
"token_count": 1211
} | 285 |
import { AutoImageProcessor, GLPNFeatureExtractor } 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 () => {
// GLPNFeatureExtractor
// - tests `size_divisor` and no size... | transformers.js/tests/models/glpn/test_image_processing_glpn.js/0 | {
"file_path": "transformers.js/tests/models/glpn/test_image_processing_glpn.js",
"repo_id": "transformers.js",
"token_count": 732
} | 286 |
import { AutoProcessor, JinaCLIPProcessor } 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 () => {
describe("JinaCLIPProcessor", () => {
const model_id = "jinaai/jina-... | transformers.js/tests/models/jina_clip/test_processor_jina_clip.js/0 | {
"file_path": "transformers.js/tests/models/jina_clip/test_processor_jina_clip.js",
"repo_id": "transformers.js",
"token_count": 863
} | 287 |
import { AutoImageProcessor, NougatImageProcessor } 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 () => {
// NougatImageProcessor
// - tests padding after normalizatio... | transformers.js/tests/models/nougat/test_image_processing_nougat.js/0 | {
"file_path": "transformers.js/tests/models/nougat/test_image_processing_nougat.js",
"repo_id": "transformers.js",
"token_count": 471
} | 288 |
import { WhisperTokenizer, WhisperForConditionalGeneration, full } 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("WhisperForConditionalGeneration", () => {
const mo... | transformers.js/tests/models/whisper/test_modeling_whisper.js/0 | {
"file_path": "transformers.js/tests/models/whisper/test_modeling_whisper.js",
"repo_id": "transformers.js",
"token_count": 2460
} | 289 |
import { pipeline, ObjectDetectionPipeline } 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 = "object-detection";
export default () => ... | transformers.js/tests/pipelines/test_pipelines_object_detection.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_object_detection.js",
"repo_id": "transformers.js",
"token_count": 2625
} | 290 |
import { PriorityQueue } from "../../src/utils/data-structures.js";
describe("Priority queue", () => {
const EXAMPLE_ARRAY = [2, 5, 3, 1, 4];
it("default (max heap)", () => {
const queue = new PriorityQueue();
queue.extend(EXAMPLE_ARRAY);
expect(queue.pop()).toBe(5);
});
it("min heap", () => {
... | transformers.js/tests/utils/data_structures.test.js/0 | {
"file_path": "transformers.js/tests/utils/data_structures.test.js",
"repo_id": "transformers.js",
"token_count": 433
} | 291 |
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
LABEL maintainer="Hugging Face"
LABEL repository="transformers"
RUN apt update && \
apt install -y bash \
build-essential \
git \
curl \
ca-certificates \
python3 \
... | transformers/docker/transformers-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 397
} | 292 |
# المعالجة المسبقة Preprocessing
[[open-in-colab]]
قبل تدريب نموذج على مجموعة بيانات، يجب معالجتها مسبقًا وفقًا تنسيق المتوقع لمدخلات النموذج. سواء كانت بياناتك نصية أو صورًا أو صوتًا، فيجب تحويلها وتجميعها في دفعات من الموترات. يوفر 🤗 Transformers مجموعة من فئات المعالجة المسبقة للمساعدة في إعداد بياناتك للنموذج. ... | transformers/docs/source/ar/preprocessing.md/0 | {
"file_path": "transformers/docs/source/ar/preprocessing.md",
"repo_id": "transformers",
"token_count": 15734
} | 293 |
# Tiktoken والتفاعل مع Transformers
يتم دمج دعم ملفات نموذج tiktoken بسلاسة في 🤗 transformers عند تحميل النماذج
`from_pretrained` مع ملف `tokenizer.model` tiktoken على Hub، والذي يتم تحويله تلقائيًا إلى [المحلل اللغوي السريع](https://huggingface.co/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrai... | transformers/docs/source/ar/tiktoken.md/0 | {
"file_path": "transformers/docs/source/ar/tiktoken.md",
"repo_id": "transformers",
"token_count": 1097
} | 294 |
<!--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/model_sharing.md/0 | {
"file_path": "transformers/docs/source/de/model_sharing.md",
"repo_id": "transformers",
"token_count": 4286
} | 295 |
<!--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/agents.md/0 | {
"file_path": "transformers/docs/source/en/agents.md",
"repo_id": "transformers",
"token_count": 5761
} | 296 |
<!--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/deepspeed.md/0 | {
"file_path": "transformers/docs/source/en/deepspeed.md",
"repo_id": "transformers",
"token_count": 18928
} | 297 |
<!--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/audio-spectrogram-transformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/audio-spectrogram-transformer.md",
"repo_id": "transformers",
"token_count": 2176
} | 298 |
<!--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": 1005
} | 299 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/clipseg.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/clipseg.md",
"repo_id": "transformers",
"token_count": 1222
} | 300 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/dinat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dinat.md",
"repo_id": "transformers",
"token_count": 1371
} | 301 |
<!--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/esm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/esm.md",
"repo_id": "transformers",
"token_count": 1906
} | 302 |
<!--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/llava_next_video.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/llava_next_video.md",
"repo_id": "transformers",
"token_count": 4090
} | 303 |
<!--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/mctct.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mctct.md",
"repo_id": "transformers",
"token_count": 928
} | 304 |
<!--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/modernbert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/modernbert.md",
"repo_id": "transformers",
"token_count": 1529
} | 305 |
<!--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/nougat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nougat.md",
"repo_id": "transformers",
"token_count": 1549
} | 306 |
<!--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/qwen2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/qwen2.md",
"repo_id": "transformers",
"token_count": 995
} | 307 |
<!--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": 1450
} | 308 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/speech_to_text_2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/speech_to_text_2.md",
"repo_id": "transformers",
"token_count": 1610
} | 309 |
<!--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/xlnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/xlnet.md",
"repo_id": "transformers",
"token_count": 2043
} | 310 |
<!--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 to... | transformers/docs/source/en/peft.md/0 | {
"file_path": "transformers/docs/source/en/peft.md",
"repo_id": "transformers",
"token_count": 2769
} | 311 |
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->
# Using pipelines for a webserver
<Tip>
Creating an inference engine is a complex topic, and the "best" solution
will most likely depend on your pr... | transformers/docs/source/en/pipeline_webserver.md/0 | {
"file_path": "transformers/docs/source/en/pipeline_webserver.md",
"repo_id": "transformers",
"token_count": 1775
} | 312 |
<!--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/quantization/overview.md/0 | {
"file_path": "transformers/docs/source/en/quantization/overview.md",
"repo_id": "transformers",
"token_count": 5406
} | 313 |
<!--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/image_feature_extraction.md/0 | {
"file_path": "transformers/docs/source/en/tasks/image_feature_extraction.md",
"repo_id": "transformers",
"token_count": 1562
} | 314 |
<!--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/text-to-speech.md/0 | {
"file_path": "transformers/docs/source/en/tasks/text-to-speech.md",
"repo_id": "transformers",
"token_count": 7299
} | 315 |
<!--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/glossary.md/0 | {
"file_path": "transformers/docs/source/es/glossary.md",
"repo_id": "transformers",
"token_count": 10085
} | 316 |
- sections:
- local: index
title: 🤗 Transformers
- local: quicktour
title: Visite rapide
- local: installation
title: Installation
title: Démarrer
- sections:
- local: tutoriel_pipeline
title: Pipelines pour l'inférence
- local: autoclass_tutorial
title: Chargement d'instances pré-entra... | transformers/docs/source/fr/_toctree.yml/0 | {
"file_path": "transformers/docs/source/fr/_toctree.yml",
"repo_id": "transformers",
"token_count": 391
} | 317 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/it/accelerate.md/0 | {
"file_path": "transformers/docs/source/it/accelerate.md",
"repo_id": "transformers",
"token_count": 1891
} | 318 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/it/perf_infer_cpu.md/0 | {
"file_path": "transformers/docs/source/it/perf_infer_cpu.md",
"repo_id": "transformers",
"token_count": 1497
} | 319 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/accelerate.md/0 | {
"file_path": "transformers/docs/source/ja/accelerate.md",
"repo_id": "transformers",
"token_count": 2185
} | 320 |
<!---
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/installation.md/0 | {
"file_path": "transformers/docs/source/ja/installation.md",
"repo_id": "transformers",
"token_count": 4805
} | 321 |
<!--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/altclip.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/altclip.md",
"repo_id": "transformers",
"token_count": 2400
} | 322 |
<!--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/bit.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bit.md",
"repo_id": "transformers",
"token_count": 1858
} | 323 |
<!--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/clvp.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/clvp.md",
"repo_id": "transformers",
"token_count": 2038
} | 324 |
<!--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/deit.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/deit.md",
"repo_id": "transformers",
"token_count": 3713
} | 325 |
<!--
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": 13067
} | 326 |
<!--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
} | 327 |
<!--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/main_classes/feature_extractor.md/0 | {
"file_path": "transformers/docs/source/ko/main_classes/feature_extractor.md",
"repo_id": "transformers",
"token_count": 779
} | 328 |
<!--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": 10657
} | 329 |
<!--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/gpt_neox_japanese.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/gpt_neox_japanese.md",
"repo_id": "transformers",
"token_count": 1909
} | 330 |
<!--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/swin2sr.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/swin2sr.md",
"repo_id": "transformers",
"token_count": 2502
} | 331 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/perf_infer_cpu.md/0 | {
"file_path": "transformers/docs/source/ko/perf_infer_cpu.md",
"repo_id": "transformers",
"token_count": 3075
} | 332 |
<!--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/eetq.md/0 | {
"file_path": "transformers/docs/source/ko/quantization/eetq.md",
"repo_id": "transformers",
"token_count": 1163
} | 333 |
<!--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": 5192
} | 334 |
<!--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
} | 335 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/pt/accelerate.md/0 | {
"file_path": "transformers/docs/source/pt/accelerate.md",
"repo_id": "transformers",
"token_count": 1904
} | 336 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/create_a_model.md/0 | {
"file_path": "transformers/docs/source/zh/create_a_model.md",
"repo_id": "transformers",
"token_count": 8520
} | 337 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/internal/tokenization_utils.md/0 | {
"file_path": "transformers/docs/source/zh/internal/tokenization_utils.md",
"repo_id": "transformers",
"token_count": 531
} | 338 |
<!--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/pipelines.md/0 | {
"file_path": "transformers/docs/source/zh/main_classes/pipelines.md",
"repo_id": "transformers",
"token_count": 6364
} | 339 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/pipeline_tutorial.md/0 | {
"file_path": "transformers/docs/source/zh/pipeline_tutorial.md",
"repo_id": "transformers",
"token_count": 7471
} | 340 |
<!---
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/examples/flax/speech-recognition/README.md/0 | {
"file_path": "transformers/examples/flax/speech-recognition/README.md",
"repo_id": "transformers",
"token_count": 1039
} | 341 |
<!---
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/README.md/0 | {
"file_path": "transformers/examples/legacy/README.md",
"repo_id": "transformers",
"token_count": 204
} | 342 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/examples/legacy/question-answering/run_squad_trainer.py/0 | {
"file_path": "transformers/examples/legacy/question-answering/run_squad_trainer.py",
"repo_id": "transformers",
"token_count": 2569
} | 343 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/examples/legacy/seq2seq/old_test_datasets.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/old_test_datasets.py",
"repo_id": "transformers",
"token_count": 5152
} | 344 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/examples/legacy/seq2seq/seq2seq_training_args.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/seq2seq_training_args.py",
"repo_id": "transformers",
"token_count": 888
} | 345 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/examples/legacy/seq2seq/xla_spawn.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/xla_spawn.py",
"repo_id": "transformers",
"token_count": 887
} | 346 |
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
# This file was automatically generated from examples/modular-transformers/modular_new_imgproc_model.py.
# Do NOT edit this file manually as any edits will be overwritten by the gene... | transformers/examples/modular-transformers/image_processing_new_imgproc_model.py/0 | {
"file_path": "transformers/examples/modular-transformers/image_processing_new_imgproc_model.py",
"repo_id": "transformers",
"token_count": 6679
} | 347 |
from transformers.models.llama.modeling_llama import LlamaModel
# Check that we can correctly change the prefix (here add Text part at the end of the name)
class Multimodal1TextModel(LlamaModel):
pass
| transformers/examples/modular-transformers/modular_multimodal1.py/0 | {
"file_path": "transformers/examples/modular-transformers/modular_multimodal1.py",
"repo_id": "transformers",
"token_count": 62
} | 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 ... | transformers/examples/pytorch/contrastive-image-text/README.md/0 | {
"file_path": "transformers/examples/pytorch/contrastive-image-text/README.md",
"repo_id": "transformers",
"token_count": 1268
} | 349 |
<!---
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/pytorch/language-modeling/README.md/0 | {
"file_path": "transformers/examples/pytorch/language-modeling/README.md",
"repo_id": "transformers",
"token_count": 3477
} | 350 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | transformers/examples/pytorch/object-detection/run_object_detection.py/0 | {
"file_path": "transformers/examples/pytorch/object-detection/run_object_detection.py",
"repo_id": "transformers",
"token_count": 8023
} | 351 |
# coding=utf-8
# Copyright 2022 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 r... | transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py/0 | {
"file_path": "transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py",
"repo_id": "transformers",
"token_count": 11268
} | 352 |
# coding=utf-8
# Copyright 2020 The Google AI Language Team Authors, The HuggingFace Inc. team and Microsoft Corporation.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py/0 | {
"file_path": "transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py",
"repo_id": "transformers",
"token_count": 12995
} | 353 |
# DeeBERT: Early Exiting for *BERT
This is the code base for the paper [DeeBERT: Dynamic Early Exiting for Accelerating BERT Inference](https://www.aclweb.org/anthology/2020.acl-main.204/), modified from its [original code base](https://github.com/castorini/deebert).
The original code base also has information for do... | transformers/examples/research_projects/deebert/README.md/0 | {
"file_path": "transformers/examples/research_projects/deebert/README.md",
"repo_id": "transformers",
"token_count": 621
} | 354 |
# coding=utf-8
# Copyright 2019-present, 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 a... | transformers/examples/research_projects/distillation/scripts/binarized_data.py/0 | {
"file_path": "transformers/examples/research_projects/distillation/scripts/binarized_data.py",
"repo_id": "transformers",
"token_count": 1429
} | 355 |
import torch
from transformers import AutoModel
class FSNERModel(torch.nn.Module):
"""
The FSNER model implements a few-shot named entity recognition method from the paper `Example-Based Named Entity Recognition <https://arxiv.org/abs/2008.10570>`__ by
Morteza Ziyadi, Yuting Sun, Abhishek Goswami, Jade H... | transformers/examples/research_projects/fsner/src/fsner/model.py/0 | {
"file_path": "transformers/examples/research_projects/fsner/src/fsner/model.py",
"repo_id": "transformers",
"token_count": 1436
} | 356 |
import os
from dataclasses import replace
import jax
import wandb
from bigbird_flax import Args, DataCollator, FlaxBigBirdForNaturalQuestions, Trainer, build_tx, train_step, val_step
from datasets import load_dataset
from flax import jax_utils
from transformers import BigBirdTokenizerFast
if __name__ == "__main__":... | transformers/examples/research_projects/jax-projects/big_bird/train.py/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/big_bird/train.py",
"repo_id": "transformers",
"token_count": 1164
} | 357 |
# Long Form Question Answering
Author: @yjernite
This folder contains the code for the Long Form Question answering [demo](http://35.226.96.115:8080/) as well as methods to train and use a fully end-to-end Long Form Question Answering system using the [🤗transformers](https://github.com/huggingface/transformers) and ... | transformers/examples/research_projects/longform-qa/README.md/0 | {
"file_path": "transformers/examples/research_projects/longform-qa/README.md",
"repo_id": "transformers",
"token_count": 208
} | 358 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | transformers/examples/research_projects/movement-pruning/masked_run_glue.py/0 | {
"file_path": "transformers/examples/research_projects/movement-pruning/masked_run_glue.py",
"repo_id": "transformers",
"token_count": 18298
} | 359 |
import itertools
import json
import linecache
import os
import pickle
import re
import socket
import string
from collections import Counter
from logging import getLogger
from pathlib import Path
from typing import Callable, Dict, Iterable, List
import git
import torch
from torch.utils.data import Dataset
from transfo... | transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py/0 | {
"file_path": "transformers/examples/research_projects/rag-end2end-retriever/utils_rag.py",
"repo_id": "transformers",
"token_count": 3495
} | 360 |
import json
import os
import shutil
import sys
import tempfile
import unittest
from unittest import TestCase
from unittest.mock import patch
import faiss
import numpy as np
from datasets import Dataset
from transformers import BartConfig, BartTokenizer, DPRConfig, DPRQuestionEncoderTokenizer, RagConfig
from transform... | transformers/examples/research_projects/rag/test_distributed_retriever.py/0 | {
"file_path": "transformers/examples/research_projects/rag/test_distributed_retriever.py",
"repo_id": "transformers",
"token_count": 6637
} | 361 |
# as due to their complexity multi-gpu tests could impact other tests, and to aid debug we have those in a separate module.
import os
import sys
from pathlib import Path
import torch
from transformers.testing_utils import TestCasePlus, execute_subprocess_async, require_torch_multi_gpu
from utils import load_json
C... | transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py/0 | {
"file_path": "transformers/examples/research_projects/seq2seq-distillation/_test_seq2seq_examples_multi_gpu.py",
"repo_id": "transformers",
"token_count": 2691
} | 362 |
<!-- back to top link -->
<a name="readme-top"></a>
<!-- ABOUT THE PROJECT -->
## What is token healing?
Token healing rectifies the token boundary bias in greedy tokenization. It does this by trimming and regrowing the prompt to better align with the model's tokenizer, thus enhancing generation quality. The improvem... | transformers/examples/research_projects/token-healing/README.md/0 | {
"file_path": "transformers/examples/research_projects/token-healing/README.md",
"repo_id": "transformers",
"token_count": 627
} | 363 |
# Fine-Tuning week of XLSR-Wav2Vec2 on 60 languages 🌍
Welcome to the fine-tuning week! The goal of this week is to have state-of-the-art automatic speech recognition (ASR) models in as many languages as possible. The fine-tuning week ends on Friday, the 26th March at midnight PST time.
Participants are encouraged to... | transformers/examples/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md",
"repo_id": "transformers",
"token_count": 9585
} | 364 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | transformers/examples/research_projects/wav2vec2/test_wav2vec2_deepspeed.py/0 | {
"file_path": "transformers/examples/research_projects/wav2vec2/test_wav2vec2_deepspeed.py",
"repo_id": "transformers",
"token_count": 2787
} | 365 |
# Training a masked language model end-to-end from scratch on TPUs
In this example, we're going to demonstrate how to train a TensorFlow model from 🤗 Transformers from scratch. If you're interested in some background theory on training Hugging Face models with TensorFlow on TPU, please check out our
[tutorial doc](h... | transformers/examples/tensorflow/language-modeling-tpu/README.md/0 | {
"file_path": "transformers/examples/tensorflow/language-modeling-tpu/README.md",
"repo_id": "transformers",
"token_count": 1947
} | 366 |
<!---
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 ... | transformers/examples/tensorflow/summarization/README.md/0 | {
"file_path": "transformers/examples/tensorflow/summarization/README.md",
"repo_id": "transformers",
"token_count": 415
} | 367 |
[tool.coverage.run]
source = ["transformers"]
omit = [
"*/convert_*",
"*/__main__.py"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise",
"except",
"register_parameter"
]
[tool.ruff]
line-length = 119
[tool.ruff.lint]
# Never enforce `E501` (line length violations).
ignore... | transformers/pyproject.toml/0 | {
"file_path": "transformers/pyproject.toml",
"repo_id": "transformers",
"token_count": 565
} | 368 |
# this is the process of uploading the updated models to s3. As I can't upload them directly to the correct orgs, this script shows how this is done
# 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 comp... | transformers/scripts/fsmt/s3-move.sh/0 | {
"file_path": "transformers/scripts/fsmt/s3-move.sh",
"repo_id": "transformers",
"token_count": 2133
} | 369 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | transformers/src/transformers/agents/image_question_answering.py/0 | {
"file_path": "transformers/src/transformers/agents/image_question_answering.py",
"repo_id": "transformers",
"token_count": 688
} | 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 applicabl... | transformers/src/transformers/commands/convert.py/0 | {
"file_path": "transformers/src/transformers/commands/convert.py",
"repo_id": "transformers",
"token_count": 3159
} | 371 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.