text stringlengths 5 409k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 572 |
|---|---|---|---|
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 13,
"logprob": -2.0507812,
"special": false,
"text": "\n"
},
{
"id": 13,
"logprob": -2... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_marlin/test_flash_llama_marlin.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_marlin/test_flash_llama_marlin.json",
"repo_id": "text-generation-inference",
"token_count": 864
} | 227 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 1,
"logprob": null,
"text": "<s>"
},
{
"id": 4911,
"logprob": -6.9765625,
"text": "User"
},
{
"id": 29... | text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics.json",
"repo_id": "text-generation-inference",
"token_count": 2062
} | 228 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 2502,
"logprob": null,
"text": " red"
},
{
"id": 13,
"logprob": -2.734375,
"text": ","
},
{
"id": 8862... | text-generation-inference/integration-tests/models/__snapshots__/test_mamba/test_mamba_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_mamba/test_mamba_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 1157
} | 229 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "eos_token",
"generated_tokens": 8,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 330,
"logprob": -0.118652344,
"special": false,
"text": " A"
},
{
"id": 11426,
"logp... | text-generation-inference/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json",
"repo_id": "text-generation-inference",
"token_count": 722
} | 230 |
import pytest
@pytest.fixture(scope="module")
def flash_llama_chat_handle(launcher):
with launcher(
"TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=2, disable_grammar_support=False
) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_llama_chat(flash_llama_chat_handle):
... | text-generation-inference/integration-tests/models/test_chat_llama.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_chat_llama.py",
"repo_id": "text-generation-inference",
"token_count": 594
} | 231 |
import pytest
import json
from text_generation.types import GrammarType
@pytest.fixture(scope="module")
def flash_llama_grammar_handle(launcher):
with launcher(
"TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=2, disable_grammar_support=False
) as handle:
yield handle
@pytest.fixture(scope="... | text-generation-inference/integration-tests/models/test_flash_grammar_llama.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_grammar_llama.py",
"repo_id": "text-generation-inference",
"token_count": 2366
} | 232 |
import pytest
@pytest.fixture(scope="module")
def flash_neox_sharded_handle(launcher):
with launcher("OpenAssistant/oasst-sft-1-pythia-12b", num_shard=2) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_neox_sharded(flash_neox_sharded_handle):
await flash_neox_sharded_handle.h... | text-generation-inference/integration-tests/models/test_flash_neox_sharded.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_neox_sharded.py",
"repo_id": "text-generation-inference",
"token_count": 507
} | 233 |
import pytest
@pytest.fixture(scope="module")
def flash_idefics2_next_handle(launcher):
with launcher(
"HuggingFaceM4/idefics2-8b",
) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_idefics2_next(flash_idefics2_next_handle):
await flash_idefics2_next_handle.health... | text-generation-inference/integration-tests/models/test_idefics2.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_idefics2.py",
"repo_id": "text-generation-inference",
"token_count": 1159
} | 234 |
[project]
name = "text-generation-integration-tests"
version = "2.0.1"
description = "Text Generation Inference integration tests"
authors = ["Nicolas Patry <nicolas@huggingface.co>"]
requires-python = ">=3.10,<3.13"
dependencies = [
"pydantic>2,< 3",
"syrupy>=4.8.0",
"text-generation>=0.6.0",
"pytest>... | text-generation-inference/integration-tests/pyproject.toml/0 | {
"file_path": "text-generation-inference/integration-tests/pyproject.toml",
"repo_id": "text-generation-inference",
"token_count": 200
} | 235 |
import json
import datasets
import tqdm
def main():
dataset = datasets.load_dataset("Open-Orca/OpenOrca", split="train")
# Select only the first 2k conversations that start with a human.
max = min(2000, len(dataset))
conversations = []
for item in tqdm.tqdm(dataset, total=max):
conversatio... | text-generation-inference/load_tests/orca.py/0 | {
"file_path": "text-generation-inference/load_tests/orca.py",
"repo_id": "text-generation-inference",
"token_count": 313
} | 236 |
// pub(crate) mod v2;
mod chat_template;
pub mod tool_grammar;
use crate::validation::{ValidGenerateRequest, Validation, ValidationError};
use crate::Tool;
use crate::{
ChatTemplateVersions, FinishReason, GenerateRequest, HubProcessorConfig, HubTokenizerConfig,
Message, PrefillToken, Token,
};
use async_stream... | text-generation-inference/router/src/infer/mod.rs/0 | {
"file_path": "text-generation-inference/router/src/infer/mod.rs",
"repo_id": "text-generation-inference",
"token_count": 8228
} | 237 |
exllamav2_commit := v0.1.8
build-exllamav2:
git clone https://github.com/turboderp/exllamav2.git exllamav2 && \
cd exllamav2 && git fetch && git checkout $(exllamav2_commit) && \
git submodule update --init --recursive && \
pip install -r requirements.txt && \
CUDA_ARCH_LIST="8.0;9.0a" NVCC_GENCODE="-gencode=arc... | text-generation-inference/server/Makefile-exllamav2/0 | {
"file_path": "text-generation-inference/server/Makefile-exllamav2",
"repo_id": "text-generation-inference",
"token_count": 302
} | 238 |
// Adapted from turboderp exllama: https://github.com/turboderp/exllama
#ifndef _column_remap_cuh
#define _column_remap_cuh
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cstdint>
void column_remap_cuda
(
const half* x,
half* x_new,
const int x_height,
const int x_width,
const uint32_... | text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_func/column_remap.cuh/0 | {
"file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_func/column_remap.cuh",
"repo_id": "text-generation-inference",
"token_count": 153
} | 239 |
#ifndef _q_gemm_cuh
#define _q_gemm_cuh
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cstdint>
#include <cstdio>
#include <ATen/cuda/CUDAContext.h>
#include "q_matrix.cuh"
void gemm_half_q_half_cuda
(
cublasHandle_t cublas_handle,
const half* a,
QMatrix* b,
half* c,
int size_m,
i... | text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/q_gemm.cuh/0 | {
"file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/q_gemm.cuh",
"repo_id": "text-generation-inference",
"token_count": 294
} | 240 |
[project]
name = "text-generation-server"
version = "2.0.5-dev0"
description = "Text Generation Inference Python gRPC Server"
readme = "README.md"
requires-python = ">=3.9"
authors = [
{name = "Olivier Dehaene", email = "olivier@huggingface.co"},
{name = "Nicolas Patry", email = "nicolas@huggingface.co"},
]
depende... | text-generation-inference/server/pyproject.toml/0 | {
"file_path": "text-generation-inference/server/pyproject.toml",
"repo_id": "text-generation-inference",
"token_count": 1062
} | 241 |
import torch
from text_generation_server.utils.tokens import (
StopSequenceCriteria,
StoppingCriteria,
FinishReason,
batch_top_tokens,
)
def test_stop_sequence_criteria():
criteria = StopSequenceCriteria("/test;")
assert not criteria("/")
assert not criteria("/test")
assert criteria("... | text-generation-inference/server/tests/utils/test_tokens.py/0 | {
"file_path": "text-generation-inference/server/tests/utils/test_tokens.py",
"repo_id": "text-generation-inference",
"token_count": 1427
} | 242 |
from typing import Optional
from contextvars import ContextVar
from contextlib import contextmanager
import flashinfer
import torch
prefill_state: ContextVar[flashinfer.BatchPrefillWithRaggedKVCacheWrapper] = ContextVar(
"prefill_state"
)
prefill_with_paged_kv_state: ContextVar[
flashinfer.BatchPrefillWithPa... | text-generation-inference/server/text_generation_server/layers/attention/flashinfer.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/attention/flashinfer.py",
"repo_id": "text-generation-inference",
"token_count": 3030
} | 243 |
from dataclasses import dataclass
import torch
from text_generation_server.utils.kernels import load_kernel
from text_generation_server.utils.weights import UnquantizedWeight
quantization_eetq = load_kernel(
module="quantization_eetq", repo_id="kernels-community/quantization-eetq"
)
@dataclass
class EETQWeight(... | text-generation-inference/server/text_generation_server/layers/eetq.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/eetq.py",
"repo_id": "text-generation-inference",
"token_count": 630
} | 244 |
from dataclasses import dataclass
from typing import List, Optional, Union
import numpy
import torch
import torch.nn as nn
from loguru import logger
from text_generation_server.layers.marlin.util import (
_check_marlin_kernels,
marlin_zero_points,
permute_scales,
unpack_cols,
)
from text_generation_ser... | text-generation-inference/server/text_generation_server/layers/marlin/gptq.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/marlin/gptq.py",
"repo_id": "text-generation-inference",
"token_count": 7460
} | 245 |
import torch
import torch.distributed
from torch import nn
from transformers.activations import ACT2FN
from transformers.configuration_utils import PretrainedConfig
from typing import Optional, List, Tuple
from text_generation_server.layers.attention import (
paged_attention,
attention,
Seqlen,
)
from tex... | text-generation-inference/server/text_generation_server/models/custom_modeling/flash_phi_modeling.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_phi_modeling.py",
"repo_id": "text-generation-inference",
"token_count": 6794
} | 246 |
# 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/LICENSE-2.0
#
# Unless r... | text-generation-inference/server/text_generation_server/models/custom_modeling/mllama.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/mllama.py",
"repo_id": "text-generation-inference",
"token_count": 18144
} | 247 |
import torch
import numpy as np
from typing import Iterable, Optional, Tuple, List, Dict
from text_generation_server.pb.generate_pb2 import Request
from io import BytesIO
from PIL import Image
from dataclasses import dataclass
from opentelemetry import trace
from transformers import (
PreTrainedTokenizerBase,
)
... | text-generation-inference/server/text_generation_server/models/mllama_causal_lm.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/mllama_causal_lm.py",
"repo_id": "text-generation-inference",
"token_count": 7887
} | 248 |
import torch
from loguru import logger
import os
import importlib.util
def is_ipex_available():
return importlib.util.find_spec("intel_extension_for_pytorch") is not None
def get_cuda_free_memory(device, memory_fraction):
total_free_memory, _ = torch.cuda.mem_get_info(device)
total_gpu_memory = torch.... | text-generation-inference/server/text_generation_server/utils/import_utils.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/import_utils.py",
"repo_id": "text-generation-inference",
"token_count": 932
} | 249 |
#!/bin/bash
ldconfig 2>/dev/null || echo 'unable to refresh ld cache, not a big deal in most cases'
source ./.venv/bin/activate
exec text-generation-launcher $@
| text-generation-inference/tgi-entrypoint.sh/0 | {
"file_path": "text-generation-inference/tgi-entrypoint.sh",
"repo_id": "text-generation-inference",
"token_count": 56
} | 250 |
.PHONY: style check-style test
DATA_DIR = data
dir_guard=@mkdir -p $(@D)
# Format source code automatically
style:
npm run lint
# Check the source code is formatted correctly
check-style:
npm run lint-check
TESTS_RESOURCES = $(DATA_DIR)/small.txt $(DATA_DIR)/roberta.json $(DATA_DIR)/tokenizer-wiki.json $(DATA_DI... | tokenizers/bindings/node/Makefile/0 | {
"file_path": "tokenizers/bindings/node/Makefile",
"repo_id": "tokenizers",
"token_count": 406
} | 251 |
import {
byteLevelPreTokenizer,
metaspacePreTokenizer,
punctuationPreTokenizer,
sequencePreTokenizer,
splitPreTokenizer,
whitespaceSplitPreTokenizer,
} from '../../'
describe('byteLevelPreTokenizer', () => {
it('instantiates correctly', () => {
const processor = byteLevelPreTokenizer()
expect(pro... | tokenizers/bindings/node/lib/bindings/pre-tokenizers.test.ts/0 | {
"file_path": "tokenizers/bindings/node/lib/bindings/pre-tokenizers.test.ts",
"repo_id": "tokenizers",
"token_count": 728
} | 252 |
{
"name": "tokenizers-linux-arm64-gnu",
"version": "0.13.4-rc1",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "tokenizers.linux-arm64-gnu.node",
"files": [
"tokenizers.linux-arm64-gnu.node"
],
"description": "Tokenizers platform specific bindings",
"keywords": [
"napi-rs",
"N... | tokenizers/bindings/node/npm/linux-arm64-gnu/package.json/0 | {
"file_path": "tokenizers/bindings/node/npm/linux-arm64-gnu/package.json",
"repo_id": "tokenizers",
"token_count": 289
} | 253 |
use crate::arc_rwlock_serde;
use serde::{Deserialize, Serialize};
extern crate tokenizers as tk;
use napi::bindgen_prelude::*;
use napi_derive::napi;
use std::sync::{Arc, RwLock};
use tk::decoders::DecoderWrapper;
/// Decoder
#[derive(Clone, Serialize, Deserialize)]
#[napi]
pub struct Decoder {
#[serde(flatten, wi... | tokenizers/bindings/node/src/decoders.rs/0 | {
"file_path": "tokenizers/bindings/node/src/decoders.rs",
"repo_id": "tokenizers",
"token_count": 2038
} | 254 |
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
"-C", "link-arg=-mmacosx-version-min=10.11",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
"-C", "link-arg=-mmacosx-version-min=10.11",
]
| tokenizers/bindings/python/.cargo/config.toml/0 | {
"file_path": "tokenizers/bindings/python/.cargo/config.toml",
"repo_id": "tokenizers",
"token_count": 146
} | 255 |
# Generated content DO NOT EDIT
class AddedToken:
"""
Represents a token that can be be added to a :class:`~tokenizers.Tokenizer`.
It can have special options that defines the way it should behave.
Args:
content (:obj:`str`): The content of the token
single_word (:obj:`bool`, defaults ... | tokenizers/bindings/python/py_src/tokenizers/__init__.pyi/0 | {
"file_path": "tokenizers/bindings/python/py_src/tokenizers/__init__.pyi",
"repo_id": "tokenizers",
"token_count": 17247
} | 256 |
# Generated content DO NOT EDIT
from .. import processors
PostProcessor = processors.PostProcessor
BertProcessing = processors.BertProcessing
ByteLevel = processors.ByteLevel
RobertaProcessing = processors.RobertaProcessing
Sequence = processors.Sequence
TemplateProcessing = processors.TemplateProcessing
| tokenizers/bindings/python/py_src/tokenizers/processors/__init__.py/0 | {
"file_path": "tokenizers/bindings/python/py_src/tokenizers/processors/__init__.py",
"repo_id": "tokenizers",
"token_count": 74
} | 257 |
#![warn(clippy::all)]
#![allow(clippy::upper_case_acronyms)]
// Many false positives with pyo3 it seems &str, and &PyAny get flagged
#![allow(clippy::borrow_deref_ref)]
extern crate tokenizers as tk;
mod decoders;
mod encoding;
mod error;
mod models;
mod normalizers;
mod pre_tokenizers;
mod processors;
mod token;
mod... | tokenizers/bindings/python/src/lib.rs/0 | {
"file_path": "tokenizers/bindings/python/src/lib.rs",
"repo_id": "tokenizers",
"token_count": 1086
} | 258 |
from tokenizers import BertWordPieceTokenizer
from ..utils import bert_files, data_dir, multiprocessing_with_parallelism
class TestBertWordPieceTokenizer:
def test_basic_encode(self, bert_files):
tokenizer = BertWordPieceTokenizer.from_file(bert_files["vocab"])
# Encode with special tokens by de... | tokenizers/bindings/python/tests/implementations/test_bert_wordpiece.py/0 | {
"file_path": "tokenizers/bindings/python/tests/implementations/test_bert_wordpiece.py",
"repo_id": "tokenizers",
"token_count": 914
} | 259 |
# Post-processors
<tokenizerslangcontent>
<python>
## BertProcessing
[[autodoc]] tokenizers.processors.BertProcessing
## ByteLevel
[[autodoc]] tokenizers.processors.ByteLevel
## RobertaProcessing
[[autodoc]] tokenizers.processors.RobertaProcessing
## TemplateProcessing
[[autodoc]] tokenizers.processors.Template... | tokenizers/docs/source-doc-builder/api/post-processors.mdx/0 | {
"file_path": "tokenizers/docs/source-doc-builder/api/post-processors.mdx",
"repo_id": "tokenizers",
"token_count": 174
} | 260 |
Crates.io
----------------------------------------------------------------------------------------------------
🤗 Tokenizers is available on `crates.io <https://crates.io/crates/tokenizers>`__.
You just need to add it to your :obj:`Cargo.toml`::
tokenizers = "0.10"
| tokenizers/docs/source/installation/rust.inc/0 | {
"file_path": "tokenizers/docs/source/installation/rust.inc",
"repo_id": "tokenizers",
"token_count": 74
} | 261 |
use tokenizers::Tokenizer;
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let tokenizer = Tokenizer::from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct", None)?;
let data = std::fs::read_to_string("data/big.txt")?;
let data: Vec<_> = data.lines().collect();
let add_special_tok... | tokenizers/tokenizers/examples/encode_batch.rs/0 | {
"file_path": "tokenizers/tokenizers/examples/encode_batch.rs",
"repo_id": "tokenizers",
"token_count": 165
} | 262 |
import * as wasm from "unstable_wasm";
console.log(wasm.tokenize("ab"));
console.log(wasm.tokenize("abc"));
| tokenizers/tokenizers/examples/unstable_wasm/www/index.js/0 | {
"file_path": "tokenizers/tokenizers/examples/unstable_wasm/www/index.js",
"repo_id": "tokenizers",
"token_count": 43
} | 263 |
use super::{super::OrderedVocabIter, convert_merges_to_hashmap, BpeBuilder, Pair, BPE};
use serde::{
de::{Error, MapAccess, Visitor},
ser::SerializeStruct,
Deserialize, Deserializer, Serialize, Serializer,
};
use std::collections::HashMap;
impl Serialize for BPE {
fn serialize<S>(&self, serializer: S) ... | tokenizers/tokenizers/src/models/bpe/serialization.rs/0 | {
"file_path": "tokenizers/tokenizers/src/models/bpe/serialization.rs",
"repo_id": "tokenizers",
"token_count": 4848
} | 264 |
use crate::tokenizer::{NormalizedString, Normalizer, Result};
use serde::{Deserialize, Serialize};
use unicode_categories::UnicodeCategories;
/// Checks whether a character is whitespace
fn is_whitespace(c: char) -> bool {
// These are technically control characters but we count them as whitespace
match c {
... | tokenizers/tokenizers/src/normalizers/bert.rs/0 | {
"file_path": "tokenizers/tokenizers/src/normalizers/bert.rs",
"repo_id": "tokenizers",
"token_count": 1856
} | 265 |
use crate::pre_tokenizers::PreTokenizerWrapper;
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result};
use crate::utils::macro_rules_attribute;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq)]
#[macro_rules_attribute(impl_serde_type!)]
pub struct Sequence {
pretokenizers: Vec<PreT... | tokenizers/tokenizers/src/pre_tokenizers/sequence.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/sequence.rs",
"repo_id": "tokenizers",
"token_count": 1124
} | 266 |
use crate::{
normalizer::Range, Encoding, NormalizedString, OffsetReferential, Offsets, Result, Token,
};
use std::collections::HashMap;
/// Various possible types of offsets
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OffsetType {
Byte,
Char,
None,
}
/// Wrapper for a subpart of a `Normaliz... | tokenizers/tokenizers/src/tokenizer/pre_tokenizer.rs/0 | {
"file_path": "tokenizers/tokenizers/src/tokenizer/pre_tokenizer.rs",
"repo_id": "tokenizers",
"token_count": 5310
} | 267 |
mod common;
use common::*;
use tokenizers::tokenizer::AddedToken;
macro_rules! check_offsets {
($input: expr, $output:expr, $offset:expr, $result:expr) => {
let offsets = $output.get_offsets()[$offset];
assert_eq!(&$input[offsets.0..offsets.1], $result);
};
}
#[test]
fn byte_level_basic() {
... | tokenizers/tokenizers/tests/offsets.rs/0 | {
"file_path": "tokenizers/tokenizers/tests/offsets.rs",
"repo_id": "tokenizers",
"token_count": 2497
} | 268 |
# Server-side Audio Processing in Node.js
A major benefit of writing code for the web is that you can access the multitude of APIs that are available in modern browsers. Unfortunately, when writing server-side code, we are not afforded such luxury, so we have to find another way. In this tutorial, we will design a si... | transformers.js/docs/source/guides/node-audio-processing.md/0 | {
"file_path": "transformers.js/docs/source/guides/node-audio-processing.md",
"repo_id": "transformers.js",
"token_count": 1352
} | 269 |
import { useState, useRef, useEffect } from "react";
import Editor from "@monaco-editor/react";
import Progress from './components/Progress';
import './App.css'
const MODELS = [
'Xenova/tiny_starcoder_py',
'Xenova/codegen-350M-mono',
// 'Xenova/starcoderbase-1b',
]
function App() {
// Editor setup
const m... | transformers.js/examples/code-completion/src/App.jsx/0 | {
"file_path": "transformers.js/examples/code-completion/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 3961
} | 270 |
@tailwind base;
@tailwind components;
@tailwind utilities;
| transformers.js/examples/cross-encoder/src/index.css/0 | {
"file_path": "transformers.js/examples/cross-encoder/src/index.css",
"repo_id": "transformers.js",
"token_count": 18
} | 271 |
{
"name": "depth-anything-client",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^5.0.13"
},
"dependencies": {
"@xenova/transformers": "^2.14.1",
"three": "^0.... | transformers.js/examples/depth-anything-client/package.json/0 | {
"file_path": "transformers.js/examples/depth-anything-client/package.json",
"repo_id": "transformers.js",
"token_count": 161
} | 272 |
import { useEffect, useState, useRef, useCallback } from 'react';
import Progress from './components/Progress';
import ImageInput from './components/ImageInput';
const IS_WEBGPU_AVAILABLE = !!navigator.gpu;
function App() {
// Create a reference to the worker object.
const worker = useRef(null);
// Model loa... | transformers.js/examples/florence2-webgpu/src/App.jsx/0 | {
"file_path": "transformers.js/examples/florence2-webgpu/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 4599
} | 273 |
import { pipeline } from "@xenova/transformers";
// Use the Singleton pattern to enable lazy construction of the pipeline.
// NOTE: We wrap the class in a function to prevent code duplication (see below).
const P = () => class PipelineSingleton {
static task = 'text-classification';
static model = 'Xenova/dist... | transformers.js/examples/next-server/src/app/classify/pipeline.js/0 | {
"file_path": "transformers.js/examples/next-server/src/app/classify/pipeline.js",
"repo_id": "transformers.js",
"token_count": 370
} | 274 |
import { decode } from 'blurhash'
const SIZE = 32;
export function blurHashToDataURL(hash) {
if (!hash) return undefined
const pixels = decode(hash, SIZE, SIZE)
const canvas = document.createElement("canvas");
canvas.width = SIZE;
canvas.height = SIZE;
const ctx = canvas.getContext("2d");
... | transformers.js/examples/semantic-image-search-client/src/app/utils.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search-client/src/app/utils.js",
"repo_id": "transformers.js",
"token_count": 1001
} | 275 |
import { AutoTokenizer, CLIPTextModelWithProjection } from "@xenova/transformers";
import { createClient } from '@supabase/supabase-js'
// Use the Singleton pattern to enable lazy construction of the pipeline.
// NOTE: We wrap the class in a function to prevent code duplication (see below).
const S = () => class Appli... | transformers.js/examples/semantic-image-search/src/app/app.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search/src/app/app.js",
"repo_id": "transformers.js",
"token_count": 678
} | 276 |
import './style.css';
import { env, AutoModel, AutoProcessor, RawImage } from '@xenova/transformers';
// Since we will download the model from the Hugging Face Hub, we can skip the local model check
env.allowLocalModels = false;
// Proxy the WASM backend to prevent the UI from freezing
env.backends.onnx.wasm.proxy =... | transformers.js/examples/video-object-detection/main.js/0 | {
"file_path": "transformers.js/examples/video-object-detection/main.js",
"repo_id": "transformers.js",
"token_count": 1945
} | 277 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js | WebGPU Benchmark</title>
</head>
<body>
<h1>
<a href="https://github.com/huggingface/transformers.js" target="_blank">🤗 Transformers.js</a> We... | transformers.js/examples/webgpu-embedding-benchmark/index.html/0 | {
"file_path": "transformers.js/examples/webgpu-embedding-benchmark/index.html",
"repo_id": "transformers.js",
"token_count": 1004
} | 278 |
export default function ImageIcon(props) {
return (
<svg
{...props}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
stro... | transformers.js/examples/webgpu-vlm/src/components/icons/ImageIcon.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-vlm/src/components/icons/ImageIcon.jsx",
"repo_id": "transformers.js",
"token_count": 462
} | 279 |
import { useEffect, useState, useRef } from 'react';
import { AudioVisualizer } from './components/AudioVisualizer';
import Progress from './components/Progress';
import { LanguageSelector } from './components/LanguageSelector';
const IS_WEBGPU_AVAILABLE = !!navigator.gpu;
const WHISPER_SAMPLING_RATE = 16_000;
const... | transformers.js/examples/webgpu-whisper/src/App.jsx/0 | {
"file_path": "transformers.js/examples/webgpu-whisper/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 4256
} | 280 |
function titleCase(str) {
str = str.toLowerCase();
return (str.match(/\w+.?/g) || [])
.map((word) => {
return word.charAt(0).toUpperCase() + word.slice(1);
})
.join("");
}
// List of supported languages:
// https://help.openai.com/en/articles/7031512-whisper-api-faq
// http... | transformers.js/examples/whisper-word-timestamps/src/components/LanguageSelector.jsx/0 | {
"file_path": "transformers.js/examples/whisper-word-timestamps/src/components/LanguageSelector.jsx",
"repo_id": "transformers.js",
"token_count": 1603
} | 281 |
import { useState, useRef, useEffect, useCallback } from 'react'
import './App.css'
const PLACEHOLDER_REVIEWS = [
// battery/charging problems
"Disappointed with the battery life! The phone barely lasts half a day with regular use. Considering how much I paid for it, I expected better performance in this departmen... | transformers.js/examples/zero-shot-classification/src/App.jsx/0 | {
"file_path": "transformers.js/examples/zero-shot-classification/src/App.jsx",
"repo_id": "transformers.js",
"token_count": 3044
} | 282 |
/**
* @module generation/stopping_criteria
*/
import { Callable } from "../utils/generic.js";
// NOTE:
// Stopping Criteria returns a list of `batch_size` booleans, indicating whether each sequence in the batch should be stopped.
/**
* Abstract base class for all stopping criteria that can be applied during gene... | transformers.js/src/generation/stopping_criteria.js/0 | {
"file_path": "transformers.js/src/generation/stopping_criteria.js",
"repo_id": "transformers.js",
"token_count": 1803
} | 283 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class DPTImageProcessor extends ImageProcessor { }
export class DPTFeatureExtractor extends DPTImageProcessor { } // NOTE: extends DPTImageProcessor
| transformers.js/src/models/dpt/image_processing_dpt.js/0 | {
"file_path": "transformers.js/src/models/dpt/image_processing_dpt.js",
"repo_id": "transformers.js",
"token_count": 70
} | 284 |
import {
ImageProcessor,
post_process_panoptic_segmentation,
post_process_instance_segmentation,
} from "../../base/image_processors_utils.js";
export class MaskFormerImageProcessor extends ImageProcessor {
/** @type {typeof post_process_panoptic_segmentation} */
post_process_panoptic_segmentatio... | transformers.js/src/models/maskformer/image_processing_maskformer.js/0 | {
"file_path": "transformers.js/src/models/maskformer/image_processing_maskformer.js",
"repo_id": "transformers.js",
"token_count": 229
} | 285 |
export * from './florence2/processing_florence2.js';
export * from './grounding_dino/processing_grounding_dino.js';
export * from './idefics3/processing_idefics3.js';
export * from './janus/processing_janus.js';
export * from './jina_clip/processing_jina_clip.js';
export * from './mgp_str/processing_mgp_str.js';
export... | transformers.js/src/models/processors.js/0 | {
"file_path": "transformers.js/src/models/processors.js",
"repo_id": "transformers.js",
"token_count": 336
} | 286 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class ViTImageProcessor extends ImageProcessor { }
export class ViTFeatureExtractor extends ViTImageProcessor { }
| transformers.js/src/models/vit/image_processing_vit.js/0 | {
"file_path": "transformers.js/src/models/vit/image_processing_vit.js",
"repo_id": "transformers.js",
"token_count": 61
} | 287 |
/**
* @file Helper module for audio processing.
*
* These functions and classes are only used internally,
* meaning an end-user shouldn't need to access anything here.
*
* @module utils/audio
*/
import {
getFile,
} from './hub.js';
import { FFT, max } from './maths.js';
import {
calculateReflectOffs... | transformers.js/src/utils/audio.js/0 | {
"file_path": "transformers.js/src/utils/audio.js",
"repo_id": "transformers.js",
"token_count": 12826
} | 288 |
// Helper functions used when initialising the testing environment.
// Import Node typing utilities
import * as types from "node:util/types";
// Import onnxruntime-node's default backend
import { onnxruntimeBackend } from "onnxruntime-node/dist/backend";
import * as ONNX_COMMON from "onnxruntime-common";
/**
* A wo... | transformers.js/tests/init.js/0 | {
"file_path": "transformers.js/tests/init.js",
"repo_id": "transformers.js",
"token_count": 2064
} | 289 |
import { CohereTokenizer, CohereModel, CohereForCausalLM } from "../../../src/transformers.js";
import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js";
export default () => {
describe("CohereModel", () => {
const model_id = "hf-internal-testin... | transformers.js/tests/models/cohere/test_modeling_cohere.js/0 | {
"file_path": "transformers.js/tests/models/cohere/test_modeling_cohere.js",
"repo_id": "transformers.js",
"token_count": 1323
} | 290 |
import { PreTrainedTokenizer, GlmForCausalLM } 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("GlmForCausalLM", () => {
const model_id = "hf-internal-testing/tiny-ra... | transformers.js/tests/models/glm/test_modeling_glm.js/0 | {
"file_path": "transformers.js/tests/models/glm/test_modeling_glm.js",
"repo_id": "transformers.js",
"token_count": 791
} | 291 |
import { NllbTokenizer } from "../../../src/tokenizers.js";
import { BASE_TEST_STRINGS } from "../test_strings.js";
export const TOKENIZER_CLASS = NllbTokenizer;
export const TEST_CONFIG = {
"Xenova/nllb-200-distilled-600M": {
SIMPLE: {
text: BASE_TEST_STRINGS.SIMPLE,
tokens: ["\u2581How", "\u2581are... | transformers.js/tests/models/nllb/test_tokenization_nllb.js/0 | {
"file_path": "transformers.js/tests/models/nllb/test_tokenization_nllb.js",
"repo_id": "transformers.js",
"token_count": 5409
} | 292 |
import { AutoProcessor, Qwen2VLProcessor } 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("Qwen2VLProcessor", () => {
const model_id = "hf-internal-te... | transformers.js/tests/models/qwen2_vl/test_processor_qwen2_vl.js/0 | {
"file_path": "transformers.js/tests/models/qwen2_vl/test_processor_qwen2_vl.js",
"repo_id": "transformers.js",
"token_count": 612
} | 293 |
import { AutoFeatureExtractor, WhisperFeatureExtractor } from "../../../src/transformers.js";
import { load_cached_audio } from "../../asset_cache.js";
import { MAX_FEATURE_EXTRACTOR_LOAD_TIME, MAX_TEST_EXECUTION_TIME } from "../../init.js";
export default () => {
// WhisperFeatureExtractor
describe("WhisperFeatu... | transformers.js/tests/models/whisper/test_feature_extraction_whisper.js/0 | {
"file_path": "transformers.js/tests/models/whisper/test_feature_extraction_whisper.js",
"repo_id": "transformers.js",
"token_count": 516
} | 294 |
import { pipeline, ImageToTextPipeline } 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-to-text";
export default () => {
des... | transformers.js/tests/pipelines/test_pipelines_image_to_text.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_image_to_text.js",
"repo_id": "transformers.js",
"token_count": 684
} | 295 |
.PHONY: deps_table_update modified_only_fixup extra_style_checks quality style fixup fix-copies test test-examples benchmark
# make sure to test the local checkout in scripts and not the pre-installed one (don't use quotes!)
export PYTHONPATH = src
check_dirs := examples tests src utils
exclude_folders := ""
modif... | transformers/Makefile/0 | {
"file_path": "transformers/Makefile",
"repo_id": "transformers",
"token_count": 1419
} | 296 |
# 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/conftest.py/0 | {
"file_path": "transformers/conftest.py",
"repo_id": "transformers",
"token_count": 1681
} | 297 |
FROM python:3.10
LABEL maintainer="Hugging Face"
RUN apt update
RUN git clone https://github.com/huggingface/transformers
RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder ./transformers[dev]
RUN apt-get -y update && apt-get... | transformers/docker/transformers-doc-builder/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-doc-builder/Dockerfile",
"repo_id": "transformers",
"token_count": 292
} | 298 |
# كيفية تعديل أي نموذج من نماذج Transformers
توفر مكتبة [🤗 Transformers](https://github.com/huggingface/transformers) مجموعة من النماذج المسبقة التدريب والأدوات لمعالجة اللغات الطبيعية، والرؤية، وما إلى ذلك. على الرغم من أن هذه النماذج تغطي مجموعة واسعة من التطبيقات، فقد تواجه حالات استخدام لا تدعمها المكتبة بشكل افت... | transformers/docs/source/ar/how_to_hack_models.md/0 | {
"file_path": "transformers/docs/source/ar/how_to_hack_models.md",
"repo_id": "transformers",
"token_count": 5880
} | 299 |
# استخدام قنوات المعالجة لخادم ويب
<Tip>
يُعدّ إنشاء محرك استدلال أمرًا معقدًا، ويعتمد الحل "الأفضل" على مساحة مشكلتك. هل تستخدم وحدة المعالجة المركزية أم وحدة معالجة الرسومات؟ هل تريد أقل زمن وصول، أم أعلى معدل نقل، أم دعمًا للعديد من النماذج، أم مجرد تحقيق أقصى تحسين نموذج محدد؟
توجد طرق عديدة لمعالجة هذا الموضوع،... | transformers/docs/source/ar/pipeline_webserver.md/0 | {
"file_path": "transformers/docs/source/ar/pipeline_webserver.md",
"repo_id": "transformers",
"token_count": 5178
} | 300 |
# التصدير إلى TFLite
[TensorFlow Lite](https://www.tensorflow.org/lite/guide) هو إطار عمل خفيف الوزن لنشر نماذج التعلم الآلي على الأجهزة المحدودة الموارد، مثل الهواتف المحمولة، والأنظمة المدمجة، وأجهزة إنترنت الأشياء (IoT). تم تصميم TFLite لتشغيل النماذج وتحسينها بكفاءة على هذه الأجهزة ذات الطاقة الحاسوبية والذاكرة وا... | transformers/docs/source/ar/tflite.md/0 | {
"file_path": "transformers/docs/source/ar/tflite.md",
"repo_id": "transformers",
"token_count": 1409
} | 301 |
<!--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/de/llm_tutorial.md/0 | {
"file_path": "transformers/docs/source/de/llm_tutorial.md",
"repo_id": "transformers",
"token_count": 4767
} | 302 |
<!--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/add_new_pipeline.md/0 | {
"file_path": "transformers/docs/source/en/add_new_pipeline.md",
"repo_id": "transformers",
"token_count": 3561
} | 303 |
<!--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/debugging.md/0 | {
"file_path": "transformers/docs/source/en/debugging.md",
"repo_id": "transformers",
"token_count": 6488
} | 304 |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/main_classes/image_processor.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/image_processor.md",
"repo_id": "transformers",
"token_count": 1086
} | 305 |
<!--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/clip.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/clip.md",
"repo_id": "transformers",
"token_count": 6200
} | 306 |
<!--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/dab-detr.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dab-detr.md",
"repo_id": "transformers",
"token_count": 1557
} | 307 |
<!--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 agree... | transformers/docs/source/en/model_doc/gemma2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/gemma2.md",
"repo_id": "transformers",
"token_count": 736
} | 308 |
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/granitevision.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/granitevision.md",
"repo_id": "transformers",
"token_count": 993
} | 309 |
<!--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.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/llava_next.md",
"repo_id": "transformers",
"token_count": 4826
} | 310 |
<!--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/mbart.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/mbart.md",
"repo_id": "transformers",
"token_count": 3129
} | 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 agreed... | transformers/docs/source/en/model_doc/pegasus.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/pegasus.md",
"repo_id": "transformers",
"token_count": 1966
} | 312 |
<!--Copyright 2021 NVIDIA Corporation and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | transformers/docs/source/en/model_doc/qdqbert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/qdqbert.md",
"repo_id": "transformers",
"token_count": 2073
} | 313 |
<!--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/roc_bert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/roc_bert.md",
"repo_id": "transformers",
"token_count": 999
} | 314 |
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/speech_to_text.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/speech_to_text.md",
"repo_id": "transformers",
"token_count": 1920
} | 315 |
<!--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/table-transformer.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/table-transformer.md",
"repo_id": "transformers",
"token_count": 978
} | 316 |
<!--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/unispeech.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/unispeech.md",
"repo_id": "transformers",
"token_count": 853
} | 317 |
<!--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.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/xlm.md",
"repo_id": "transformers",
"token_count": 1744
} | 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/en/pipeline_tutorial.md/0 | {
"file_path": "transformers/docs/source/en/pipeline_tutorial.md",
"repo_id": "transformers",
"token_count": 5090
} | 319 |
<!--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/optimum.md/0 | {
"file_path": "transformers/docs/source/en/quantization/optimum.md",
"repo_id": "transformers",
"token_count": 277
} | 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/tasks/image_classification.md/0 | {
"file_path": "transformers/docs/source/en/tasks/image_classification.md",
"repo_id": "transformers",
"token_count": 6144
} | 321 |
<!--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/trainer.md/0 | {
"file_path": "transformers/docs/source/en/trainer.md",
"repo_id": "transformers",
"token_count": 11053
} | 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/es/fast_tokenizers.md/0 | {
"file_path": "transformers/docs/source/es/fast_tokenizers.md",
"repo_id": "transformers",
"token_count": 987
} | 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/es/run_scripts.md/0 | {
"file_path": "transformers/docs/source/es/run_scripts.md",
"repo_id": "transformers",
"token_count": 7013
} | 324 |
# docstyle-ignore
INSTALL_CONTENT = """
# Installation de Transformers
! pip install transformers datasets evaluate accelerate
# Pour installer à partir du code source au lieu de la dernière version, commentez la commande ci-dessus et décommentez la suivante.
# ! pip install git+https://github.com/huggingface/transform... | transformers/docs/source/fr/_config.py/0 | {
"file_path": "transformers/docs/source/fr/_config.py",
"repo_id": "transformers",
"token_count": 175
} | 325 |
- sections:
- local: index
title: 🤗 Transformers
- local: quicktour
title: Tour rapido
- local: installation
title: Installazione
title: Iniziare
- sections:
- local: pipeline_tutorial
title: Pipeline per l'inferenza
- local: autoclass_tutorial
title: Carica istanze pre-allenate con Aut... | transformers/docs/source/it/_toctree.yml/0 | {
"file_path": "transformers/docs/source/it/_toctree.yml",
"repo_id": "transformers",
"token_count": 771
} | 326 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.