text
stringlengths
5
409k
id
stringlengths
14
178
metadata
dict
__index_level_0__
int64
0
572
use crate::config::Config; use clap::ValueEnum; use csv::ReaderBuilder; use reqwest::header::HeaderMap; use serde::Serialize; use std::{ fs::File, io::{self, BufRead}, path::Path, process::Command, time::Duration, }; use uuid::Uuid; const TELEMETRY_URL: &str = "https://huggingface.co/api/telemetry/...
text-generation-inference/router/src/usage_stats.rs/0
{ "file_path": "text-generation-inference/router/src/usage_stats.rs", "repo_id": "text-generation-inference", "token_count": 5353 }
269
# Text Generation Inference Python gRPC Server A Python gRPC server for Text Generation Inference ## Install ```shell make install ``` ## Run ```shell make run-dev ```
text-generation-inference/server/README.md/0
{ "file_path": "text-generation-inference/server/README.md", "repo_id": "text-generation-inference", "token_count": 56 }
270
// Adapted from turboderp exllama: https://github.com/turboderp/exllama #ifndef _matrix_cuh #define _matrix_cuh #include <cuda_runtime.h> #include <cuda_fp16.h> class MatrixView_half { public: const half* data; const int height; const int width; __device__ __forceinline__ MatrixView_half(const half*...
text-generation-inference/server/exllama_kernels/exllama_kernels/matrix.cuh/0
{ "file_path": "text-generation-inference/server/exllama_kernels/exllama_kernels/matrix.cuh", "repo_id": "text-generation-inference", "token_count": 5380 }
271
#ifndef _qdq_4_cuh #define _qdq_4_cuh #include "qdq_util.cuh" #include "../../config.h" #if QMODE_4BIT == 1 // Permutation: // // 77775555 33331111 66664444 22220000 __forceinline__ __device__ void shuffle_4bit_8 ( uint32_t* q, int stride ) { uint32_t qa = q[0]; uint32_t qb = 0; #pragma unroll...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_4.cuh/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_4.cuh", "repo_id": "text-generation-inference", "token_count": 3279 }
272
import pytest import torch from copy import copy from transformers import AutoTokenizer from text_generation_server.pb import generate_pb2 from text_generation_server.models.causal_lm import CausalLMBatch from text_generation_server.utils import weight_hub_files, download_weights from text_generation_server.models.bl...
text-generation-inference/server/tests/models/test_bloom.py/0
{ "file_path": "text-generation-inference/server/tests/models/test_bloom.py", "repo_id": "text-generation-inference", "token_count": 5403 }
273
# Origin: https://github.com/predibase/lorax # Path: lorax/server/lorax_server/adapters/weights.py # License: Apache License Version 2.0, January 2004 from abc import ABC, abstractclassmethod from collections import defaultdict from dataclasses import dataclass from typing import Dict, List, Optional, Set, Type...
text-generation-inference/server/text_generation_server/adapters/weights.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/adapters/weights.py", "repo_id": "text-generation-inference", "token_count": 1824 }
274
from typing import Optional import torch import torch.nn as nn import intel_extension_for_pytorch as ipex class WQLinear(nn.Module): def __init__( self, w_bit, group_size, qweight, qzeros, scales, bias: Optional[torch.Tensor] ): super().__init__() if w_bit not in [4]: rais...
text-generation-inference/server/text_generation_server/layers/awq/quantize/ipex.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/awq/quantize/ipex.py", "repo_id": "text-generation-inference", "token_count": 778 }
275
import math import numpy as np import torch import torch.nn as nn import intel_extension_for_pytorch as ipex class QuantLinear(nn.Module): def __init__(self, qweight, qzeros, scales, g_idx, bias, bits, groupsize): super().__init__() self.register_buffer("qweight", qweight) self.register_b...
text-generation-inference/server/text_generation_server/layers/gptq/ipex.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/gptq/ipex.py", "repo_id": "text-generation-inference", "token_count": 2335 }
276
# coding=utf-8 # Copyright 2023, 2024 DeepSeek-AI and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
text-generation-inference/server/text_generation_server/layers/moe/fused_moe_ipex.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/moe/fused_moe_ipex.py", "repo_id": "text-generation-inference", "token_count": 920 }
277
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
text-generation-inference/server/text_generation_server/models/custom_modeling/flash_gemma2_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_gemma2_modeling.py", "repo_id": "text-generation-inference", "token_count": 9377 }
278
# 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/idefics3.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/idefics3.py", "repo_id": "text-generation-inference", "token_count": 10719 }
279
from typing import Optional, Tuple import warnings import math import torch from torch import nn from transformers.activations import ACT2FN from transformers.modeling_outputs import ( BaseModelOutputWithPooling, ) from transformers import SiglipConfig, SiglipVisionConfig from torch.nn.init import _calculate_fan_i...
text-generation-inference/server/text_generation_server/models/custom_modeling/siglip.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/siglip.py", "repo_id": "text-generation-inference", "token_count": 6676 }
280
from typing import Optional SUPPORT_CHUNKING: Optional[bool] = None MAX_PREFILL_TOKENS: Optional[int] = None def set_support_chunking(support_chunking: bool): global SUPPORT_CHUNKING SUPPORT_CHUNKING = support_chunking def get_support_chunking() -> bool: global SUPPORT_CHUNKING return SUPPORT_CHUNK...
text-generation-inference/server/text_generation_server/utils/prefill_chunking.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/prefill_chunking.py", "repo_id": "text-generation-inference", "token_count": 221 }
281
parser: '@typescript-eslint/parser' parserOptions: ecmaFeatures: jsx: true ecmaVersion: latest sourceType: module project: ./tsconfig.json env: browser: true es6: true node: true jest: true ignorePatterns: ['index.js', 'target/'] plugins: - import - '@typescript-eslint' extends: - eslint:...
tokenizers/bindings/node/.eslintrc.yml/0
{ "file_path": "tokenizers/bindings/node/.eslintrc.yml", "repo_id": "tokenizers", "token_count": 2733 }
282
/* eslint-disable prettier/prettier */ // For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html module.exports = { // All imported modules in your tests should be mocked automatically // automock: false, // Stop running tests after `n` failures ...
tokenizers/bindings/node/jest.config.js/0
{ "file_path": "tokenizers/bindings/node/jest.config.js", "repo_id": "tokenizers", "token_count": 1715 }
283
# `tokenizers-darwin-arm64` This is the **aarch64-apple-darwin** binary for `tokenizers`
tokenizers/bindings/node/npm/darwin-arm64/README.md/0
{ "file_path": "tokenizers/bindings/node/npm/darwin-arm64/README.md", "repo_id": "tokenizers", "token_count": 33 }
284
# `tokenizers-win32-arm64-msvc` This is the **aarch64-pc-windows-msvc** binary for `tokenizers`
tokenizers/bindings/node/npm/win32-arm64-msvc/README.md/0
{ "file_path": "tokenizers/bindings/node/npm/win32-arm64-msvc/README.md", "repo_id": "tokenizers", "token_count": 38 }
285
pub mod models; pub mod tokenizer;
tokenizers/bindings/node/src/tasks/mod.rs/0
{ "file_path": "tokenizers/bindings/node/src/tasks/mod.rs", "repo_id": "tokenizers", "token_count": 11 }
286
import os import time import argparse from datasets import load_dataset from tiktoken.load import load_tiktoken_bpe import tiktoken from tokenizers import Tokenizer from huggingface_hub import hf_hub_download from typing import Tuple, List from multiprocessing import Process MODEL_ID = "meta-llama/Meta-Llama-3.1-8B" D...
tokenizers/bindings/python/benches/test_tiktoken.py/0
{ "file_path": "tokenizers/bindings/python/benches/test_tiktoken.py", "repo_id": "tokenizers", "token_count": 2288 }
287
from typing import Dict, Iterator, List, Optional, Tuple, Union from .. import AddedToken, Tokenizer, decoders, pre_tokenizers, trainers from ..models import BPE from ..normalizers import BertNormalizer, Lowercase, Sequence, unicode_normalizer_from_str from .base_tokenizer import BaseTokenizer class CharBPETokenizer...
tokenizers/bindings/python/py_src/tokenizers/implementations/char_level_bpe.py/0
{ "file_path": "tokenizers/bindings/python/py_src/tokenizers/implementations/char_level_bpe.py", "repo_id": "tokenizers", "token_count": 2509 }
288
[project] name = "tokenizers" requires-python = ">=3.9" authors = [ { name = "Nicolas Patry", email = "patry.nicolas@protonmail.com" }, { name = "Anthony Moi", email = "anthony@huggingface.co" }, ] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audi...
tokenizers/bindings/python/pyproject.toml/0
{ "file_path": "tokenizers/bindings/python/pyproject.toml", "repo_id": "tokenizers", "token_count": 684 }
289
use std::sync::{Arc, RwLock}; use crate::models::PyModel; use crate::tokenizer::PyAddedToken; use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; use serde::{Deserialize, Serialize}; use tk::models::TrainerWrapper; use tk::Trainer; use tokenizers as tk; /// Base class for all trainers /// /// This class i...
tokenizers/bindings/python/src/trainers.rs/0
{ "file_path": "tokenizers/bindings/python/src/trainers.rs", "repo_id": "tokenizers", "token_count": 17933 }
290
import json import pickle import pytest from tokenizers import Tokenizer from tokenizers.models import BPE from tokenizers.pre_tokenizers import ByteLevel as ByteLevelPreTokenizer from tokenizers.processors import ( BertProcessing, ByteLevel, PostProcessor, RobertaProcessing, Sequence, Templat...
tokenizers/bindings/python/tests/bindings/test_processors.py/0
{ "file_path": "tokenizers/bindings/python/tests/bindings/test_processors.py", "repo_id": "tokenizers", "token_count": 4406 }
291
## Requirements In order to generate the documentation, it is necessary to have a Python environment with the following: ```python pip install sphinx sphinx_rtd_theme setuptools_rust ``` It is also necessary to have the `tokenizers` library in this same environment, for Sphinx to generate all the API Reference and li...
tokenizers/docs/README.md/0
{ "file_path": "tokenizers/docs/README.md", "repo_id": "tokenizers", "token_count": 266 }
292
# Installation <tokenizerslangcontent> <python> 🤗 Tokenizers is tested on Python 3.5+. You should install 🤗 Tokenizers in a [virtual environment](https://docs.python.org/3/library/venv.html). If you're unfamiliar with Python virtual environments, check out the [user guide](https://packaging.python.org/guides/instal...
tokenizers/docs/source-doc-builder/installation.mdx/0
{ "file_path": "tokenizers/docs/source-doc-builder/installation.mdx", "repo_id": "tokenizers", "token_count": 553 }
293
.. only:: python .. include:: python.inc .. only:: rust .. include:: rust.inc .. only:: node .. include:: node.inc
tokenizers/docs/source/api/reference.rst/0
{ "file_path": "tokenizers/docs/source/api/reference.rst", "repo_id": "tokenizers", "token_count": 47 }
294
DATA_DIR = data BENCHMARK_DIR = benches TESTS_DIR = tests dir_guard=@mkdir -p $(@D) SHARED_RESOURCES = $(DATA_DIR)/gpt2-vocab.json $(DATA_DIR)/gpt2-merges.txt $(DATA_DIR)/bert-base-uncased-vocab.txt $(DATA_DIR)/big.txt $(DATA_DIR)/small.txt $(DATA_DIR)/albert-base-v1-tokenizer.json $(DATA_DIR)/llama-3-tokenizer.json...
tokenizers/tokenizers/Makefile/0
{ "file_path": "tokenizers/tokenizers/Makefile", "repo_id": "tokenizers", "token_count": 1019 }
295
//! Test suite for the Web and headless browsers. #![cfg(target_arch = "wasm32")] extern crate wasm_bindgen_test; use wasm_bindgen_test::*; wasm_bindgen_test_configure!(run_in_browser); #[wasm_bindgen_test] fn pass() { assert_eq!(1 + 1, 2); }
tokenizers/tokenizers/examples/unstable_wasm/tests/web.rs/0
{ "file_path": "tokenizers/tokenizers/examples/unstable_wasm/tests/web.rs", "repo_id": "tokenizers", "token_count": 109 }
296
use super::model::Unigram; use serde::{ de::{Error, MapAccess, Visitor}, ser::SerializeStruct, Deserialize, Deserializer, Serialize, Serializer, }; impl Serialize for Unigram { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { let mut model ...
tokenizers/tokenizers/src/models/unigram/serialization.rs/0
{ "file_path": "tokenizers/tokenizers/src/models/unigram/serialization.rs", "repo_id": "tokenizers", "token_count": 1824 }
297
use crate::tokenizer::{NormalizedString, Normalizer, Result}; use crate::utils::macro_rules_attribute; #[derive(Default, Copy, Clone, Debug)] #[macro_rules_attribute(impl_serde_type!)] pub struct NFD; impl Normalizer for NFD { fn normalize(&self, normalized: &mut NormalizedString) -> Result<()> { normalize...
tokenizers/tokenizers/src/normalizers/unicode.rs/0
{ "file_path": "tokenizers/tokenizers/src/normalizers/unicode.rs", "repo_id": "tokenizers", "token_count": 1317 }
298
pub mod bert; pub mod roberta; pub mod sequence; pub mod template; // Re-export these as processors pub use super::pre_tokenizers::byte_level; use serde::{Deserialize, Serialize}; use crate::pre_tokenizers::byte_level::ByteLevel; use crate::processors::bert::BertProcessing; use crate::processors::roberta::RobertaPro...
tokenizers/tokenizers/src/processors/mod.rs/0
{ "file_path": "tokenizers/tokenizers/src/processors/mod.rs", "repo_id": "tokenizers", "token_count": 2147 }
299
use crate::tokenizer::pattern::Pattern; use crate::{Offsets, Result}; use onig::Regex; use std::error::Error; #[derive(Debug)] pub struct SysRegex { regex: Regex, } impl SysRegex { pub fn find_iter<'r, 't>(&'r self, inside: &'t str) -> onig::FindMatches<'r, 't> { self.regex.find_iter(inside) } ...
tokenizers/tokenizers/src/utils/onig.rs/0
{ "file_path": "tokenizers/tokenizers/src/utils/onig.rs", "repo_id": "tokenizers", "token_count": 571 }
300
To install via [NPM](https://www.npmjs.com/package/@huggingface/transformers), run: ```bash npm i @huggingface/transformers ``` Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Gu...
transformers.js/docs/snippets/2_installation.snippet/0
{ "file_path": "transformers.js/docs/snippets/2_installation.snippet", "repo_id": "transformers.js", "token_count": 176 }
301
# Building an Electron application *Full tutorial coming soon...* In the meantime, check out the example application: https://github.com/huggingface/transformers.js/tree/main/examples/electron
transformers.js/docs/source/tutorials/electron.md/0
{ "file_path": "transformers.js/docs/source/tutorials/electron.md", "repo_id": "transformers.js", "token_count": 51 }
302
/** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], }
transformers.js/examples/adaptive-retrieval/tailwind.config.js/0
{ "file_path": "transformers.js/examples/adaptive-retrieval/tailwind.config.js", "repo_id": "transformers.js", "token_count": 82 }
303
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], })
transformers.js/examples/code-completion/vite.config.js/0
{ "file_path": "transformers.js/examples/code-completion/vite.config.js", "repo_id": "transformers.js", "token_count": 54 }
304
import Chart from 'chart.js/auto'; import Prism from 'prismjs'; // Import code and styles for supported languages import 'prismjs/components/prism-javascript'; import 'prismjs/components/prism-python'; import 'prismjs/components/prism-markdown'; import 'prismjs/components/prism-clike'; import 'prismjs/themes/prism.c...
transformers.js/examples/demo-site/src/main.js/0
{ "file_path": "transformers.js/examples/demo-site/src/main.js", "repo_id": "transformers.js", "token_count": 9224 }
305
{ "name": "electron", "productName": "electron", "version": "1.0.0", "description": "Transformers.js sample Electron application", "main": "src/index.js", "scripts": { "start": "electron-forge start", "package": "electron-forge package", "make": "electron-forge make", "publish": "electron-fo...
transformers.js/examples/electron/package.json/0
{ "file_path": "transformers.js/examples/electron/package.json", "repo_id": "transformers.js", "token_count": 361 }
306
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Transformers.js | Sample Browser Extension</title> <!-- Load styles --> <link rel="stylesheet" href...
transformers.js/examples/extension/src/popup.html/0
{ "file_path": "transformers.js/examples/extension/src/popup.html", "repo_id": "transformers.js", "token_count": 246 }
307
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev # or pnpm dev ``` Open [http://localhost:3000](http://localhost:3000...
transformers.js/examples/next-client/README.md/0
{ "file_path": "transformers.js/examples/next-client/README.md", "repo_id": "transformers.js", "token_count": 414 }
308
# 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/next-server/Dockerfile/0
{ "file_path": "transformers.js/examples/next-server/Dockerfile", "repo_id": "transformers.js", "token_count": 743 }
309
import { pipeline } from '@xenova/transformers'; import wavefile from 'wavefile'; // Load model let transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en'); // Load audio data let url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav'; let buffer = Buff...
transformers.js/examples/node-audio-processing/index.js/0
{ "file_path": "transformers.js/examples/node-audio-processing/index.js", "repo_id": "transformers.js", "token_count": 479 }
310
import { pipeline } from '@xenova/transformers'; /** * This class uses the Singleton pattern to ensure that only one instance of the * pipeline is loaded. This is because loading the pipeline is an expensive * operation and we don't want to do it every time we want to translate a sentence. */ class MyTranslationP...
transformers.js/examples/react-translator/src/worker.js/0
{ "file_path": "transformers.js/examples/react-translator/src/worker.js", "repo_id": "transformers.js", "token_count": 614 }
311
# Semantic Image Search This example shows you how to use Transformers.js to create a semantic image search engine. Check out the demo [here](https://huggingface.co/spaces/Xenova/semantic-image-search). ![Semantic Image Search Demo](https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/semantic-im...
transformers.js/examples/semantic-image-search/README.md/0
{ "file_path": "transformers.js/examples/semantic-image-search/README.md", "repo_id": "transformers.js", "token_count": 1129 }
312
'use client' import { useState } from 'react' import { Modal } from './components/Modal'; import { SearchBar } from './components/SearchBar'; import { ImageGrid } from './components/ImageGrid'; export default function Home() { // Application state const [images, setImages] = useState(null); const [currentImage...
transformers.js/examples/semantic-image-search/src/app/page.js/0
{ "file_path": "transformers.js/examples/semantic-image-search/src/app/page.js", "repo_id": "transformers.js", "token_count": 345 }
313
// Adapted from https://www.npmjs.com/package/audiobuffer-to-wav export function encodeWAV(samples) { let offset = 44; const buffer = new ArrayBuffer(offset + samples.length * 4); const view = new DataView(buffer); const sampleRate = 16000; /* RIFF identifier */ writeString(view, 0, 'RIFF') ...
transformers.js/examples/text-to-speech-client/src/utils.js/0
{ "file_path": "transformers.js/examples/text-to-speech-client/src/utils.js", "repo_id": "transformers.js", "token_count": 574 }
314
// Although not strictly necessary, we delegate the tokenization to a worker thread to avoid // any potential issues with the tokenizer blocking the main thread (especially for large inputs). import { env, AutoTokenizer } from '@xenova/transformers' env.allowLocalModels = false; // This is a map of all the tokenizer...
transformers.js/examples/tokenizer-playground/src/worker.js/0
{ "file_path": "transformers.js/examples/tokenizer-playground/src/worker.js", "repo_id": "transformers.js", "token_count": 1112 }
315
# React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast ...
transformers.js/examples/webgpu-chat/README.md/0
{ "file_path": "transformers.js/examples/webgpu-chat/README.md", "repo_id": "transformers.js", "token_count": 152 }
316
import './style.css'; import { env, AutoModel, AutoProcessor, RawImage } from '@xenova/transformers'; env.backends.onnx.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.17.1/dist/'; env.backends.onnx.wasm.numThreads = 1; // Reference the elements that we will need const status = document.getElementBy...
transformers.js/examples/webgpu-video-background-removal/main.js/0
{ "file_path": "transformers.js/examples/webgpu-video-background-removal/main.js", "repo_id": "transformers.js", "token_count": 1573 }
317
{ "name": "@huggingface/transformers", "version": "3.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@huggingface/transformers", "version": "3.3.3", "license": "Apache-2.0", "dependencies": { "@huggingface/jinja": "^0.3.3", "onnxruntime-no...
transformers.js/package-lock.json/0
{ "file_path": "transformers.js/package-lock.json", "repo_id": "transformers.js", "token_count": 242303 }
318
import { FEATURE_EXTRACTOR_NAME } from "../utils/constants.js"; import { Callable } from "../utils/generic.js"; import { getModelJSON } from "../utils/hub.js"; /** * Base class for feature extractors. */ export class FeatureExtractor extends Callable { /** * Constructs a new FeatureExtractor instance. ...
transformers.js/src/base/feature_extraction_utils.js/0
{ "file_path": "transformers.js/src/base/feature_extraction_utils.js", "repo_id": "transformers.js", "token_count": 822 }
319
import { ImageProcessor, } from "../../base/image_processors_utils.js"; export class BeitFeatureExtractor extends ImageProcessor { }
transformers.js/src/models/beit/image_processing_beit.js/0
{ "file_path": "transformers.js/src/models/beit/image_processing_beit.js", "repo_id": "transformers.js", "token_count": 44 }
320
import { ImageProcessor, } from "../../base/image_processors_utils.js"; import { cat, full, interpolate_4d, slice, stack } from "../../utils/tensor.js"; export class Idefics3ImageProcessor extends ImageProcessor { constructor(config) { super(config); this.do_image_splitting = config.do_image...
transformers.js/src/models/idefics3/image_processing_idefics3.js/0
{ "file_path": "transformers.js/src/models/idefics3/image_processing_idefics3.js", "repo_id": "transformers.js", "token_count": 4606 }
321
import { FeatureExtractor, validate_audio_inputs } from '../../base/feature_extraction_utils.js'; import { Tensor } from '../../utils/tensor.js'; export class MoonshineFeatureExtractor extends FeatureExtractor { /** * Asynchronously extracts input values from a given audio using the provided configuration. ...
transformers.js/src/models/moonshine/feature_extraction_moonshine.js/0
{ "file_path": "transformers.js/src/models/moonshine/feature_extraction_moonshine.js", "repo_id": "transformers.js", "token_count": 364 }
322
import { ImageProcessor, } from "../../base/image_processors_utils.js"; import { calculateDimensions } from "../../utils/core.js"; import { interpolate_4d, Tensor, } from "../../utils/tensor.js"; /** * @typedef {object} SamImageProcessorResult * @property {Tensor} pixel_values * @property {import(".....
transformers.js/src/models/sam/image_processing_sam.js/0
{ "file_path": "transformers.js/src/models/sam/image_processing_sam.js", "repo_id": "transformers.js", "token_count": 4498 }
323
const WHISPER_LANGUAGES = [ ["en", "english"], ["zh", "chinese"], ["de", "german"], ["es", "spanish"], ["ru", "russian"], ["ko", "korean"], ["fr", "french"], ["ja", "japanese"], ["pt", "portuguese"], ["tr", "turkish"], ["pl", "polish"], ["ca", "catalan"], ["nl", "du...
transformers.js/src/models/whisper/common_whisper.js/0
{ "file_path": "transformers.js/src/models/whisper/common_whisper.js", "repo_id": "transformers.js", "token_count": 1848 }
324
/** * @file Utility functions to interact with the Hugging Face Hub (https://huggingface.co/models) * * @module utils/hub */ import fs from 'fs'; import path from 'path'; import { env } from '../env.js'; import { dispatchCallback } from './core.js'; /** * @typedef {Object} PretrainedOptions Options for loadin...
transformers.js/src/utils/hub.js/0
{ "file_path": "transformers.js/src/utils/hub.js", "repo_id": "transformers.js", "token_count": 10053 }
325
import { AutoImageProcessor, BitImageProcessor } 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("BitImageProcessor", () => { const model_id = "Xenova/...
transformers.js/tests/models/bit/test_image_processing_bit.js/0
{ "file_path": "transformers.js/tests/models/bit/test_image_processing_bit.js", "repo_id": "transformers.js", "token_count": 435 }
326
import { AutoImageProcessor, DPTFeatureExtractor, DPTImageProcessor } 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 () => { // DPTFeatureExtractor describe("DPTFeatureE...
transformers.js/tests/models/dpt/test_image_processing_dpt.js/0
{ "file_path": "transformers.js/tests/models/dpt/test_image_processing_dpt.js", "repo_id": "transformers.js", "token_count": 1111 }
327
import { GPTNeoXTokenizer, GPTJForCausalLM } 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("GPTJForCausalLM", () => { const model_id = "hf-internal-testing/tiny-ran...
transformers.js/tests/models/gptj/test_modeling_gptj.js/0
{ "file_path": "transformers.js/tests/models/gptj/test_modeling_gptj.js", "repo_id": "transformers.js", "token_count": 782 }
328
import { MgpstrProcessor, MgpstrForSceneTextRecognition } from "../../../src/transformers.js"; import { load_cached_image } from "../../asset_cache.js"; import { MAX_MODEL_LOAD_TIME, MAX_TEST_EXECUTION_TIME, MAX_MODEL_DISPOSE_TIME, DEFAULT_MODEL_OPTIONS } from "../../init.js"; export default () => { describe("Mgpst...
transformers.js/tests/models/mgp_str/test_modeling_mgp_str.js/0
{ "file_path": "transformers.js/tests/models/mgp_str/test_modeling_mgp_str.js", "repo_id": "transformers.js", "token_count": 1680 }
329
import { AutoProcessor, PaliGemmaProcessor } 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 () => { const model_id = "hf-internal-testing/tiny-random-PaliGemmaForCondition...
transformers.js/tests/models/paligemma/test_processor_paligemma.js/0
{ "file_path": "transformers.js/tests/models/paligemma/test_processor_paligemma.js", "repo_id": "transformers.js", "token_count": 709 }
330
import { pipeline, AutomaticSpeechRecognitionPipeline } 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 = "automatic-speech-recognition"; export default () => { describe("Automatic Speech R...
transformers.js/tests/pipelines/test_pipelines_automatic_speech_recognition.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_automatic_speech_recognition.js", "repo_id": "transformers.js", "token_count": 2373 }
331
import { pipeline, TextToAudioPipeline } 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 = "text-to-audio"; export default () => { describe("Text to Audio", () => { const model_id = "Xe...
transformers.js/tests/pipelines/test_pipelines_text_to_audio.js/0
{ "file_path": "transformers.js/tests/pipelines/test_pipelines_text_to_audio.js", "repo_id": "transformers.js", "token_count": 492 }
332
import { Tensor, cat, stack, layer_norm, ones_like, zeros_like, full_like, rand, std_mean } from "../../src/transformers.js"; import { init } from "../init.js"; import { compare } from "../test_utils.js"; init(); describe("Tensor operations", () => { describe("cat", () => { it("should concatenate on dim=0", () ...
transformers.js/tests/utils/tensor.test.js/0
{ "file_path": "transformers.js/tests/utils/tensor.test.js", "repo_id": "transformers.js", "token_count": 9122 }
333
import argparse import importlib.util import logging import os from typing import Dict import psycopg2 import sys from psycopg2.extras import Json from psycopg2.extensions import register_adapter register_adapter(dict, Json) class ImportModuleException(Exception): pass class MetricsRecorder: def __init__...
transformers/benchmark/benchmarks_entrypoint.py/0
{ "file_path": "transformers/benchmark/benchmarks_entrypoint.py", "repo_id": "transformers", "token_count": 2117 }
334
FROM python:3.9-slim ENV PYTHONDONTWRITEBYTECODE=1 ARG REF=main USER root RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git g++ cmake ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools RUN pip install --no-cache-...
transformers/docker/jax-light.dockerfile/0
{ "file_path": "transformers/docker/jax-light.dockerfile", "repo_id": "transformers", "token_count": 227 }
335
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04 LABEL maintainer="Hugging Face" ARG DEBIAN_FRONTEND=noninteractive RUN apt update RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg RUN python3 -m pip install --no-cache-dir --upgrade pip ARG REF=main RUN git clone https://githu...
transformers/docker/transformers-pytorch-gpu/Dockerfile/0
{ "file_path": "transformers/docker/transformers-pytorch-gpu/Dockerfile", "repo_id": "transformers", "token_count": 611 }
336
# BERTology يُشهد في الآونة الأخيرة نمو مجال دراسي يُعنى باستكشاف آلية عمل نماذج المحولات الضخمة مثل BERT (والذي يُطلق عليها البعض اسم "BERTology"). ومن الأمثلة البارزة على هذا المجال ما يلي: - BERT Rediscovers the Classical NLP Pipeline بواسطة Ian Tenney و Dipanjan Das و Ellie Pavlick: https://arxiv.org/abs/1905.0...
transformers/docs/source/ar/bertology.md/0
{ "file_path": "transformers/docs/source/ar/bertology.md", "repo_id": "transformers", "token_count": 970 }
337
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
transformers/docs/source/ar/tasks/language_modeling.md/0
{ "file_path": "transformers/docs/source/ar/tasks/language_modeling.md", "repo_id": "transformers", "token_count": 9379 }
338
# docstyle-ignore INSTALL_CONTENT = """ # Transformers installation ! pip install transformers datasets evaluate accelerate # To install from source instead of the last release, comment the command above and uncomment the following one. # ! pip install git+https://github.com/huggingface/transformers.git """ notebook_f...
transformers/docs/source/de/_config.py/0
{ "file_path": "transformers/docs/source/de/_config.py", "repo_id": "transformers", "token_count": 157 }
339
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/de/run_scripts.md/0
{ "file_path": "transformers/docs/source/de/run_scripts.md", "repo_id": "transformers", "token_count": 7515 }
340
<!--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/chat_template_advanced.md/0
{ "file_path": "transformers/docs/source/en/chat_template_advanced.md", "repo_id": "transformers", "token_count": 6534 }
341
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
transformers/docs/source/en/llm_tutorial_optimization.md/0
{ "file_path": "transformers/docs/source/en/llm_tutorial_optimization.md", "repo_id": "transformers", "token_count": 14834 }
342
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/main_classes/pipelines.md/0
{ "file_path": "transformers/docs/source/en/main_classes/pipelines.md", "repo_id": "transformers", "token_count": 4683 }
343
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/barthez.md/0
{ "file_path": "transformers/docs/source/en/model_doc/barthez.md", "repo_id": "transformers", "token_count": 818 }
344
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/bort.md/0
{ "file_path": "transformers/docs/source/en/model_doc/bort.md", "repo_id": "transformers", "token_count": 867 }
345
<!--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": 1169 }
346
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/deformable_detr.md/0
{ "file_path": "transformers/docs/source/en/model_doc/deformable_detr.md", "repo_id": "transformers", "token_count": 1149 }
347
<!--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/dpr.md/0
{ "file_path": "transformers/docs/source/en/model_doc/dpr.md", "repo_id": "transformers", "token_count": 1170 }
348
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/flan-ul2.md/0
{ "file_path": "transformers/docs/source/en/model_doc/flan-ul2.md", "repo_id": "transformers", "token_count": 785 }
349
<!--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/hubert.md/0
{ "file_path": "transformers/docs/source/en/model_doc/hubert.md", "repo_id": "transformers", "token_count": 1460 }
350
<!--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/m2m_100.md/0
{ "file_path": "transformers/docs/source/en/model_doc/m2m_100.md", "repo_id": "transformers", "token_count": 2671 }
351
<!--Copyright 2023 Mistral AI 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 applicabl...
transformers/docs/source/en/model_doc/mistral.md/0
{ "file_path": "transformers/docs/source/en/model_doc/mistral.md", "repo_id": "transformers", "token_count": 3313 }
352
<!--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/mt5.md/0
{ "file_path": "transformers/docs/source/en/model_doc/mt5.md", "repo_id": "transformers", "token_count": 1400 }
353
<!--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/phobert.md/0
{ "file_path": "transformers/docs/source/en/model_doc/phobert.md", "repo_id": "transformers", "token_count": 776 }
354
<!--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/realm.md/0
{ "file_path": "transformers/docs/source/en/model_doc/realm.md", "repo_id": "transformers", "token_count": 1018 }
355
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the MIT License; you may not use this file except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CON...
transformers/docs/source/en/model_doc/superglue.md/0
{ "file_path": "transformers/docs/source/en/model_doc/superglue.md", "repo_id": "transformers", "token_count": 1984 }
356
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/trajectory_transformer.md/0
{ "file_path": "transformers/docs/source/en/model_doc/trajectory_transformer.md", "repo_id": "transformers", "token_count": 776 }
357
<!--Copyright 2021 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/model_doc/wav2vec2_phoneme.md/0
{ "file_path": "transformers/docs/source/en/model_doc/wav2vec2_phoneme.md", "repo_id": "transformers", "token_count": 851 }
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/zamba.md/0
{ "file_path": "transformers/docs/source/en/model_doc/zamba.md", "repo_id": "transformers", "token_count": 1045 }
359
<!--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/perf_train_cpu.md/0
{ "file_path": "transformers/docs/source/en/perf_train_cpu.md", "repo_id": "transformers", "token_count": 1331 }
360
<!--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/bitsandbytes.md/0
{ "file_path": "transformers/docs/source/en/quantization/bitsandbytes.md", "repo_id": "transformers", "token_count": 4147 }
361
<!--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/run_scripts.md/0
{ "file_path": "transformers/docs/source/en/run_scripts.md", "repo_id": "transformers", "token_count": 5934 }
362
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/tasks/mask_generation.md/0
{ "file_path": "transformers/docs/source/en/tasks/mask_generation.md", "repo_id": "transformers", "token_count": 2873 }
363
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
transformers/docs/source/en/tasks/zero_shot_image_classification.md/0
{ "file_path": "transformers/docs/source/en/tasks/zero_shot_image_classification.md", "repo_id": "transformers", "token_count": 1801 }
364
<!--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/es/attention.md/0
{ "file_path": "transformers/docs/source/es/attention.md", "repo_id": "transformers", "token_count": 1396 }
365
<!--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/tasks/language_modeling.md/0
{ "file_path": "transformers/docs/source/es/tasks/language_modeling.md", "repo_id": "transformers", "token_count": 6287 }
366
<!--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/fr/run_scripts_fr.md/0
{ "file_path": "transformers/docs/source/fr/run_scripts_fr.md", "repo_id": "transformers", "token_count": 7046 }
367
<!--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 to...
transformers/docs/source/it/converting_tensorflow_models.md/0
{ "file_path": "transformers/docs/source/it/converting_tensorflow_models.md", "repo_id": "transformers", "token_count": 2405 }
368