text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
from .hpu import WQLinear
__all__ = ["WQLinear"]
| text-generation-inference/backends/gaudi/server/text_generation_server/layers/awq/quantize/__init__.py/0 | {
"file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/layers/awq/quantize/__init__.py",
"repo_id": "text-generation-inference",
"token_count": 22
} | 263 |
import torch
import torch.distributed
from torch import nn
from transformers.activations import ACT2FN
from typing import Optional, List, Tuple
from text_generation_server.layers.attention import (
paged_attention,
attention,
set_block_mapping,
Seqlen,
HPUPagedAttentionMetadata,
)
from text_genera... | text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/flash_qwen2_modeling.py/0 | {
"file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/flash_qwen2_modeling.py",
"repo_id": "text-generation-inference",
"token_count": 6284
} | 264 |
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,
)
f... | text-generation-inference/backends/gaudi/server/text_generation_server/models/mllama_causal_lm.py/0 | {
"file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/models/mllama_causal_lm.py",
"repo_id": "text-generation-inference",
"token_count": 12673
} | 265 |
//! A crate to extract and inject a OpenTelemetry context from and to a gRPC request.
//! Inspired by: https://github.com/open-telemetry/opentelemetry-rust gRPC examples
use opentelemetry::global;
use opentelemetry::propagation::Injector;
use tracing_opentelemetry::OpenTelemetrySpanExt;
/// Inject context in the meta... | text-generation-inference/backends/grpc-metadata/src/lib.rs/0 | {
"file_path": "text-generation-inference/backends/grpc-metadata/src/lib.rs",
"repo_id": "text-generation-inference",
"token_count": 543
} | 266 |
import sys
from typing import Optional
import typer
from loguru import logger
app = typer.Typer()
@app.command()
def serve(
model_id: str,
revision: Optional[str] = None,
sharded: bool = False,
trust_remote_code: bool = None,
uds_path: str = "/tmp/text-generation-server",
logger_level: str ... | text-generation-inference/backends/neuron/server/text_generation_server/cli.py/0 | {
"file_path": "text-generation-inference/backends/neuron/server/text_generation_server/cli.py",
"repo_id": "text-generation-inference",
"token_count": 1479
} | 267 |
from text_generation_server.generator import NeuronGenerator
def test_info(neuron_model_path):
generator = NeuronGenerator.from_pretrained(neuron_model_path)
info = generator.info
assert info.requires_padding is True
assert info.device_type == "xla"
assert info.window_size == 0
assert info.spe... | text-generation-inference/backends/neuron/tests/server/test_info.py/0 | {
"file_path": "text-generation-inference/backends/neuron/tests/server/test_info.py",
"repo_id": "text-generation-inference",
"token_count": 112
} | 268 |
#ifndef TGI_HARDWARE_CUDA
#define TGI_HARDWARE_CUDA
#include <cstdint>
#include <optional>
#include <nvml.h>
namespace huggingface::tgi::hardware::cuda {
static constexpr auto VOLTA = std::make_tuple(7u, 0u);
static constexpr auto TURING = std::make_tuple(7u, 5u);
static constexpr auto AMPERE = std::make_... | text-generation-inference/backends/trtllm/csrc/hardware.hpp/0 | {
"file_path": "text-generation-inference/backends/trtllm/csrc/hardware.hpp",
"repo_id": "text-generation-inference",
"token_count": 1383
} | 269 |
mod backend;
mod client;
mod queue;
use crate::client::{ClientError, ShardedClient};
pub(crate) use backend::BackendV2;
use serde::Serialize;
use thiserror::Error;
use utoipa::ToSchema;
#[derive(Clone, Debug, Serialize, ToSchema)]
pub struct BackendInfo {
/// Mandatory
#[schema(example = "cuda")]
pub mode... | text-generation-inference/backends/v2/src/lib.rs/0 | {
"file_path": "text-generation-inference/backends/v2/src/lib.rs",
"repo_id": "text-generation-inference",
"token_count": 2252
} | 270 |
<div align="center">
# Text Generation Inference benchmarking tool

</div>
A lightweight benchmarking tool based inspired by [oha](https://github.com/hatoo/oha)
and powered by [Ratatui](https://github.com/ratatui/ratatui).
## Install
```shell
make install-benchmark
```
## Run... | text-generation-inference/benchmark/README.md/0 | {
"file_path": "text-generation-inference/benchmark/README.md",
"repo_id": "text-generation-inference",
"token_count": 184
} | 271 |
# import pytest
#
# from text_generation import (
# InferenceAPIClient,
# InferenceAPIAsyncClient,
# Client,
# AsyncClient,
# )
# from text_generation.errors import NotSupportedError, NotFoundError
# from text_generation.inference_api import check_model_support, deployed_models
#
#
# def test_check_mode... | text-generation-inference/clients/python/tests/test_inference_api.py/0 | {
"file_path": "text-generation-inference/clients/python/tests/test_inference_api.py",
"repo_id": "text-generation-inference",
"token_count": 477
} | 272 |
# TensorRT-LLM backend
The NVIDIA TensorRT-LLM (TRTLLM) backend is a high-performance backend for LLMs
that uses NVIDIA's TensorRT library for inference acceleration.
It makes use of specific optimizations for NVIDIA GPUs, such as custom kernels.
To use the TRTLLM backend **you need to compile** `engines` for the mod... | text-generation-inference/docs/source/backends/trtllm.md/0 | {
"file_path": "text-generation-inference/docs/source/backends/trtllm.md",
"repo_id": "text-generation-inference",
"token_count": 2138
} | 273 |
# HTTP API Reference
#### Table of Contents
- [Text Generation Inference custom API](#text-generation-inference-custom-api)
- [OpenAI Messages API](#openai-messages-api)
- [Making a Request](#making-a-request)
- [Streaming](#streaming)
- [Synchronous](#synchronous)
- [Hugging Face Inference Endpoints](#huggin... | text-generation-inference/docs/source/reference/api_reference.md/0 | {
"file_path": "text-generation-inference/docs/source/reference/api_reference.md",
"repo_id": "text-generation-inference",
"token_count": 1840
} | 274 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 17934,
"logprob": null,
"text": "Pour"
},
{
"id": 49833,
"logprob": -10.5703125,
"text": " dég"
},
{
"... | text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m/test_bloom_560m.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_bloom_560m/test_bloom_560m.json",
"repo_id": "text-generation-inference",
"token_count": 1548
} | 275 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [],
"seed": 0,
"tokens": [
{
"id": 13,
"logprob": -0.19958496,
"special": false,
"text": "\n"
},
{
"id": 4013,
"logprob": -2... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 860
} | 276 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 100,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 1331,
"logprob": -0.31835938,
"special": false,
"text": " people"
},
{
"id": 8390,
"l... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3.json",
"repo_id": "text-generation-inference",
"token_count": 7765
} | 277 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "stop_sequence",
"generated_tokens": 5,
"prefill": [],
"seed": 0,
"tokens": [
{
"id": 5229,
"logprob": -2.5839844,
"special": false,
"text": " failed"
},
{
"id": 29901,
... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 487
} | 278 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [],
"seed": 0,
"tokens": [
{
"id": 5229,
"logprob": -1.2607422,
"special": false,
"text": " failed"
},
{
"id": 29901,
"logpr... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_marlin/test_flash_llama_marlin_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_marlin/test_flash_llama_marlin_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 855
} | 279 |
{
"details": {
"finish_reason": "eos_token",
"generated_tokens": 7,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 1,
"logprob": -0.49658203,
"special": true,
"text": "<s>"
},
{
"id": 28705,
"logprob": -0.0016384125,
"spec... | text-generation-inference/integration-tests/models/__snapshots__/test_lora_mistral/test_lora_mistral_with_dbpedia_adapter.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_lora_mistral/test_lora_mistral_with_dbpedia_adapter.json",
"repo_id": "text-generation-inference",
"token_count": 611
} | 280 |
[
{
"choices": [
{
"delta": {
"content": "Once",
"role": "assistant",
"tool_calls": null
},
"finish_reason": null,
"index": 0,
"logprobs": null
}
],
"created": 1741263693,
"id": "",
"model": "meta-llama/Llama-3.1-8B-... | text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_sea_creatures_stream_none.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_sea_creatures_stream_none.json",
"repo_id": "text-generation-inference",
"token_count": 24208
} | 281 |
import pytest
@pytest.fixture(scope="module")
def compressed_tensors_w8a8_int_handle(launcher):
with launcher(
"neuralmagic/Llama-3.2-3B-Instruct-quantized.w8a8",
num_shard=2,
quantize="compressed-tensors",
) as handle:
yield handle
@pytest.fixture(scope="module")
async def c... | text-generation-inference/integration-tests/models/test_compressed_tensors_w8a8_int.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_compressed_tensors_w8a8_int.py",
"repo_id": "text-generation-inference",
"token_count": 1071
} | 282 |
import pytest
@pytest.fixture(scope="module")
def flash_llama_handle(launcher):
with launcher("huggingface/llama-7b", num_shard=2) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_llama(flash_llama_handle):
await flash_llama_handle.health(300)
return flash_llama_handle.cli... | text-generation-inference/integration-tests/models/test_flash_llama.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_llama.py",
"repo_id": "text-generation-inference",
"token_count": 657
} | 283 |
import pytest
@pytest.fixture(scope="module")
def flash_pali_gemma_handle(launcher):
with launcher(
"google/paligemma-3b-pt-224",
num_shard=1,
revision="float16",
max_input_length=4000,
max_total_tokens=4096,
) as handle:
yield handle
@pytest.fixture(scope="mo... | text-generation-inference/integration-tests/models/test_flash_pali_gemma.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_pali_gemma.py",
"repo_id": "text-generation-inference",
"token_count": 587
} | 284 |
import pytest
@pytest.fixture(scope="module")
def flash_idefics3_next_handle(launcher):
with launcher("HuggingFaceM4/Idefics3-8B-Llama3") as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_idefics3_next(flash_idefics3_next_handle):
await flash_idefics3_next_handle.health(300)
... | text-generation-inference/integration-tests/models/test_idefics3.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_idefics3.py",
"repo_id": "text-generation-inference",
"token_count": 454
} | 285 |
import pytest
@pytest.fixture
async def tgi_service(neuron_launcher, neuron_model_config):
model_name_or_path = neuron_model_config["neuron_model_path"]
service_name = neuron_model_config["name"]
with neuron_launcher(service_name, model_name_or_path) as tgi_service:
await tgi_service.health(600)
... | text-generation-inference/integration-tests/neuron/test_generate.py/0 | {
"file_path": "text-generation-inference/integration-tests/neuron/test_generate.py",
"repo_id": "text-generation-inference",
"token_count": 1325
} | 286 |
import datasets
import json
dataset = datasets.load_dataset("ccdv/govreport-summarization")
max_new_tokens = 50
conversations = []
for i, item in enumerate(dataset["test"]):
report = item["report"]
messages = [{"from": "human", "value": f"Summarize this report: ```{report}```"}]
conversations.append(... | text-generation-inference/load_tests/long.py/0 | {
"file_path": "text-generation-inference/load_tests/long.py",
"repo_id": "text-generation-inference",
"token_count": 156
} | 287 |
use crate::{
infer::InferError, ChatCompletionChoice, ChatCompletionChunk, ChatCompletionDelta,
ChatCompletionLogprobs, CompletionType, DeltaToolCall, Function, FunctionDefinition,
StreamOptions, StreamResponse, TextMessage, ToolCallDelta, Usage,
};
use serde::Deserialize;
use serde_json::Value;
#[derive(D... | text-generation-inference/router/src/chat.rs/0 | {
"file_path": "text-generation-inference/router/src/chat.rs",
"repo_id": "text-generation-inference",
"token_count": 13158
} | 288 |
include Makefile-flash-att
include Makefile-flash-att-v2
include Makefile-vllm
include Makefile-awq
include Makefile-selective-scan
include Makefile-exllamav2
include Makefile-flashinfer
unit-tests:
pip install -U pip uv
uv pip install -e ".[dev]"
uv sync --inexact --extra dev --active
pytest -s -vv -m "not privat... | text-generation-inference/server/Makefile/0 | {
"file_path": "text-generation-inference/server/Makefile",
"repo_id": "text-generation-inference",
"token_count": 808
} | 289 |
// Adapted from turboderp exllama: https://github.com/turboderp/exllama
#ifndef _cuda_buffers_cuh
#define _cuda_buffers_cuh
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cstdint>
#include <cstdio>
const int CUDA_MAX_DEVICES = 16;
// #ifndef _cuda_buffers_cu
// extern __constant__ half2 q4_table[16][256... | text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh/0 | {
"file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/cuda_buffers.cuh",
"repo_id": "text-generation-inference",
"token_count": 471
} | 290 |
#ifndef _matrix_view_cuh
#define _matrix_view_cuh
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include "quant/qdq_util.cuh"
class MatrixView_half
{
public:
const half* data;
const int height;
const int width;
__device__ __forceinline__ MatrixView_half(const half* data, const int height, const i... | text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/matrix_view.cuh/0 | {
"file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/matrix_view.cuh",
"repo_id": "text-generation-inference",
"token_count": 1862
} | 291 |
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import torch
extra_cuda_cflags = ["-lineinfo", "-O3"]
extra_cflags = []
if torch.version.hip:
extra_cflags = ["-DLEGACY_HIPBLAS_DIRECT=ON"]
extra_cuda_cflags += ["-DHIPBLAS_USE_HIP_HALF", "-DLEGACY_HIPBLAS_DIRECT=O... | text-generation-inference/server/exllamav2_kernels/setup.py/0 | {
"file_path": "text-generation-inference/server/exllamav2_kernels/setup.py",
"repo_id": "text-generation-inference",
"token_count": 424
} | 292 |
import os
import tempfile
import pytest
import huggingface_hub.constants
import text_generation_server.utils.hub
from text_generation_server.utils.hub import (
weight_hub_files,
download_weights,
weight_files,
EntryNotFoundError,
LocalEntryNotFoundError,
RevisionNotFoundError,
)
@pytest.fix... | text-generation-inference/server/tests/utils/test_hub.py/0 | {
"file_path": "text-generation-inference/server/tests/utils/test_hub.py",
"repo_id": "text-generation-inference",
"token_count": 1250
} | 293 |
import torch
from text_generation_server.layers.attention.kv_cache import KVCache, KVScales
from text_generation_server.utils.import_utils import SYSTEM
from text_generation_server.utils.kernels import load_kernel
from text_generation_server.models.globals import (
ATTENTION,
BLOCK_SIZE,
)
from text_generation_... | text-generation-inference/server/text_generation_server/layers/attention/cuda.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/attention/cuda.py",
"repo_id": "text-generation-inference",
"token_count": 6089
} | 294 |
from typing import List, Union
import torch
from compressed_tensors.quantization import QuantizationArgs, QuantizationType
from text_generation_server.layers.marlin.marlin import GPTQMarlin24Weight
from text_generation_server.utils.weights import Weights, WeightsLoader
class WNA16Int24Loader(WeightsLoader):
""... | text-generation-inference/server/text_generation_server/layers/compressed_tensors/wna16_int_24.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/compressed_tensors/wna16_int_24.py",
"repo_id": "text-generation-inference",
"token_count": 1629
} | 295 |
from text_generation_server.layers.marlin.fp8 import GPTQMarlinFP8Linear
from text_generation_server.layers.marlin.gptq import (
GPTQMarlinWeightsLoader,
can_use_gptq_marlin,
repack_gptq_for_marlin,
)
from text_generation_server.layers.marlin.marlin import MarlinWeightsLoader
__all__ = [
"GPTQMarlinFP8... | text-generation-inference/server/text_generation_server/layers/marlin/__init__.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/layers/marlin/__init__.py",
"repo_id": "text-generation-inference",
"token_count": 195
} | 296 |
import torch
import torch.distributed
from typing import Optional, Type
from transformers import (
PreTrainedTokenizerBase,
)
from text_generation_server.models import CausalLM
from text_generation_server.models.causal_lm import CausalLMBatch
from text_generation_server.pb import generate_pb2
class BloomCausal... | text-generation-inference/server/text_generation_server/models/bloom.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/bloom.py",
"repo_id": "text-generation-inference",
"token_count": 543
} | 297 |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_image_processing.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/idefics_image_processing.py",
"repo_id": "text-generation-inference",
"token_count": 5686
} | 298 |
# Origin: https://github.com/predibase/lorax
# Path: lorax/server/lorax_server/utils/segments.py
# License: Apache License Version 2.0, January 2004
from typing import List, Tuple, Union
import torch
import numpy as np
def find_segments(
adapter_indices: Union[torch.Tensor, List[int]]
) -> Tuple[List[int... | text-generation-inference/server/text_generation_server/utils/segments.py/0 | {
"file_path": "text-generation-inference/server/text_generation_server/utils/segments.py",
"repo_id": "text-generation-inference",
"token_count": 1009
} | 299 |
# `tokenizers-darwin-x64`
This is the **x86_64-apple-darwin** binary for `tokenizers`
| tokenizers/bindings/node/npm/darwin-x64/README.md/0 | {
"file_path": "tokenizers/bindings/node/npm/darwin-x64/README.md",
"repo_id": "tokenizers",
"token_count": 34
} | 300 |
# `tokenizers-win32-ia32-msvc`
This is the **i686-pc-windows-msvc** binary for `tokenizers`
| tokenizers/bindings/node/npm/win32-ia32-msvc/README.md/0 | {
"file_path": "tokenizers/bindings/node/npm/win32-ia32-msvc/README.md",
"repo_id": "tokenizers",
"token_count": 37
} | 301 |
extern crate tokenizers as tk;
use crate::encoding::*;
use crate::tokenizer::Tokenizer;
use napi::bindgen_prelude::*;
use tk::tokenizer::{EncodeInput, Encoding};
pub struct EncodeTask<'s> {
pub tokenizer: Tokenizer,
pub input: Option<EncodeInput<'s>>,
pub add_special_tokens: bool,
}
impl Task for EncodeTask<'s... | tokenizers/bindings/node/src/tasks/tokenizer.rs/0 | {
"file_path": "tokenizers/bindings/node/src/tasks/tokenizer.rs",
"repo_id": "tokenizers",
"token_count": 1291
} | 302 |
from typing import List
import jieba
from tokenizers import NormalizedString, PreTokenizedString, Regex, Tokenizer
from tokenizers.decoders import Decoder
from tokenizers.models import BPE
from tokenizers.normalizers import Normalizer
from tokenizers.pre_tokenizers import PreTokenizer
class JiebaPreTokenizer:
de... | tokenizers/bindings/python/examples/custom_components.py/0 | {
"file_path": "tokenizers/bindings/python/examples/custom_components.py",
"repo_id": "tokenizers",
"token_count": 1292
} | 303 |
import json
import os
from typing import Iterator, List, Optional, Union, Tuple
from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers
from tokenizers.models import Unigram
from .base_tokenizer import BaseTokenizer
class SentencePieceUnigramTokenizer(BaseTokenizer):
... | tokenizers/bindings/python/py_src/tokenizers/implementations/sentencepiece_unigram.py/0 | {
"file_path": "tokenizers/bindings/python/py_src/tokenizers/implementations/sentencepiece_unigram.py",
"repo_id": "tokenizers",
"token_count": 3405
} | 304 |
import transformers
from tokenizers.implementations import SentencePieceUnigramTokenizer, BaseTokenizer
from tokenizers.processors import TemplateProcessing
from tokenizers.models import Unigram, BPE
from tokenizers import decoders
from tokenizers import Tokenizer, Regex
from tokenizers.normalizers import (
StripAc... | tokenizers/bindings/python/scripts/convert.py/0 | {
"file_path": "tokenizers/bindings/python/scripts/convert.py",
"repo_id": "tokenizers",
"token_count": 6303
} | 305 |
use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
mod iterators;
mod normalization;
mod pretokenization;
mod regex;
pub mod serde_pyo3;
pub use iterators::*;
pub use normalization::*;
pub use pretokenization::*;
pub use regex::*;
// RefMut utils
pub trait DestroyPtr {
fn destroy(&mut self);
}
pub stru... | tokenizers/bindings/python/src/utils/mod.rs/0 | {
"file_path": "tokenizers/bindings/python/src/utils/mod.rs",
"repo_id": "tokenizers",
"token_count": 752
} | 306 |
import copy
import os
import pickle
import pytest
from tokenizers import (
AddedToken,
SentencePieceUnigramTokenizer,
Tokenizer,
models,
normalizers,
pre_tokenizers,
trainers,
)
from ..utils import data_dir, train_files, DATA_PATH
class TestBpeTrainer:
def test_can_modify(self):
... | tokenizers/bindings/python/tests/bindings/test_trainers.py/0 | {
"file_path": "tokenizers/bindings/python/tests/bindings/test_trainers.py",
"repo_id": "tokenizers",
"token_count": 4991
} | 307 |
# Added Tokens
<tokenizerslangcontent>
<python>
## AddedToken
[[autodoc]] tokenizers.AddedToken
- content
- lstrip
- normalized
- rstrip
- single_word
</python>
<rust>
The Rust API Reference is available directly on the [Docs.rs](https://docs.rs/tokenizers/latest/tokenizers/) website.
</rust>
<nod... | tokenizers/docs/source-doc-builder/api/added-tokens.mdx/0 | {
"file_path": "tokenizers/docs/source-doc-builder/api/added-tokens.mdx",
"repo_id": "tokenizers",
"token_count": 134
} | 308 |
# Quicktour
Let's have a quick look at the 🤗 Tokenizers library features. The
library provides an implementation of today's most used tokenizers that
is both easy to use and blazing fast.
## Build a tokenizer from scratch
To illustrate how fast the 🤗 Tokenizers library is, let's train a new
tokenizer on [wikitext-... | tokenizers/docs/source-doc-builder/quicktour.mdx/0 | {
"file_path": "tokenizers/docs/source-doc-builder/quicktour.mdx",
"repo_id": "tokenizers",
"token_count": 7936
} | 309 |
Components
====================================================================================================
When building a Tokenizer, you can attach various types of components to this Tokenizer in order
to customize its behavior. This page lists most provided components.
.. _normalizers:
.. entities:: python
... | tokenizers/docs/source/components.rst/0 | {
"file_path": "tokenizers/docs/source/components.rst",
"repo_id": "tokenizers",
"token_count": 4223
} | 310 |
<p align="center">
<br>
<img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/>
<br>
<p>
<p align="center">
<img alt="Build" src="https://github.com/huggingface/tokenizers/workflows/Rust/badge.svg">
<a href="https://github.com/huggingface/tokenizers/blob/master/... | tokenizers/tokenizers/README.tpl/0 | {
"file_path": "tokenizers/tokenizers/README.tpl",
"repo_id": "tokenizers",
"token_count": 259
} | 311 |
pub mod bpe;
pub mod byte_fallback;
pub mod ctc;
pub mod fuse;
pub mod sequence;
pub mod strip;
pub mod wordpiece;
// Re-export these as decoders
pub use super::pre_tokenizers::byte_level;
pub use super::pre_tokenizers::metaspace;
use serde::{Deserialize, Deserializer, Serialize};
use crate::decoders::bpe::BPEDecode... | tokenizers/tokenizers/src/decoders/mod.rs/0 | {
"file_path": "tokenizers/tokenizers/src/decoders/mod.rs",
"repo_id": "tokenizers",
"token_count": 4660
} | 312 |
use ahash::AHashMap;
use std::hash::Hash;
#[derive(Default)]
pub struct TrieBuilder<Label> {
trie: Trie<Label>,
}
impl<Label: Eq + Hash + Copy> TrieBuilder<Label> {
pub fn push(&mut self, element: &[Label]) {
self.trie.push(element);
}
pub fn build(self) -> Trie<Label> {
self.trie
... | tokenizers/tokenizers/src/models/unigram/trie.rs/0 | {
"file_path": "tokenizers/tokenizers/src/models/unigram/trie.rs",
"repo_id": "tokenizers",
"token_count": 945
} | 313 |
use crate::tokenizer::{PreTokenizedString, PreTokenizer, Result, SplitDelimiterBehavior};
use crate::utils::macro_rules_attribute;
use unicode_categories::UnicodeCategories;
fn is_bert_punc(x: char) -> bool {
char::is_ascii_punctuation(&x) || x.is_punctuation()
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[mac... | tokenizers/tokenizers/src/pre_tokenizers/bert.rs/0 | {
"file_path": "tokenizers/tokenizers/src/pre_tokenizers/bert.rs",
"repo_id": "tokenizers",
"token_count": 1460
} | 314 |
use crate::processors::byte_level::process_offsets;
use crate::tokenizer::{Encoding, PostProcessor, Result};
use ahash::AHashMap;
use serde::{Deserialize, Serialize};
use std::iter::FromIterator;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "type")]
pub struct RobertaProcessing {
pu... | tokenizers/tokenizers/src/processors/roberta.rs/0 | {
"file_path": "tokenizers/tokenizers/src/processors/roberta.rs",
"repo_id": "tokenizers",
"token_count": 8583
} | 315 |
use crate::parallelism::*;
use crate::tokenizer::{Encoding, Result};
use serde::{Deserialize, Serialize};
/// The various possible padding directions.
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum PaddingDirection {
Left,
Right,
}
impl std::convert::AsRef<str> for PaddingDirection {
fn as... | tokenizers/tokenizers/src/utils/padding.rs/0 | {
"file_path": "tokenizers/tokenizers/src/utils/padding.rs",
"repo_id": "tokenizers",
"token_count": 2050
} | 316 |
It's super simple to translate from existing code! Just like the python library, we support the `pipeline` API. Pipelines group together a pretrained model with preprocessing of inputs and postprocessing of outputs, making it the easiest way to run models with the library.
<table>
<tr>
<th width="440px" align="center... | transformers.js/docs/snippets/1_quick-tour.snippet/0 | {
"file_path": "transformers.js/docs/snippets/1_quick-tour.snippet",
"repo_id": "transformers.js",
"token_count": 837
} | 317 |
# Building a browser extension
*Full tutorial coming soon...* In the meantime, check out the example application: https://github.com/huggingface/transformers.js/tree/main/examples/extension
| transformers.js/docs/source/tutorials/browser-extension.md/0 | {
"file_path": "transformers.js/docs/source/tutorials/browser-extension.md",
"repo_id": "transformers.js",
"token_count": 50
} | 318 |
import { env, pipeline } from '@xenova/transformers';
// Skip local model check since we are downloading the model from the Hugging Face Hub.
env.allowLocalModels = false;
class MyFeatureExtractionPipeline {
static task = 'feature-extraction';
static model = 'nomic-ai/nomic-embed-text-v1.5';
static instan... | transformers.js/examples/adaptive-retrieval/src/worker.js/0 | {
"file_path": "transformers.js/examples/adaptive-retrieval/src/worker.js",
"repo_id": "transformers.js",
"token_count": 595
} | 319 |
{
"name": "electron",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "electron",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@xenova/transformers": "^2.6.2",
"electron-squirrel-startup": "^1.0.0"
},
"... | transformers.js/examples/electron/package-lock.json/0 | {
"file_path": "transformers.js/examples/electron/package-lock.json",
"repo_id": "transformers.js",
"token_count": 127856
} | 320 |
/* Styles go here */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
h1 {
font-size: 40px;
text-align: center;
font-weight: 500;
}
h2 {
font-size: 20px;
text-align: center;
font-weight: 400;
margin-bottom: 16px;
}
.container {
w... | transformers.js/examples/extension/src/popup.css/0 | {
"file_path": "transformers.js/examples/extension/src/popup.css",
"repo_id": "transformers.js",
"token_count": 314
} | 321 |
import { SamModel, AutoProcessor, RawImage, Tensor } from '@huggingface/transformers';
// We adopt the singleton pattern to enable lazy-loading of the model and processor.
export class SegmentAnythingSingleton {
static model_id = 'Xenova/slimsam-77-uniform';
static model;
static processor;
static getI... | transformers.js/examples/segment-anything-client/worker.js/0 | {
"file_path": "transformers.js/examples/segment-anything-client/worker.js",
"repo_id": "transformers.js",
"token_count": 1374
} | 322 |
# syntax=docker/dockerfile:1.4
# Adapted from https://github.com/vercel/next.js/blob/e60a1e747c3f521fc24dfd9ee2989e13afeb0a9b/examples/with-docker/Dockerfile
# For more information, see https://nextjs.org/docs/pages/building-your-application/deploying#docker-image
FROM node:18 AS base
# Install dependencies only whe... | transformers.js/examples/semantic-image-search/Dockerfile/0 | {
"file_path": "transformers.js/examples/semantic-image-search/Dockerfile",
"repo_id": "transformers.js",
"token_count": 743
} | 323 |
import './globals.css'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })
export const metadata = {
title: 'Semantic Image Search',
description: 'Search for images using text (built w/ Transformers.js and Supabase)',
}
export default function RootLayout({ children }) {
return ... | transformers.js/examples/semantic-image-search/src/app/layout.js/0 | {
"file_path": "transformers.js/examples/semantic-image-search/src/app/layout.js",
"repo_id": "transformers.js",
"token_count": 139
} | 324 |
<!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 background removal</title>
</head>
<body>
<h1>
Real-time background removal w/
<a href="https://github.com/huggingface/transforme... | transformers.js/examples/webgpu-video-background-removal/index.html/0 | {
"file_path": "transformers.js/examples/webgpu-video-background-removal/index.html",
"repo_id": "transformers.js",
"token_count": 553
} | 325 |
import {
AutoTokenizer,
AutoProcessor,
WhisperForConditionalGeneration,
TextStreamer,
full,
} from '@huggingface/transformers';
const MAX_NEW_TOKENS = 64;
/**
* This class uses the Singleton pattern to ensure that only one instance of the model is loaded.
*/
class AutomaticSpeechRecognitionPip... | transformers.js/examples/webgpu-whisper/src/worker.js/0 | {
"file_path": "transformers.js/examples/webgpu-whisper/src/worker.js",
"repo_id": "transformers.js",
"token_count": 1466
} | 326 |
import { pipeline } from '@xenova/transformers';
const PER_DEVICE_CONFIG = {
webgpu: {
dtype: {
encoder_model: 'fp32',
decoder_model_merged: 'q4',
},
device: 'webgpu',
},
wasm: {
dtype: 'q8',
device: 'wasm',
},
};
/**
* This class uses ... | transformers.js/examples/whisper-word-timestamps/src/worker.js/0 | {
"file_path": "transformers.js/examples/whisper-word-timestamps/src/worker.js",
"repo_id": "transformers.js",
"token_count": 970
} | 327 |
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
export default {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
// bail: 0,
// Automatically clear mo... | transformers.js/jest.config.mjs/0 | {
"file_path": "transformers.js/jest.config.mjs",
"repo_id": "transformers.js",
"token_count": 1658
} | 328 |
import { FEATURE_EXTRACTOR_NAME, GITHUB_ISSUE_URL } from '../../utils/constants.js';
import { getModelJSON } from '../../utils/hub.js';
import { FeatureExtractor } from '../../base/feature_extraction_utils.js';
import * as AllFeatureExtractors from '../feature_extractors.js';
export class AutoFeatureExtractor {
... | transformers.js/src/models/auto/feature_extraction_auto.js/0 | {
"file_path": "transformers.js/src/models/auto/feature_extraction_auto.js",
"repo_id": "transformers.js",
"token_count": 367
} | 329 |
import { FeatureExtractor, validate_audio_inputs } from '../../base/feature_extraction_utils.js';
import { Tensor } from '../../utils/tensor.js';
export class EncodecFeatureExtractor extends FeatureExtractor {
/**
* Asynchronously extracts input values from a given audio using the provided configuration.
... | transformers.js/src/models/encodec/feature_extraction_encodec.js/0 | {
"file_path": "transformers.js/src/models/encodec/feature_extraction_encodec.js",
"repo_id": "transformers.js",
"token_count": 526
} | 330 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
export class LlavaOnevisionImageProcessor extends ImageProcessor {}
| transformers.js/src/models/llava_onevision/image_processing_llava_onevision.js/0 | {
"file_path": "transformers.js/src/models/llava_onevision/image_processing_llava_onevision.js",
"repo_id": "transformers.js",
"token_count": 45
} | 331 |
import {
ImageProcessor,
} from "../../base/image_processors_utils.js";
import { cat, interpolate_4d, slice, stack, Tensor } from "../../utils/tensor.js";
const IMAGE_SIZE = 336;
const SLICE_AXES = [2, 3]; // axes to slice on
const { ceil, floor, sqrt } = Math;
export class Phi3VImageProcessor extends ImageProces... | transformers.js/src/models/phi3_v/image_processing_phi3_v.js/0 | {
"file_path": "transformers.js/src/models/phi3_v/image_processing_phi3_v.js",
"repo_id": "transformers.js",
"token_count": 3116
} | 332 |
export { Idefics3Processor as SmolVLMProcessor } from "../idefics3/processing_idefics3.js";
| transformers.js/src/models/smolvlm/processing_smolvlm.js/0 | {
"file_path": "transformers.js/src/models/smolvlm/processing_smolvlm.js",
"repo_id": "transformers.js",
"token_count": 35
} | 333 |
import { GenerationConfig } from "../../generation/configuration_utils.js";
export class WhisperGenerationConfig extends GenerationConfig {
/**
* Whether to return the timestamps with the text. This enables the `WhisperTimestampsLogitsProcessor`.
* @type {boolean}
*/
return_timestamps = null;
... | transformers.js/src/models/whisper/generation_whisper.js/0 | {
"file_path": "transformers.js/src/models/whisper/generation_whisper.js",
"repo_id": "transformers.js",
"token_count": 1043
} | 334 |
/**
* @file Helper module for mathematical processing.
*
* These functions and classes are only used internally,
* meaning an end-user shouldn't need to access anything here.
*
* @module utils/maths
*/
/**
* @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uin... | transformers.js/src/utils/maths.js/0 | {
"file_path": "transformers.js/src/utils/maths.js",
"repo_id": "transformers.js",
"token_count": 16619
} | 335 |
import { AutoImageProcessor, DonutFeatureExtractor } 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 () => {
// DonutFeatureExtractor
// - tests thumbnail resizing (do_t... | transformers.js/tests/models/donut/test_image_processing_donut.js/0 | {
"file_path": "transformers.js/tests/models/donut/test_image_processing_donut.js",
"repo_id": "transformers.js",
"token_count": 493
} | 336 |
import { AutoFeatureExtractor, SeamlessM4TFeatureExtractor } 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";
const sum = (array) => Number(array.reduce((a, b) => a + b, array instan... | transformers.js/tests/models/seamless_m4t/test_feature_extraction_seamless_m4t.js/0 | {
"file_path": "transformers.js/tests/models/seamless_m4t/test_feature_extraction_seamless_m4t.js",
"repo_id": "transformers.js",
"token_count": 1089
} | 337 |
import { pipeline, SummarizationPipeline } from "../../src/transformers.js";
import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js";
const PIPELINE_ID = "summarization";
export default () => {
describe("Summarization", () => {
const model_id = "... | transformers.js/tests/pipelines/test_pipelines_summarization.js/0 | {
"file_path": "transformers.js/tests/pipelines/test_pipelines_summarization.js",
"repo_id": "transformers.js",
"token_count": 509
} | 338 |
import { AutoModel, PreTrainedModel } from "../../src/models.js";
import { MAX_TEST_EXECUTION_TIME, DEFAULT_MODEL_OPTIONS } from "../init.js";
import fs from "node:fs";
// TODO: Set cache folder to a temp directory
describe("Hub", () => {
describe("Loading models", () => {
it(
"should load a model from t... | transformers.js/tests/utils/hub.test.js/0 | {
"file_path": "transformers.js/tests/utils/hub.test.js",
"repo_id": "transformers.js",
"token_count": 768
} | 339 |
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 cmake wget xz-utils build-essential g++5 libprotobuf-dev protobuf-compiler
ENV UV_PYTHON=/usr/local/bin/python
RUN pip --no-cache-dir install uv && uv pip install --no-ca... | transformers/docker/custom-tokenizers.dockerfile/0 | {
"file_path": "transformers/docker/custom-tokenizers.dockerfile",
"repo_id": "transformers",
"token_count": 576
} | 340 |
FROM rocm/pytorch:rocm6.4.1_ubuntu24.04_py3.12_pytorch_release_2.7.1
LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install -y --no-install-recommends git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-dev python3-pip python3-dev ffmpeg git-lfs && \
apt cle... | transformers/docker/transformers-pytorch-amd-gpu/Dockerfile/0 | {
"file_path": "transformers/docker/transformers-pytorch-amd-gpu/Dockerfile",
"repo_id": "transformers",
"token_count": 568
} | 341 |
- sections:
- local: index
title: 🤗 المحولات
- local: quicktour
title: جولة سريعة
- local: installation
title: التثبيت
title: البدء
- sections:
- local: pipeline_tutorial
title: تشغيل الاستنتاج باستخدام خطوط الأنابيب
- local: autoclass_tutorial
title: كتابة تعليمات برمجية متكيفه باستخدا... | transformers/docs/source/ar/_toctree.yml/0 | {
"file_path": "transformers/docs/source/ar/_toctree.yml",
"repo_id": "transformers",
"token_count": 15670
} | 342 |
# التوليد باستخدام نماذج اللغات الكبيرة (LLMs)
[[open-in-colab]]
تعد LLMs، أو نماذج اللغة الكبيرة، المكون الرئيسي وراء توليد النصوص. وباختصار، تتكون من نماذج محول كبيرة مسبقة التدريب تم تدريبها للتنبؤ بالكلمة التالية (أو، بشكل أكثر دقة، الرمز اللغوي) بالنظر إلى نص معين. نظرًا لأنها تتنبأ برمز واحد في كل مرة، يجب عليك... | transformers/docs/source/ar/llm_tutorial.md/0 | {
"file_path": "transformers/docs/source/ar/llm_tutorial.md",
"repo_id": "transformers",
"token_count": 9367
} | 343 |
# التدريب باستخدام نص برمجى
بالإضافة إلى دفاتر الملاحظات [notebooks](./notebooks) الخاصة بـ 🤗 Transformers، هناك أيضًا نصوص برمجية توضيحية تُظهر كيفية تدريب نموذج لمهمة باستخدام [PyTorch](https://github.com/huggingface/transformers/tree/main/examples/pytorch) أو [TensorFlow](https://github.com/huggingface/transformer... | transformers/docs/source/ar/run_scripts.md/0 | {
"file_path": "transformers/docs/source/ar/run_scripts.md",
"repo_id": "transformers",
"token_count": 10151
} | 344 |
# التصدير إلى TorchScript
<Tip>
هذه هي بداية تجاربنا مع TorchScript ولا زلنا نستكشف قدراته مع نماذج المدخلات المتغيرة الحجم. إنه مجال اهتمامنا وسنعمق تحليلنا في الإصدارات القادمة، مع المزيد من الأمثلة البرمجية، وتنفيذ أكثر مرونة، ومقاييس مقارنة بين الأكواد القائمة على Python مع أكواد TorchScript المُجمّعة.
</Tip>
... | transformers/docs/source/ar/torchscript.md/0 | {
"file_path": "transformers/docs/source/ar/torchscript.md",
"repo_id": "transformers",
"token_count": 5475
} | 345 |
<!--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/pipeline_tutorial.md/0 | {
"file_path": "transformers/docs/source/de/pipeline_tutorial.md",
"repo_id": "transformers",
"token_count": 3003
} | 346 |
<!--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/auto_docstring.md/0 | {
"file_path": "transformers/docs/source/en/auto_docstring.md",
"repo_id": "transformers",
"token_count": 4541
} | 347 |
<!--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/feature_extractors.md/0 | {
"file_path": "transformers/docs/source/en/feature_extractors.md",
"repo_id": "transformers",
"token_count": 2914
} | 348 |
<!--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/internal/model_debugging_utils.md/0 | {
"file_path": "transformers/docs/source/en/internal/model_debugging_utils.md",
"repo_id": "transformers",
"token_count": 6484
} | 349 |
<!--Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... | transformers/docs/source/en/main_classes/executorch.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/executorch.md",
"repo_id": "transformers",
"token_count": 500
} | 350 |
<!--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/main_classes/video_processor.md/0 | {
"file_path": "transformers/docs/source/en/main_classes/video_processor.md",
"repo_id": "transformers",
"token_count": 886
} | 351 |
<!--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/beit.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/beit.md",
"repo_id": "transformers",
"token_count": 3487
} | 352 |
<!--Copyright 2023 The Intel Labs Team Authors, The Microsoft Research Team Authors and 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... | transformers/docs/source/en/model_doc/bridgetower.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/bridgetower.md",
"repo_id": "transformers",
"token_count": 2519
} | 353 |
<!--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/colpali.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/colpali.md",
"repo_id": "transformers",
"token_count": 1996
} | 354 |
<!--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/deberta-v2.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/deberta-v2.md",
"repo_id": "transformers",
"token_count": 1805
} | 355 |
<!--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/dialogpt.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/dialogpt.md",
"repo_id": "transformers",
"token_count": 884
} | 356 |
<!--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/electra.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/electra.md",
"repo_id": "transformers",
"token_count": 1712
} | 357 |
<!--Copyright 2024 The GLM & ZhipuAI team and The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required ... | transformers/docs/source/en/model_doc/glm.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/glm.md",
"repo_id": "transformers",
"token_count": 1600
} | 358 |
<!--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/granite.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/granite.md",
"repo_id": "transformers",
"token_count": 1752
} | 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/en/model_doc/ibert.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/ibert.md",
"repo_id": "transformers",
"token_count": 1042
} | 360 |
<!--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/kyutai_speech_to_text.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/kyutai_speech_to_text.md",
"repo_id": "transformers",
"token_count": 1472
} | 361 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | transformers/docs/source/en/model_doc/llava_next_video.md/0 | {
"file_path": "transformers/docs/source/en/model_doc/llava_next_video.md",
"repo_id": "transformers",
"token_count": 4326
} | 362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.