text stringlengths 5 409k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 572 |
|---|---|---|---|
{
"name": "code-completion",
"version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "code-completion",
"version": "0.0.0",
"dependencies": {
"@monaco-editor/react": "^4.5.1",
"@xenova/transformers": "^2.4.4",
"react": "^18.2.0",
... | transformers.js/examples/code-completion/package-lock.json/0 | {
"file_path": "transformers.js/examples/code-completion/package-lock.json",
"repo_id": "transformers.js",
"token_count": 69198
} | 278 |
// This file (model.js) contains all the logic for loading the model and running predictions.
class MyClassificationPipeline {
// NOTE: Replace this with your own task and model
static task = 'text-classification';
static model = 'Xenova/distilbert-base-uncased-finetuned-sst-2-english';
static instance... | transformers.js/examples/electron/src/model.js/0 | {
"file_path": "transformers.js/examples/electron/src/model.js",
"repo_id": "transformers.js",
"token_count": 366
} | 279 |
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| transformers.js/examples/next-client/postcss.config.js/0 | {
"file_path": "transformers.js/examples/next-client/postcss.config.js",
"repo_id": "transformers.js",
"token_count": 38
} | 280 |
{
"name": "esm",
"version": "1.0.0",
"description": "Server-side inference with Transformers.js (ESM)",
"type": "module",
"main": "app.js",
"keywords": [],
"author": "Xenova",
"license": "ISC",
"dependencies": {
"@xenova/transformers": "^2.0.0"
}
}
| transformers.js/examples/node/esm/package.json/0 | {
"file_path": "transformers.js/examples/node/esm/package.json",
"repo_id": "transformers.js",
"token_count": 116
} | 281 |
{
"name": "remove-background-client",
"version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "remove-background-client",
"version": "0.0.0",
"dependencies": {
"@xenova/transformers": "^2.15.0"
},
"devDependencies": {
"vite": "^... | transformers.js/examples/remove-background-client/package-lock.json/0 | {
"file_path": "transformers.js/examples/remove-background-client/package-lock.json",
"repo_id": "transformers.js",
"token_count": 31164
} | 282 |
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
* {
box-sizing: border-box;
padding: 0;
margin: 0;
font-family: 'Montserrat', sans-serif;
}
html {
background: radial-gradient(ellipse at center, #1b2735 0%, #090a0f 100%);
height: 100%;
width: 100%;
}
body {
overflow: h... | transformers.js/examples/semantic-audio-search/style.css/0 | {
"file_path": "transformers.js/examples/semantic-audio-search/style.css",
"repo_id": "transformers.js",
"token_count": 707
} | 283 |
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| transformers.js/examples/semantic-image-search/postcss.config.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search/postcss.config.js",
"repo_id": "transformers.js",
"token_count": 38
} | 284 |
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.6.0';
// Since we will download the model from the Hugging Face Hub, we can skip the local model check
env.allowLocalModels = false;
// Reference the elements that we will need
const status = document.getElementById('status');
const fi... | transformers.js/examples/vanilla-js/index.js/0 | {
"file_path": "transformers.js/examples/vanilla-js/index.js",
"repo_id": "transformers.js",
"token_count": 817
} | 285 |
<!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 depth estimation</title>
</head>
<body>
<h1>
Real-time depth estimation w/
<a href="https://huggingface.co/onnx-community/depth-a... | transformers.js/examples/webgpu-video-depth-estimation/index.html/0 | {
"file_path": "transformers.js/examples/webgpu-video-depth-estimation/index.html",
"repo_id": "transformers.js",
"token_count": 534
} | 286 |
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-vlm/src/components/Progress.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-vlm/src/components/Progress.jsx",
"repo_id": "transformers.js",
"token_count": 290
} | 287 |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Whisper Timestamped</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
| transformers.js/examples/whisper-word-timestamps/index.html/0 | {
"file_path": "transformers.js/examples/whisper-word-timestamps/index.html",
"repo_id": "transformers.js",
"token_count": 130
} | 288 |
from transformers.convert_slow_tokenizer import Converter
from tokenizers import Tokenizer, pre_tokenizers, processors
from tokenizers.models import WordPiece
class EsmConverter(Converter):
def converted(self) -> Tokenizer:
vocab = self.original_tokenizer.vocab
tokenizer = Tokenizer(WordPiece(voca... | transformers.js/scripts/extra/esm.py/0 | {
"file_path": "transformers.js/scripts/extra/esm.py",
"repo_id": "transformers.js",
"token_count": 1055
} | 289 |
/**
* @module generation/configuration_utils
*/
import { pick } from "../utils/core.js";
/**
* Class that holds a configuration for a generation task.
*/
export class GenerationConfig {
// Parameters that control the length of the output
/**
* The maximum length the generated tokens can have.
*... | transformers.js/src/generation/configuration_utils.js/0 | {
"file_path": "transformers.js/src/generation/configuration_utils.js",
"repo_id": "transformers.js",
"token_count": 4707
} | 290 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class ConvNextImageProcessor extends ImageProcessor {
constructor(config) {
super(config);
/**
* Percentage of the image to crop. Only has an effect if this.size < 384.
*/
// @ts-expect-er... | transformers.js/src/models/convnext/image_processing_convnext.js/0 | {
"file_path": "transformers.js/src/models/convnext/image_processing_convnext.js",
"repo_id": "transformers.js",
"token_count": 683
} | 291 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class JinaCLIPImageProcessor extends ImageProcessor {
constructor(config) {
// JinaCLIPImageProcessor uses a custom preprocessor_config.json, so we configure it here
const { resize_mode, fill_color, interpolation, si... | transformers.js/src/models/jina_clip/image_processing_jina_clip.js/0 | {
"file_path": "transformers.js/src/models/jina_clip/image_processing_jina_clip.js",
"repo_id": "transformers.js",
"token_count": 382
} | 292 |
import { Processor } from "../../base/processing_utils.js";
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
import { AutoTokenizer } from "../../tokenizers.js";
export class OwlViTProcessor extends Processor {
static tokenizer_class = AutoTokenizer
static image_processor_class = AutoImage... | transformers.js/src/models/owlvit/processing_owlvit.js/0 | {
"file_path": "transformers.js/src/models/owlvit/processing_owlvit.js",
"repo_id": "transformers.js",
"token_count": 95
} | 293 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class SiglipImageProcessor extends ImageProcessor { }
| transformers.js/src/models/siglip/image_processing_siglip.js/0 | {
"file_path": "transformers.js/src/models/siglip/image_processing_siglip.js",
"repo_id": "transformers.js",
"token_count": 44
} | 294 |
import { createInferenceSession, isONNXProxy } from "../backends/onnx.js";
import { Tensor } from "../utils/tensor.js";
import { apis } from "../env.js";
const IS_WEB_ENV = apis.IS_BROWSER_ENV || apis.IS_WEBWORKER_ENV;
/**
* Asynchronously creates a wrapper function for running an ONNX inference session.
*
* @param... | transformers.js/src/ops/registry.js/0 | {
"file_path": "transformers.js/src/ops/registry.js",
"repo_id": "transformers.js",
"token_count": 3856
} | 295 |
import { spawnSync } from "child_process";
const MODULE_NAME = "@huggingface/transformers";
const CODE_BODY = `
const model_id = "hf-internal-testing/tiny-random-LlamaForCausalLM";
const generator = await pipeline("text-generation", model_id, { dtype: "fp32" });
const result = await generator("hello", { max_new_token... | transformers.js/tests/bundles.test.js/0 | {
"file_path": "transformers.js/tests/bundles.test.js",
"repo_id": "transformers.js",
"token_count": 494
} | 296 |
import { AutoImageProcessor, CLIPFeatureExtractor } 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 () => {
// CLIPFeatureExtractor
// - tests center crop (do_center_cro... | transformers.js/tests/models/clip/test_image_processing_clip.js/0 | {
"file_path": "transformers.js/tests/models/clip/test_image_processing_clip.js",
"repo_id": "transformers.js",
"token_count": 464
} | 297 |
import { AutoImageProcessor, Idefics3ImageProcessor } 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 () => {
// Idefics3ImageProcessor
// - custom image processing (patc... | transformers.js/tests/models/idefics3/test_image_processing_idefics3.js/0 | {
"file_path": "transformers.js/tests/models/idefics3/test_image_processing_idefics3.js",
"repo_id": "transformers.js",
"token_count": 1918
} | 298 |
import { Wav2Vec2Processor, MoonshineForConditionalGeneration, full, ones } 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("MoonshineForConditionalGeneration", () => {
... | transformers.js/tests/models/moonshine/test_modeling_moonshine.js/0 | {
"file_path": "transformers.js/tests/models/moonshine/test_modeling_moonshine.js",
"repo_id": "transformers.js",
"token_count": 724
} | 299 |
import { AutoProcessor, AutoModelForAudioFrameClassification } from "../../../src/transformers.js";
import { MAX_TEST_EXECUTION_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js";
import { compare } from "../../test_utils.js";
export default () => {
const models_to_test = ["onnx-community/pyannote-segmentation-3.0"... | transformers.js/tests/models/pyannote/test_modeling_pyannote.js/0 | {
"file_path": "transformers.js/tests/models/pyannote/test_modeling_pyannote.js",
"repo_id": "transformers.js",
"token_count": 1018
} | 300 |
import { AutoImageProcessor, rand, Tensor, VitPoseImageProcessor } 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("VitPoseImageProcessor", () => {
con... | transformers.js/tests/models/vitpose/test_image_processing_vitpose.js/0 | {
"file_path": "transformers.js/tests/models/vitpose/test_image_processing_vitpose.js",
"repo_id": "transformers.js",
"token_count": 725
} | 301 |
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
} | 302 |
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
} | 303 |
# 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
} | 304 |
CREATE TABLE IF NOT EXISTS benchmarks (
benchmark_id SERIAL PRIMARY KEY,
branch VARCHAR(255),
commit_id VARCHAR(72),
commit_message VARCHAR(70),
metadata jsonb,
created_at timestamp without time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
);
CREATE INDEX IF NOT EXISTS benchmarks_benchmark_... | transformers/benchmark/init_db.sql/0 | {
"file_path": "transformers/benchmark/init_db.sql",
"repo_id": "transformers",
"token_count": 391
} | 305 |
FROM python:3.9-slim
ENV PYTHONDONTWRITEBYTECODE=1
ARG REF=main
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git g++ cmake pkg-config openssh-client git
ENV UV_PYTHON=/usr/local/bin/python
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptoo... | transformers/docker/torch-jax-light.dockerfile/0 | {
"file_path": "transformers/docker/torch-jax-light.dockerfile",
"repo_id": "transformers",
"token_count": 335
} | 306 |
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive
# Use login shell to read variables from `~/.profile` (to pass dynamic created variables between RUN commands)
SHELL ["sh", "-lc"]
# The following `ARG` are mainly used to specify the versions explicit... | transformers/docker/transformers-quantization-latest-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-quantization-latest-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 1258
} | 307 |
# ุจูุงุก ูู
ุงุฐุฌ ู
ุฎุตุตุฉ
ุชู
ุชุตู
ูู
ู
ูุชุจุฉ ๐ค Transformers ูุชููู ูุงุจูุฉ ููุชูุณูุน ุจุณูููุฉ. ูู ูู
ูุฐุฌ ู
ูุดููุฑ ุจุงููุงู
ู ูู ู
ุฌูุฏ ูุฑุนู ู
ุนูู ุจุงูู
ุณุชูุฏุนุ ุฏูู ุฃู ุชุฌุฑูุฏุ ูุฐูู ูู
ููู ุจุณูููุฉ ูุณุฎ ู
ูู ุงููู
ุฐุฌุฉ ูุชุนุฏููู ููููุง ูุงุญุชูุงุฌุงุชู.
ุฅุฐุง ููุช ุชููุดุฆ ูู
ูุฐุฌูุง ุฌุฏูุฏูุง ุชู
ุงู
ูุงุ ููุฏ ูููู ู
ู ุงูุฃุณูู ุงูุจุฏุก ู
ู ุงูุตูุฑ. ูู ูุฐุง ุงูุจุฑูุงู
ุฌ ุงูุชุนููู
ูุ ุณููุฑููู ููููุฉ ู... | transformers/docs/source/ar/custom_models.md/0 | {
"file_path": "transformers/docs/source/ar/custom_models.md",
"repo_id": "transformers",
"token_count": 10048
} | 308 |
# ุชุญู
ูู ุงูู
ุญูููุงุช ุจุงุณุชุฎุฏุงู
๐ค PEFT
[[open-in-colab]]
ุชูููุฉ "ุงูุชุฏุฑูุจ ุงูุฏููู ุฐู ุงูููุงุกุฉ ุงูุจุงุฑุงู
ุชูุฑูุฉ" (PEFT)](https://huggingface.co/blog/peft) ุชููู
ุจุชุฌู
ูุฏ ู
ุนูู
ุงุช ุงููู
ูุฐุฌ ุงูู
ูุฏุฑุจ ู
ุณุจููุง ุฃุซูุงุก ุงูุถุจุท ุงูุฏููู ูุชุถูู ุนุฏุฏ ุตุบูุฑ ู
ู ุงูู
ุนูู
ุงุช ุงููุงุจูุฉ ููุชุฏุฑูุจ (ุงูู
ุญููุงุช) ูููู. ูุชู
ุชุฏุฑูุจ ุงูู
ุญูููุงุช ูุชุนูู
ู
ุนููู
ุงุช ุฎุงุตุฉ ุจุงูู
ูุงู
. ููุฏ ุซุจุช... | transformers/docs/source/ar/peft.md/0 | {
"file_path": "transformers/docs/source/ar/peft.md",
"repo_id": "transformers",
"token_count": 5151
} | 309 |
<!--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/autoclass_tutorial.md/0 | {
"file_path": "transformers/docs/source/de/autoclass_tutorial.md",
"repo_id": "transformers",
"token_count": 2644
} | 310 |
# 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
} | 311 |
<!---
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": 5146
} | 312 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/data_collator.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/data_collator.md",
"repo_id": "transformers",
"token_count": 741
} | 313 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/trainer.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/trainer.md",
"repo_id": "transformers",
"token_count": 689
} | 314 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/bert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bert.md",
"repo_id": "transformers",
"token_count": 6475
} | 315 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/canine.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/canine.md",
"repo_id": "transformers",
"token_count": 1723
} | 316 |
<!--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/cpm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/cpm.md",
"repo_id": "transformers",
"token_count": 735
} | 317 |
<!--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/depth_pro.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/depth_pro.md",
"repo_id": "transformers",
"token_count": 3471
} | 318 |
<!--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/fsmt.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/fsmt.md",
"repo_id": "transformers",
"token_count": 739
} | 319 |
<!--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/gptsan-japanese.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/gptsan-japanese.md",
"repo_id": "transformers",
"token_count": 1750
} | 320 |
<!--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/llama.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/llama.md",
"repo_id": "transformers",
"token_count": 2384
} | 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/en/model_doc/markuplm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/markuplm.md",
"repo_id": "transformers",
"token_count": 3443
} | 322 |
<!--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/mobilebert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mobilebert.md",
"repo_id": "transformers",
"token_count": 1548
} | 323 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/nat.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/nat.md",
"repo_id": "transformers",
"token_count": 1320
} | 324 |
<!--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": 1993
} | 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 agreed... | transformers/docs/source/en/model_doc/pop2piano.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/pop2piano.md",
"repo_id": "transformers",
"token_count": 2624
} | 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/en/model_doc/resnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/resnet.md",
"repo_id": "transformers",
"token_count": 1253
} | 327 |
<!--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": 3075
} | 328 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/vit_hybrid.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/vit_hybrid.md",
"repo_id": "transformers",
"token_count": 2002
} | 329 |
<!--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/xlm-prophetnet.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/xlm-prophetnet.md",
"repo_id": "transformers",
"token_count": 1218
} | 330 |
<!--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/perf_train_tpu_tf.md/0 | {
"file_path": "transformers/docs/source/en/perf_train_tpu_tf.md",
"repo_id": "transformers",
"token_count": 3708
} | 331 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/quantization/finegrained_fp8.md/0 | {
"file_path": "transformers/docs/source/en/quantization/finegrained_fp8.md",
"repo_id": "transformers",
"token_count": 903
} | 332 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/tasks/audio_classification.md/0 | {
"file_path": "transformers/docs/source/en/tasks/audio_classification.md",
"repo_id": "transformers",
"token_count": 4036
} | 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/en/tasks/prompting.md/0 | {
"file_path": "transformers/docs/source/en/tasks/prompting.md",
"repo_id": "transformers",
"token_count": 5582
} | 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/en/tflite.md/0 | {
"file_path": "transformers/docs/source/en/tflite.md",
"repo_id": "transformers",
"token_count": 878
} | 335 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/es/converting_tensorflow_models.md/0 | {
"file_path": "transformers/docs/source/es/converting_tensorflow_models.md",
"repo_id": "transformers",
"token_count": 2424
} | 336 |
<!--โ ๏ธ 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
} | 337 |
<!--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/hi/accelerate.md/0 | {
"file_path": "transformers/docs/source/hi/accelerate.md",
"repo_id": "transformers",
"token_count": 3992
} | 338 |
<!---
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/it/installation.md/0 | {
"file_path": "transformers/docs/source/it/installation.md",
"repo_id": "transformers",
"token_count": 3586
} | 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/it/quicktour.md/0 | {
"file_path": "transformers/docs/source/it/quicktour.md",
"repo_id": "transformers",
"token_count": 6489
} | 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 agreed... | transformers/docs/source/ja/fast_tokenizers.md/0 | {
"file_path": "transformers/docs/source/ja/fast_tokenizers.md",
"repo_id": "transformers",
"token_count": 1187
} | 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 agreed... | transformers/docs/source/ja/model_doc/bert.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/bert.md",
"repo_id": "transformers",
"token_count": 6595
} | 342 |
<!--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/canine.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/canine.md",
"repo_id": "transformers",
"token_count": 3007
} | 343 |
<!--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/data2vec.md/0 | {
"file_path": "transformers/docs/source/ja/model_doc/data2vec.md",
"repo_id": "transformers",
"token_count": 3072
} | 344 |
<!--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/ja/peft.md/0 | {
"file_path": "transformers/docs/source/ja/peft.md",
"repo_id": "transformers",
"token_count": 3664
} | 345 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/knowledge_distillation_for_image_classification.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/knowledge_distillation_for_image_classification.md",
"repo_id": "transformers",
"token_count": 3678
} | 346 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ja/tasks/zero_shot_image_classification.md/0 | {
"file_path": "transformers/docs/source/ja/tasks/zero_shot_image_classification.md",
"repo_id": "transformers",
"token_count": 2709
} | 347 |
<!--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/attention.md/0 | {
"file_path": "transformers/docs/source/ko/attention.md",
"repo_id": "transformers",
"token_count": 3070
} | 348 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/hpo_train.md/0 | {
"file_path": "transformers/docs/source/ko/hpo_train.md",
"repo_id": "transformers",
"token_count": 3520
} | 349 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/main_classes/agent.md/0 | {
"file_path": "transformers/docs/source/ko/main_classes/agent.md",
"repo_id": "transformers",
"token_count": 2949
} | 350 |
<!--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/model_doc/autoformer.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/autoformer.md",
"repo_id": "transformers",
"token_count": 2603
} | 351 |
<!--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/deberta.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/deberta.md",
"repo_id": "transformers",
"token_count": 4741
} | 352 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/model_doc/paligemma.md/0 | {
"file_path": "transformers/docs/source/ko/model_doc/paligemma.md",
"repo_id": "transformers",
"token_count": 2814
} | 353 |
# ๋ชจ๋์ ํธ๋์คํฌ๋จธ [[modular-transformers]]
`transformers`๋ opinionated(์๊ธฐ ์๊ฒฌ์ด ๊ฐํ) ํ๋ ์์ํฌ์ด๋ฉฐ, ์ฐ๋ฆฌ์ ์ฒ ํ์ ๋ค์์ [๊ฐ๋
๊ฐ์ด๋](./philosophy)์ ์ ์๋์ด ์์ต๋๋ค.
์ด ์ฒ ํ์ ํต์ฌ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ [๋จ์ผ ๋ชจ๋ธ, ๋จ์ผ ํ์ผ](https://huggingface.co/blog/transformers-design-philosophy) ์ธก๋ฉด์์ ์ ๋ํ๋ฉ๋๋ค. ์ด ๊ตฌ์ฑ ์์์ ๋จ์ ์ ํ์ผ ๊ฐ์ ๊ตฌ์ฑ ์์์ ์์๊ณผ ์ํฌํธ ๊ฐ๋ฅ์ฑ์ ์ ํํ๋ค๋ ๊ฒ์
๋๋ค.
๊ทธ ๊ฒฐ๊ณผ, ๋ชจ๋ธ ๊ตฌ์ฑ ์์๊ฐ ์ฌ๋ฌ ํ์ผ์ ๊ฑธ์ณ ๋ฐ๋ณต... | transformers/docs/source/ko/modular_transformers.md/0 | {
"file_path": "transformers/docs/source/ko/modular_transformers.md",
"repo_id": "transformers",
"token_count": 5200
} | 354 |
<!--โ ๏ธ 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>
์ถ๋ก ์์ง์ ๋ง๋๋ ๊ฒ์ ๋ณต์กํ ์ฃผ์ ์ด๋ฉฐ, "์ต์ ์" ์๋ฃจ์
์ ๋ฌธ์ ๊ณต๊ฐ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง ๊ฐ๋ฅ์ฑ์ด ๋์ต๋๋ค. CPU ๋๋ GPU๋ฅผ ์ฌ์ฉํ๋์ง์ ๋ฐ๋ผ ๋ค๋ฅด๊ณ ... | transformers/docs/source/ko/pipeline_webserver.md/0 | {
"file_path": "transformers/docs/source/ko/pipeline_webserver.md",
"repo_id": "transformers",
"token_count": 6178
} | 355 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/ko/tasks/idefics.md/0 | {
"file_path": "transformers/docs/source/ko/tasks/idefics.md",
"repo_id": "transformers",
"token_count": 13254
} | 356 |
<!---
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/ko/troubleshooting.md/0 | {
"file_path": "transformers/docs/source/ko/troubleshooting.md",
"repo_id": "transformers",
"token_count": 6571
} | 357 |
<!--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/pt/serialization.md/0 | {
"file_path": "transformers/docs/source/pt/serialization.md",
"repo_id": "transformers",
"token_count": 7144
} | 358 |
<!--็ๆ2020ๅนดHuggingFaceๅข้ไฟ็ๆๆๆๅฉใ
ๆ นๆฎApache่ฎธๅฏ่ฏ็ฌฌ2.0็๏ผโ่ฎธๅฏ่ฏโ๏ผ่ฎธๅฏ๏ผ้ค้็ฌฆๅ่ฎธๅฏ่ฏ๏ผๅฆๅๆจไธๅพไฝฟ็จๆญคๆไปถใๆจๅฏไปฅๅจไปฅไธ็ฝๅ่ทๅ่ฎธๅฏ่ฏ็ๅฏๆฌ๏ผ
http://www.apache.org/licenses/LICENSE-2.0
้ค้้็จๆณๅพ่ฆๆฑๆไนฆ้ขๅๆ๏ผๅฆๅๆโๆๅๆ ทโๅๅ็่ฝฏไปถ๏ผๆ ่ฎบๆฏๆ็คบ่ฟๆฏๆ็คบ็๏ผ้ฝๆฒกๆไปปไฝๆ
ไฟๆๆกไปถใ่ฏทๅ้
่ฎธๅฏ่ฏไปฅไบ่งฃ็นๅฎ่ฏญ่จไธ็ๆ้ๅ้ๅถใ
โ ๏ธ ่ฏทๆณจๆ๏ผๆฌๆไปถ่ฝ็ถไฝฟ็จMarkdown็ผๅ๏ผไฝๅ
ๅซไบ็นๅฎ็่ฏญๆณ๏ผ้็จไบๆไปฌ็doc-builder๏ผ็ฑปไผผไบMDX๏ผ๏ผๅฏ่ฝๆ ๆณๅจๆจ็Markdownๆฅ็ๅจไธญๆญฃๅธธๆธฒๆใ
-->
# ๅบไบBERT่ฟ่ก็็ธๅ
ณ็ ... | transformers/docs/source/zh/bertology.md/0 | {
"file_path": "transformers/docs/source/zh/bertology.md",
"repo_id": "transformers",
"token_count": 1340
} | 359 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/internal/generation_utils.md/0 | {
"file_path": "transformers/docs/source/zh/internal/generation_utils.md",
"repo_id": "transformers",
"token_count": 3447
} | 360 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/main_classes/logging.md/0 | {
"file_path": "transformers/docs/source/zh/main_classes/logging.md",
"repo_id": "transformers",
"token_count": 2154
} | 361 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/zh/perf_torch_compile.md/0 | {
"file_path": "transformers/docs/source/zh/perf_torch_compile.md",
"repo_id": "transformers",
"token_count": 6785
} | 362 |
<!--
Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... | transformers/docs/source/zh/torchscript.md/0 | {
"file_path": "transformers/docs/source/zh/torchscript.md",
"repo_id": "transformers",
"token_count": 4763
} | 363 |
#!/usr/bin/env python3
import json
from typing import Iterator, List, Union
from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers
from tokenizers.implementations.base_tokenizer import BaseTokenizer
from tokenizers.models import Unigram
from tokenizers.processors import Te... | transformers/examples/flax/language-modeling/t5_tokenizer_model.py/0 | {
"file_path": "transformers/examples/flax/language-modeling/t5_tokenizer_model.py",
"repo_id": "transformers",
"token_count": 1823
} | 364 |
import argparse
import glob
import logging
import os
from argparse import Namespace
from importlib import import_module
import numpy as np
import torch
from lightning_base import BaseTransformer, add_generic_args, generic_train
from seqeval.metrics import accuracy_score, f1_score, precision_score, recall_score
from to... | transformers/examples/legacy/pytorch-lightning/run_ner.py/0 | {
"file_path": "transformers/examples/legacy/pytorch-lightning/run_ner.py",
"repo_id": "transformers",
"token_count": 4295
} | 365 |
#!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | transformers/examples/legacy/seq2seq/run_eval_search.py/0 | {
"file_path": "transformers/examples/legacy/seq2seq/run_eval_search.py",
"repo_id": "transformers",
"token_count": 2316
} | 366 |
# ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ
# This file was automatically generated from examples/modular-transformers/modular_my_new_model.py.
# Do NOT edit this file manually as any edits will be overwritten by the generatio... | transformers/examples/modular-transformers/configuration_my_new_model.py/0 | {
"file_path": "transformers/examples/modular-transformers/configuration_my_new_model.py",
"repo_id": "transformers",
"token_count": 4977
} | 367 |
# ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ๐จ
# This file was automatically generated from examples/modular-transformers/modular_switch_function.py.
# Do NOT edit this file manually as any edits will be overwritten by the genera... | transformers/examples/modular-transformers/modeling_switch_function.py/0 | {
"file_path": "transformers/examples/modular-transformers/modeling_switch_function.py",
"repo_id": "transformers",
"token_count": 3528
} | 368 |
#!/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/LI... | transformers/examples/pytorch/image-pretraining/run_mim_no_trainer.py/0 | {
"file_path": "transformers/examples/pytorch/image-pretraining/run_mim_no_trainer.py",
"repo_id": "transformers",
"token_count": 12859
} | 369 |
# coding=utf-8
# 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 require... | transformers/examples/pytorch/question-answering/trainer_seq2seq_qa.py/0 | {
"file_path": "transformers/examples/pytorch/question-answering/trainer_seq2seq_qa.py",
"repo_id": "transformers",
"token_count": 3071
} | 370 |
#!/usr/bin/env python
# coding=utf-8
# 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... | transformers/examples/pytorch/summarization/run_summarization.py/0 | {
"file_path": "transformers/examples/pytorch/summarization/run_summarization.py",
"repo_id": "transformers",
"token_count": 13637
} | 371 |
# Patience-based Early Exit
Patience-based Early Exit (PABEE) is a plug-and-play inference method for pretrained language models.
We have already implemented it on BERT and ALBERT. Basically, you can make your LM faster and more robust with PABEE. It can even improve the performance of ALBERT on GLUE. The only sacrifi... | transformers/examples/research_projects/bert-loses-patience/README.md/0 | {
"file_path": "transformers/examples/research_projects/bert-loses-patience/README.md",
"repo_id": "transformers",
"token_count": 1329
} | 372 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | transformers/examples/research_projects/distillation/distiller.py/0 | {
"file_path": "transformers/examples/research_projects/distillation/distiller.py",
"repo_id": "transformers",
"token_count": 12492
} | 373 |
<p align="center"> <img src="http://sayef.tech:8082/uploads/FSNER-LOGO-2.png" alt="FSNER LOGO"> </p>
<p align="center">
Implemented by <a href="https://huggingface.co/sayef"> sayef </a>.
</p>
## Overview
The FSNER model was proposed in [Example-Based Named Entity Recognition](https://arxiv.org/abs/2008.10570) by ... | transformers/examples/research_projects/fsner/README.md/0 | {
"file_path": "transformers/examples/research_projects/fsner/README.md",
"repo_id": "transformers",
"token_count": 1174
} | 374 |
import json
import os
from dataclasses import dataclass
from functools import partial
from typing import Callable
import flax.linen as nn
import jax
import jax.numpy as jnp
import joblib
import optax
import wandb
from flax import jax_utils, struct, traverse_util
from flax.serialization import from_bytes, to_bytes
from... | transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/big_bird/bigbird_flax.py",
"repo_id": "transformers",
"token_count": 5480
} | 375 |
# Wav2Vec2 Contrastive Loss PreTraining examples
The following example showcases how to pretrain a wav2vec2 model using the JAX/Flax backend.
Pretraining Wav2Vec2 is rather complex, so it is highly recommended to read the
[official paper](https://arxiv.org/abs/2006.11477).
JAX/Flax allows you to trace pure functions... | transformers/examples/research_projects/jax-projects/wav2vec2/README.md/0 | {
"file_path": "transformers/examples/research_projects/jax-projects/wav2vec2/README.md",
"repo_id": "transformers",
"token_count": 1507
} | 376 |
# 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/emmental/configuration_bert_masked.py/0 | {
"file_path": "transformers/examples/research_projects/movement-pruning/emmental/configuration_bert_masked.py",
"repo_id": "transformers",
"token_count": 995
} | 377 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.