text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
use crate::Result;
pub(super) fn nearest_int(v: f32) -> i32 {
v.round() as i32
}
/// Validates that the input and output are the right size and returns an iterator which maps each
/// input region `xs` to its corresponding output block in `ys`. Each output region is guaranteed
/// to be `T::BLCK_SIZE` long.
pub(s... | candle/candle-core/src/quantized/utils.rs/0 | {
"file_path": "candle/candle-core/src/quantized/utils.rs",
"repo_id": "candle",
"token_count": 5775
} | 27 |
[package]
name = "candle-datasets"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
readme = "README.md"
[dependencies]
byteorder = { workspace = true }
candle = { workspace = true }... | candle/candle-datasets/Cargo.toml/0 | {
"file_path": "candle/candle-datasets/Cargo.toml",
"repo_id": "candle",
"token_count": 201
} | 28 |
# Colpali
[HuggingFace Model Card](https://huggingface.co/vidore/colpali-v1.2-merged)
```
wget https://arxiv.org/pdf/1706.03762.pdf
cargo run --features cuda,pdf2image --release --example colpali -- --prompt "What is Positional Encoding" --pdf "1706.03762.pdf"
```
```
Prompt: what is position encoding?
top 3 page nu... | candle/candle-examples/examples/colpali/README.md/0 | {
"file_path": "candle/candle-examples/examples/colpali/README.md",
"repo_id": "candle",
"token_count": 153
} | 29 |
# DeepSeek V2
DeepSeek V2 an MoE model featuring MLA (Multi-Latent Attention). There is a lite (16B) and a full (236B) model.
- Context length of **32k tokens** (Lite model), **128k tokens** (full model)
- 64 routed experts (Lite model), 160 routed experts (full model)
## Running the example
```bash
$ cargo run --e... | candle/candle-examples/examples/deepseekv2/README.md/0 | {
"file_path": "candle/candle-examples/examples/deepseekv2/README.md",
"repo_id": "candle",
"token_count": 316
} | 30 |
use candle::{DType, Device, Tensor};
use candle_nn::VarBuilder;
use candle_transformers::generation::LogitsProcessor;
use candle_transformers::models::glm4::{Config as ConfigOld, EosTokenId, Model as ModelOld};
use candle_transformers::models::glm4_new::{Config as ConfigNew, ModelForCausalLM as ModelNew};
use clap::Pa... | candle/candle-examples/examples/glm4/main.rs/0 | {
"file_path": "candle/candle-examples/examples/glm4/main.rs",
"repo_id": "candle",
"token_count": 4770
} | 31 |
use candle::backend::BackendStorage;
use candle::{CpuStorage, CustomOp1, DType, Device, IndexOp, Layout, Result, Shape, Tensor, D};
use candle_nn::var_builder::ShardedVarBuilder as VarBuilder;
use candle_nn::{Embedding, Linear, Module, RmsNorm};
use cudarc::nccl::safe::{Comm, ReduceOp};
use std::rc::Rc;
use std::sync::... | candle/candle-examples/examples/llama_multiprocess/model.rs/0 | {
"file_path": "candle/candle-examples/examples/llama_multiprocess/model.rs",
"repo_id": "candle",
"token_count": 7294
} | 32 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use anyhow::Result;
use clap::Parser;
use std::io::Write;
use candle_transformers::generation::LogitsProcessor;
use candle_transformers::models::encodec;
use candle_transformers::models::metavoice::{adapte... | candle/candle-examples/examples/metavoice/main.rs/0 | {
"file_path": "candle/candle-examples/examples/metavoice/main.rs",
"repo_id": "candle",
"token_count": 4561
} | 33 |
# candle-modernbert
ModernBERT is a bidirectional encoder-only language model. In this example it is used for the fill-mask task:
## Usage
```bash
cargo run --example modernbert --release -- --model modern-bert-large --prompt 'The capital of France is [MASK].'
```
```markdown
Sentence: 1 : The capital of France is ... | candle/candle-examples/examples/modernbert/README.md/0 | {
"file_path": "candle/candle-examples/examples/modernbert/README.md",
"repo_id": "candle",
"token_count": 102
} | 34 |
# Orpheus
Orpheus is a 3B text-to-speech model based on Llama.
- Weights on HuggingFace
[canopylabs/orpheus-3b-0.1-ft](https://huggingface.co/canopylabs/orpheus-3b-0.1-ft).
- Code on GitHub [canopyai/Orpheus-TTS](https://github.com/canopyai/Orpheus-TTS).
```bash
cargo run --example orpheus --features cuda -r
```
... | candle/candle-examples/examples/orpheus/README.md/0 | {
"file_path": "candle/candle-examples/examples/orpheus/README.md",
"repo_id": "candle",
"token_count": 135
} | 35 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use clap::{Parser, ValueEnum};
use std::io::Write;
use tokenizers::Tokenizer;
use candle::quantized::gguf_file;
use candle::Tensor;
use candle_transformers::generation::{LogitsProcessor, Sampling};
use ca... | candle/candle-examples/examples/quantized-qwen2-instruct/main.rs/0 | {
"file_path": "candle/candle-examples/examples/quantized-qwen2-instruct/main.rs",
"repo_id": "candle",
"token_count": 5570
} | 36 |
//! Wrappers around the Python API of Gymnasium (the new version of OpenAI gym)
use candle::{Device, Result, Tensor};
use pyo3::prelude::*;
use pyo3::types::PyDict;
/// The return value for a step.
#[derive(Debug)]
pub struct Step<A> {
pub state: Tensor,
pub action: A,
pub reward: f64,
pub terminated: ... | candle/candle-examples/examples/reinforcement-learning/gym_env.rs/0 | {
"file_path": "candle/candle-examples/examples/reinforcement-learning/gym_env.rs",
"repo_id": "candle",
"token_count": 1743
} | 37 |
# candle-segment-anything: Segment-Anything Model
This example is based on Meta AI [Segment-Anything
Model](https://github.com/facebookresearch/segment-anything). This model
provides a robust and fast image segmentation pipeline that can be tweaked via
some prompting (requesting some points to be in the target mask, r... | candle/candle-examples/examples/segment-anything/README.md/0 | {
"file_path": "candle/candle-examples/examples/segment-anything/README.md",
"repo_id": "candle",
"token_count": 575
} | 38 |
mod clip;
mod sampling;
mod vae;
use candle::{DType, IndexOp, Tensor};
use candle_transformers::models::mmdit::model::{Config as MMDiTConfig, MMDiT};
use crate::clip::StableDiffusion3TripleClipWithTokenizer;
use crate::vae::{build_sd3_vae_autoencoder, sd3_vae_vb_rename};
use anyhow::{Ok, Result};
use clap::Parser;
... | candle/candle-examples/examples/stable-diffusion-3/main.rs/0 | {
"file_path": "candle/candle-examples/examples/stable-diffusion-3/main.rs",
"repo_id": "candle",
"token_count": 4715
} | 39 |
use image::{DynamicImage, ImageBuffer};
use serde::Deserialize;
use std::collections::HashMap;
use candle::{DType, Device, Result, Tensor};
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct ProcessorConfig {
do_resize: bool,
height: u32,
width: u32,
do_rescale: bool,
do_normalize: bool,
... | candle/candle-examples/examples/trocr/image_processor.rs/0 | {
"file_path": "candle/candle-examples/examples/trocr/image_processor.rs",
"repo_id": "candle",
"token_count": 2273
} | 40 |
# Get the checkpoint from
# https://openaipublic.azureedge.net/main/whisper/models/d3dd57d32accea0b295c96e26691aa14d8822fac7d9d27d5dc00b4ca2826dd03/tiny.en.pt
import torch
from safetensors.torch import save_file
data = torch.load("tiny.en.pt")
weights = {}
for k, v in data["model_state_dict"].items():
weights[k] ... | candle/candle-examples/examples/whisper/extract_weights.py/0 | {
"file_path": "candle/candle-examples/examples/whisper/extract_weights.py",
"repo_id": "candle",
"token_count": 183
} | 41 |
[net]
# Testing
batch=1
subdivisions=1
# Training
# batch=64
# subdivisions=16
width= 416
height = 416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1
[convolutional]
batch_normaliz... | candle/candle-examples/examples/yolo-v3/yolo-v3.cfg/0 | {
"file_path": "candle/candle-examples/examples/yolo-v3/yolo-v3.cfg",
"repo_id": "candle",
"token_count": 3586
} | 42 |
[package]
name = "candle-flash-attn"
version = "0.9.1"
edition = "2021"
description = "Flash attention layer for the candle ML framework."
repository = "https://github.com/huggingface/candle"
keywords = ["blas", "tensor", "machine-learning"]
categories = ["science"]
license = "MIT OR Apache-2.0"
readme = "README.md"
... | candle/candle-flash-attn/Cargo.toml/0 | {
"file_path": "candle/candle-flash-attn/Cargo.toml",
"repo_id": "candle",
"token_count": 288
} | 43 |
/******************************************************************************
* Copyright (c) 2024, Tri Dao.
******************************************************************************/
#pragma once
#include <cute/tensor.hpp>
namespace flash {
using namespace cute;
template <typename Engine, typename Layout... | candle/candle-flash-attn/kernels/mask.h/0 | {
"file_path": "candle/candle-flash-attn/kernels/mask.h",
"repo_id": "candle",
"token_count": 6255
} | 44 |
#include "cuda_fp16.h"
#include "cuda_bf16.h"
#include "cuda_fp8.h"
// Table showing which features are supported on which compute capability
// https://docs.nvidia.com/cuda/cuda-c-programming-guide/#features-and-technical-specifications
// FIXME: the minimum compute capabilities are just guesses since the table is n... | candle/candle-kernels/src/compatibility.cuh/0 | {
"file_path": "candle/candle-kernels/src/compatibility.cuh",
"repo_id": "candle",
"token_count": 2748
} | 45 |
#include <metal_stdlib>
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
METAL_FUNC uint get_strided_index(
uint idx,
constant size_t &num_dims,
constant size_t *dims,
constant size_t *strides
) {
uint strided_i = 0;
for (uint d = 0; d < num_dims; d++) {
... | candle/candle-metal-kernels/src/binary.metal/0 | {
"file_path": "candle/candle-metal-kernels/src/binary.metal",
"repo_id": "candle",
"token_count": 1861
} | 46 |
use super::*;
use half::{bf16, f16};
use metal::{Buffer, Device, MTLResourceOptions};
use rand::prelude::SliceRandom;
use rand::thread_rng;
use rand::Rng;
fn read_to_vec<T: Clone>(buffer: &Buffer, n: usize) -> Vec<T> {
let ptr = buffer.contents() as *const T;
assert!(!ptr.is_null());
let slice = unsafe { s... | candle/candle-metal-kernels/src/tests.rs/0 | {
"file_path": "candle/candle-metal-kernels/src/tests.rs",
"repo_id": "candle",
"token_count": 35346
} | 47 |
/// This example contains some simple benchmarks so that it's easy to run them in perf etc.
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use candle::quantized::GgmlType;
use candle::{CpuStorage, Device, Layout, Module, Result, Shape, Tensor, D};
use c... | candle/candle-nn/examples/cpu_benchmarks.rs/0 | {
"file_path": "candle/candle-nn/examples/cpu_benchmarks.rs",
"repo_id": "candle",
"token_count": 5543
} | 48 |
//! Recurrent Neural Networks
use candle::{DType, Device, IndexOp, Result, Tensor};
/// Trait for Recurrent Neural Networks.
#[allow(clippy::upper_case_acronyms)]
pub trait RNN {
type State: Clone;
/// A zero state from which the recurrent network is usually initialized.
fn zero_state(&self, batch_dim: us... | candle/candle-nn/src/rnn.rs/0 | {
"file_path": "candle/candle-nn/src/rnn.rs",
"repo_id": "candle",
"token_count": 5697
} | 49 |
[package]
name = "candle-onnx"
version = "0.9.1"
edition = "2021"
description = "ONNX support for Candle"
repository = "https://github.com/huggingface/candle"
keywords = ["blas", "tensor", "machine-learning"]
categories = ["science"]
license = "MIT OR Apache-2.0"
[dependencies]
candle = { path = "../candle-core", pac... | candle/candle-onnx/Cargo.toml/0 | {
"file_path": "candle/candle-onnx/Cargo.toml",
"repo_id": "candle",
"token_count": 242
} | 50 |
# Generated content DO NOT EDIT
from .. import functional
avg_pool2d = functional.avg_pool2d
gelu = functional.gelu
max_pool2d = functional.max_pool2d
relu = functional.relu
silu = functional.silu
softmax = functional.softmax
tanh = functional.tanh
| candle/candle-pyo3/py_src/candle/functional/__init__.py/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/functional/__init__.py",
"repo_id": "candle",
"token_count": 84
} | 51 |
# Generated content DO NOT EDIT
from typing import Any, Callable, Dict, List, Optional, Tuple, Union, Sequence
from os import PathLike
from candle.typing import _ArrayLike, Device, Scalar, Index, Shape
from candle import Tensor, DType, QTensor
@staticmethod
def cuda_is_available() -> bool:
"""
Returns true if ... | candle/candle-pyo3/py_src/candle/utils/__init__.pyi/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/utils/__init__.pyi",
"repo_id": "candle",
"token_count": 654
} | 52 |
import candle
from candle import Tensor, QTensor
from candle.utils import load_safetensors, save_gguf, load_gguf, save_safetensors
from pathlib import Path
TEST_DIR = Path(__file__).parent.parent / "_workdir"
TEST_DIR.mkdir(exist_ok=True)
def test_can_roundtrip_safetensors():
tensors = {
"a": candle.rand... | candle/candle-pyo3/tests/native/test_utils.py/0 | {
"file_path": "candle/candle-pyo3/tests/native/test_utils.py",
"repo_id": "candle",
"token_count": 774
} | 53 |
//! Contrastive Language-Image Pre-Training
//!
//! Contrastive Language-Image Pre-Training (CLIP) is an architecture trained on
//! pairs of images with related texts.
//!
//! - [GH](https://github.com/openai/CLIP)
//! - [Code](https://github.com/huggingface/transformers/tree/f6fa0f0bf0796ac66f201f23bdb8585de1609add/s... | candle/candle-transformers/src/models/clip/text_model.rs/0 | {
"file_path": "candle/candle-transformers/src/models/clip/text_model.rs",
"repo_id": "candle",
"token_count": 5660
} | 54 |
//! EnCodec neural audio codec based on the Encodec implementation.
//!
//! See ["High Fidelity Neural Audio Compression"](https://arxiv.org/abs/2210.13438)
//!
//! Based on implementation from [huggingface/transformers](https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_enco... | candle/candle-transformers/src/models/encodec.rs/0 | {
"file_path": "candle/candle-transformers/src/models/encodec.rs",
"repo_id": "candle",
"token_count": 13015
} | 55 |
//! Hiera inference implementation based on timm.
//!
//!
//! - 💻 [Hiera](https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/hiera.py)
//! - 📝 [Paper](https://arxiv.org/abs/2306.00989). Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles
use candle::{Result, D};
use candle_... | candle/candle-transformers/src/models/hiera.rs/0 | {
"file_path": "candle/candle-transformers/src/models/hiera.rs",
"repo_id": "candle",
"token_count": 4445
} | 56 |
// Copyright (c) Kyutai, all rights reserved.
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
use candle::{DType, Device, IndexOp, Module, Result, StreamTensor, StreamingModule, Tensor, D};
use candle_nn::{linear_no_bias, Linear, VarBuilder};
us... | candle/candle-transformers/src/models/mimi/transformer.rs/0 | {
"file_path": "candle/candle-transformers/src/models/mimi/transformer.rs",
"repo_id": "candle",
"token_count": 14210
} | 57 |
/// Mistral LLM, https://github.com/mistralai/mistral-src
use crate::models::{
mistral::Config,
with_tracing::{linear_no_bias, Linear, RmsNorm},
};
use crate::utils::repeat_kv;
use candle::{DType, Device, Module, Result, Tensor};
use candle_nn::{Activation, VarBuilder};
use std::sync::Arc;
#[derive(Debug, Clon... | candle/candle-transformers/src/models/nvembed_v2/embedding.rs/0 | {
"file_path": "candle/candle-transformers/src/models/nvembed_v2/embedding.rs",
"repo_id": "candle",
"token_count": 4768
} | 58 |
use candle::{DType, IndexOp, Result, Tensor};
use candle_nn::{Module, VarBuilder};
use super::image_encoder::ImageEncoderViT;
use super::mask_decoder::MaskDecoder;
use super::prompt_encoder::PromptEncoder;
use super::tiny_vit::{tiny_vit_5m, TinyViT};
const PROMPT_EMBED_DIM: usize = 256;
pub const IMAGE_SIZE: usize = ... | candle/candle-transformers/src/models/segment_anything/sam.rs/0 | {
"file_path": "candle/candle-transformers/src/models/segment_anything/sam.rs",
"repo_id": "candle",
"token_count": 8456
} | 59 |
//! # UniPC Scheduler
//!
//! UniPC is a training-free framework designed for the fast sampling of diffusion models, which consists of a
//! corrector (UniC) and a predictor (UniP) that share a unified analytical form and support arbitrary orders.
//!
//! UniPC is by design model-agnostic, supporting pixel-space/latent... | candle/candle-transformers/src/models/stable_diffusion/uni_pc.rs/0 | {
"file_path": "candle/candle-transformers/src/models/stable_diffusion/uni_pc.rs",
"repo_id": "candle",
"token_count": 17600
} | 60 |
use super::Config;
use crate::models::with_tracing::{linear, linear_no_bias, Linear};
use candle::{Device, IndexOp, Result, Tensor, D};
use candle_nn::{embedding, Conv1d, Conv1dConfig, Embedding, LayerNorm, Module, VarBuilder};
fn conv1d(
in_channels: usize,
out_channels: usize,
kernel_size: usize,
con... | candle/candle-transformers/src/models/whisper/model.rs/0 | {
"file_path": "candle/candle-transformers/src/models/whisper/model.rs",
"repo_id": "candle",
"token_count": 7098
} | 61 |
//! Varbuilder for Loading gguf files
//!
//! VarBuilder is a utility to store quantized tensors from a [GGUF model file](https://huggingface.co/docs/hub/gguf).
//! These tensors can be loaded from disk using `from_gguf` or from an in-memory
//! buffer using `from_gguf_buffer`.
use candle::quantized::QTensor;
use cand... | candle/candle-transformers/src/quantized_var_builder.rs/0 | {
"file_path": "candle/candle-transformers/src/quantized_var_builder.rs",
"repo_id": "candle",
"token_count": 1649
} | 62 |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@200;300;400&family=Source+Sans+3:wght@100;200;300;400;500;600;700;800;900&display=swap");... | candle/candle-wasm-examples/blip/index.html/0 | {
"file_path": "candle/candle-wasm-examples/blip/index.html",
"repo_id": "candle",
"token_count": 7164
} | 63 |
use crate::model::{Cache, Config, Llama};
use byteorder::{LittleEndian, ReadBytesExt};
use candle::{DType, Device, IndexOp, Result, Shape, Tensor};
use candle_nn::VarBuilder;
use candle_transformers::generation::LogitsProcessor;
use serde::{Deserialize, Serialize};
use tokenizers::Tokenizer;
use wasm_bindgen::prelude::... | candle/candle-wasm-examples/llama2-c/src/worker.rs/0 | {
"file_path": "candle/candle-wasm-examples/llama2-c/src/worker.rs",
"repo_id": "candle",
"token_count": 5773
} | 64 |
export async function extractEmbeddings(
worker,
weightsURL,
tokenizerURL,
configURL,
modelID,
sentences,
updateStatus,
normalize_embeddings = true
) {
return new Promise((resolve, reject) => {
worker.postMessage({
weightsURL,
tokenizerURL,
configURL,
modelID,
sentenc... | candle/candle-wasm-examples/t5/utils.js/0 | {
"file_path": "candle/candle-wasm-examples/t5/utils.js",
"repo_id": "candle",
"token_count": 2339
} | 65 |
[package]
name = "candle-wasm-example-yolo"
version.workspace = true
edition.workspace = true
description.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
[dependencies]
candle = { workspace = true }
candle-nn = { workspace = true }
num-traits ... | candle/candle-wasm-examples/yolo/Cargo.toml/0 | {
"file_path": "candle/candle-wasm-examples/yolo/Cargo.toml",
"repo_id": "candle",
"token_count": 464
} | 66 |
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
| candle/candle-wasm-tests/src/lib.rs/0 | {
"file_path": "candle/candle-wasm-tests/src/lib.rs",
"repo_id": "candle",
"token_count": 108
} | 67 |
apiVersion: v2
name: chat-ui
version: 0.0.1-latest
type: application
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
| chat-ui/chart/Chart.yaml/0 | {
"file_path": "chat-ui/chart/Chart.yaml",
"repo_id": "chat-ui",
"token_count": 55
} | 68 |
# Text Embedding Models
By default (for backward compatibility), when `TEXT_EMBEDDING_MODELS` environment variable is not defined, [transformers.js](https://huggingface.co/docs/transformers.js) embedding models will be used for embedding tasks, specifically, the [Xenova/gte-small](https://huggingface.co/Xenova/gte-sma... | chat-ui/docs/source/configuration/embeddings.md/0 | {
"file_path": "chat-ui/docs/source/configuration/embeddings.md",
"repo_id": "chat-ui",
"token_count": 1568
} | 69 |
# Configuration Overview
Chat UI handles configuration with environment variables. The default config for Chat UI is stored in the `.env` file, which you may use as a reference. You will need to override some values to get Chat UI to run locally. This can be done in `.env.local` or via your environment. The bare minim... | chat-ui/docs/source/configuration/overview.md/0 | {
"file_path": "chat-ui/docs/source/configuration/overview.md",
"repo_id": "chat-ui",
"token_count": 130
} | 70 |
import readline from "readline";
import minimist from "minimist";
// @ts-expect-error: vite-node makes the var available but the typescript compiler doesn't see them
import { env } from "$env/dynamic/private";
import { faker } from "@faker-js/faker";
import { ObjectId } from "mongodb";
// @ts-expect-error: vite-node... | chat-ui/scripts/populate.ts/0 | {
"file_path": "chat-ui/scripts/populate.ts",
"repo_id": "chat-ui",
"token_count": 5135
} | 71 |
<script lang="ts">
import { base } from "$app/paths";
import type { ToolLogoColor, ToolLogoIcon } from "$lib/types/Tool";
import { debounce } from "$lib/utils/debounce";
import { onMount } from "svelte";
import ToolLogo from "./ToolLogo.svelte";
import CarbonClose from "~icons/carbon/close";
interface ToolSugg... | chat-ui/src/lib/components/AssistantToolPicker.svelte/0 | {
"file_path": "chat-ui/src/lib/components/AssistantToolPicker.svelte",
"repo_id": "chat-ui",
"token_count": 1794
} | 72 |
<script lang="ts">
import { page } from "$app/stores";
import { getHref } from "$lib/utils/getHref";
import PaginationArrow from "./PaginationArrow.svelte";
interface Props {
classNames?: string;
numItemsPerPage: number;
numTotalItems: number;
}
let { classNames = "", numItemsPerPage, numTotalItems }: Pro... | chat-ui/src/lib/components/Pagination.svelte/0 | {
"file_path": "chat-ui/src/lib/components/Pagination.svelte",
"repo_id": "chat-ui",
"token_count": 1249
} | 73 |
<script lang="ts">
import { webSearchParameters } from "$lib/stores/webSearchParameters";
import CarbonInformation from "~icons/carbon/information";
import Switch from "./Switch.svelte";
const toggle = () => ($webSearchParameters.useSearch = !$webSearchParameters.useSearch);
</script>
<div
class="flex h-8 cursor... | chat-ui/src/lib/components/WebSearchToggle.svelte/0 | {
"file_path": "chat-ui/src/lib/components/WebSearchToggle.svelte",
"repo_id": "chat-ui",
"token_count": 448
} | 74 |
<script lang="ts">
interface Props {
classNames?: string;
}
let { classNames = "" }: Props = $props();
</script>
<svg
width="1em"
height="1em"
viewBox="0 0 15 6"
class={classNames}
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.67236 1L7.67236 7L13.6724 1"
stroke="currentColor"
stroke-... | chat-ui/src/lib/components/icons/IconChevron.svelte/0 | {
"file_path": "chat-ui/src/lib/components/icons/IconChevron.svelte",
"repo_id": "chat-ui",
"token_count": 181
} | 75 |
import type { ConversationStats } from "$lib/types/ConversationStats";
import { CONVERSATION_STATS_COLLECTION, collections } from "$lib/server/database";
import { logger } from "$lib/server/logger";
import type { ObjectId } from "mongodb";
import { acquireLock, refreshLock } from "$lib/migrations/lock";
import { Semaph... | chat-ui/src/lib/jobs/refresh-conversation-stats.ts/0 | {
"file_path": "chat-ui/src/lib/jobs/refresh-conversation-stats.ts",
"repo_id": "chat-ui",
"token_count": 2855
} | 76 |
// Shouldn't be needed if we dove into sveltekit internals, see https://github.com/huggingface/chat-ui/pull/88#issuecomment-1523173850
import { logger } from "$lib/server/logger";
import { collections } from "$lib/server/database";
import { onExit } from "./exitHandler";
export class AbortedGenerations {
private sta... | chat-ui/src/lib/server/abortedGenerations.ts/0 | {
"file_path": "chat-ui/src/lib/server/abortedGenerations.ts",
"repo_id": "chat-ui",
"token_count": 397
} | 77 |
import { z } from "zod";
import type { EmbeddingEndpoint, Embedding } from "../embeddingEndpoints";
import { chunk } from "$lib/utils/chunk";
import { config } from "$lib/server/config";
import { logger } from "$lib/server/logger";
export const embeddingEndpointTeiParametersSchema = z.object({
weight: z.number().int(... | chat-ui/src/lib/server/embeddingEndpoints/tei/embeddingEndpoints.ts/0 | {
"file_path": "chat-ui/src/lib/server/embeddingEndpoints/tei/embeddingEndpoints.ts",
"repo_id": "chat-ui",
"token_count": 837
} | 78 |
import { buildPrompt } from "$lib/buildPrompt";
import { z } from "zod";
import type { Endpoint } from "../endpoints";
import type { TextGenerationStreamOutput } from "@huggingface/inference";
import { logger } from "$lib/server/logger";
export const endpointLangserveParametersSchema = z.object({
weight: z.number().i... | chat-ui/src/lib/server/endpoints/langserve/endpointLangserve.ts/0 | {
"file_path": "chat-ui/src/lib/server/endpoints/langserve/endpointLangserve.ts",
"repo_id": "chat-ui",
"token_count": 1394
} | 79 |
import { runWebSearch } from "$lib/server/websearch/runWebSearch";
import { preprocessMessages } from "../endpoints/preprocessMessages";
import { generateTitleForConversation } from "./title";
import {
assistantHasDynamicPrompt,
assistantHasWebSearch,
getAssistantById,
processPreprompt,
} from "./assistant";
impor... | chat-ui/src/lib/server/textGeneration/index.ts/0 | {
"file_path": "chat-ui/src/lib/server/textGeneration/index.ts",
"repo_id": "chat-ui",
"token_count": 960
} | 80 |
import type { MarkdownElement } from "../markdown/types";
export function flattenTree(elem: MarkdownElement): MarkdownElement[] {
if ("children" in elem) return [elem, ...elem.children.flatMap(flattenTree)];
return [elem];
}
| chat-ui/src/lib/server/websearch/embed/tree.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/embed/tree.ts",
"repo_id": "chat-ui",
"token_count": 74
} | 81 |
import { config } from "$lib/server/config";
import { getJson, type GoogleParameters } from "serpapi";
import type { WebSearchSource } from "$lib/types/WebSearch";
import { isURL } from "$lib/utils/isUrl";
type SerpApiResponse = {
organic_results: {
link: string;
}[];
};
export default async function searchWebSer... | chat-ui/src/lib/server/websearch/search/endpoints/serpApi.ts/0 | {
"file_path": "chat-ui/src/lib/server/websearch/search/endpoints/serpApi.ts",
"repo_id": "chat-ui",
"token_count": 235
} | 82 |
export function switchTheme() {
const { classList } = document.querySelector("html") as HTMLElement;
const metaTheme = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement;
if (classList.contains("dark")) {
classList.remove("dark");
metaTheme.setAttribute("content", "rgb(249, 250, 251)");
loc... | chat-ui/src/lib/switchTheme.ts/0 | {
"file_path": "chat-ui/src/lib/switchTheme.ts",
"repo_id": "chat-ui",
"token_count": 164
} | 83 |
import type { ObjectId } from "bson";
import type { Timestamps } from "./Timestamps";
import type { User } from "./User";
export interface Session extends Timestamps {
_id: ObjectId;
sessionId: string;
userId: User["_id"];
userAgent?: string;
ip?: string;
expiresAt: Date;
admin?: boolean;
}
| chat-ui/src/lib/types/Session.ts/0 | {
"file_path": "chat-ui/src/lib/types/Session.ts",
"repo_id": "chat-ui",
"token_count": 103
} | 84 |
const file2base64 = (file: File): Promise<string> => {
return new Promise<string>((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
const dataUrl = reader.result as string;
const base64 = dataUrl.split(",")[1];
resolve(base64);
};
reader.oner... | chat-ui/src/lib/utils/file2base64.ts/0 | {
"file_path": "chat-ui/src/lib/utils/file2base64.ts",
"repo_id": "chat-ui",
"token_count": 142
} | 85 |
const PUNCTUATION_REGEX = /\p{P}/gu;
function removeDiacritics(s: string, form: "NFD" | "NFKD" = "NFD"): string {
return s.normalize(form).replace(/[\u0300-\u036f]/g, "");
}
export function generateSearchTokens(value: string): string[] {
const fullTitleToken = removeDiacritics(value)
.replace(PUNCTUATION_REGEX, "... | chat-ui/src/lib/utils/searchTokens.ts/0 | {
"file_path": "chat-ui/src/lib/utils/searchTokens.ts",
"repo_id": "chat-ui",
"token_count": 426
} | 86 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { describe, expect, it } from "vitest";
import { convertLegacyConversation } from "./convertLegacyConversation";
import { insertLegacyConversation } from "./treeHelpers.spec";
describe("convertLegacyConversation", () => {
... | chat-ui/src/lib/utils/tree/convertLegacyConversation.spec.ts/0 | {
"file_path": "chat-ui/src/lib/utils/tree/convertLegacyConversation.spec.ts",
"repo_id": "chat-ui",
"token_count": 425
} | 87 |
import { base } from "$app/paths";
import { collections } from "$lib/server/database";
import { error } from "@sveltejs/kit";
import { ObjectId } from "mongodb";
import { z } from "zod";
import { config } from "$lib/server/config";
import { sendSlack } from "$lib/server/sendSlack";
import type { Assistant } from "$li... | chat-ui/src/routes/api/assistant/[id]/report/+server.ts/0 | {
"file_path": "chat-ui/src/routes/api/assistant/[id]/report/+server.ts",
"repo_id": "chat-ui",
"token_count": 655
} | 88 |
import { adminTokenManager } from "$lib/server/adminToken";
import { z } from "zod";
const validateTokenSchema = z.object({
token: z.string(),
});
export const POST = async ({ request, locals }) => {
const { success, data } = validateTokenSchema.safeParse(await request.json());
if (!success) {
return new Respon... | chat-ui/src/routes/api/user/validate-token/+server.ts/0 | {
"file_path": "chat-ui/src/routes/api/user/validate-token/+server.ts",
"repo_id": "chat-ui",
"token_count": 180
} | 89 |
import { authCondition } from "$lib/server/auth";
import { collections } from "$lib/server/database";
import { error } from "@sveltejs/kit";
import { ObjectId } from "mongodb";
/**
* Ideally, we'd be able to detect the client-side abort, see https://github.com/huggingface/chat-ui/pull/88#issuecomment-1523173850
*/
e... | chat-ui/src/routes/conversation/[id]/stop-generating/+server.ts/0 | {
"file_path": "chat-ui/src/routes/conversation/[id]/stop-generating/+server.ts",
"repo_id": "chat-ui",
"token_count": 260
} | 90 |
<script lang="ts">
import {
ToolOutputComponents,
type CommunityToolEditable,
type ToolInput,
} from "$lib/types/Tool";
import { createEventDispatcher, onMount } from "svelte";
import { browser } from "$app/environment";
import ToolLogo from "$lib/components/ToolLogo.svelte";
import { colors, icons } from "... | chat-ui/src/routes/tools/ToolEdit.svelte/0 | {
"file_path": "chat-ui/src/routes/tools/ToolEdit.svelte",
"repo_id": "chat-ui",
"token_count": 10344
} | 91 |
{
"background_color": "#ffffff",
"name": "Chat UI",
"short_name": "Chat UI",
"display": "standalone",
"start_url": "/",
"icons": [
{
"src": "/chatui/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "/chatui/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
... | chat-ui/static/chatui/manifest.json/0 | {
"file_path": "chat-ui/static/chatui/manifest.json",
"repo_id": "chat-ui",
"token_count": 218
} | 92 |
{
"background_color": "#ffffff",
"name": "HuggingChat",
"short_name": "HuggingChat",
"display": "standalone",
"start_url": "/chat",
"icons": [
{
"src": "/chat/huggingchat/icon-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/chat/huggingchat/icon-48x48.png",
"sizes": "48x48",
... | chat-ui/static/huggingchat/manifest.json/0 | {
"file_path": "chat-ui/static/huggingchat/manifest.json",
"repo_id": "chat-ui",
"token_count": 569
} | 93 |
import timeit
import numpy as np
import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features.features import _ArrayXD
def get_duration(func):
def wrapper(*args, **kwargs):
starttime = timeit.default_timer()
_ = func(*args, **kwargs)
delta = timeit.default_timer()... | datasets/benchmarks/utils.py/0 | {
"file_path": "datasets/benchmarks/utils.py",
"repo_id": "datasets",
"token_count": 927
} | 94 |
# Command Line Interface (CLI)
🤗 Datasets provides a command line interface (CLI) with useful shell commands to interact with your dataset.
You can check the available commands:
```bash
>>> datasets-cli --help
usage: datasets-cli <command> [<args>]
positional arguments:
{env,test,delete_from_hub}
... | datasets/docs/source/cli.mdx/0 | {
"file_path": "datasets/docs/source/cli.mdx",
"repo_id": "datasets",
"token_count": 515
} | 95 |
# Installation
Before you start, you'll need to setup your environment and install the appropriate packages. 🤗 Datasets is tested on **Python 3.9+**.
<Tip>
If you want to use 🤗 Datasets with TensorFlow or PyTorch, you'll need to install them separately. Refer to the [TensorFlow installation page](https://www.tenso... | datasets/docs/source/installation.md/0 | {
"file_path": "datasets/docs/source/installation.md",
"repo_id": "datasets",
"token_count": 1063
} | 96 |
# Stream
Dataset streaming lets you work with a dataset without downloading it.
The data is streamed as you iterate over the dataset.
This is especially helpful when:
- You don't want to wait for an extremely large dataset to download.
- The dataset size exceeds the amount of available disk space on your computer.
- ... | datasets/docs/source/stream.mdx/0 | {
"file_path": "datasets/docs/source/stream.mdx",
"repo_id": "datasets",
"token_count": 7937
} | 97 |
<!---
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 ... | datasets/notebooks/README.md/0 | {
"file_path": "datasets/notebooks/README.md",
"repo_id": "datasets",
"token_count": 534
} | 98 |
import contextlib
import copy
import fnmatch
import itertools
import json
import math
import posixpath
import random
import re
import time
from collections.abc import Sequence
from functools import partial
from pathlib import Path
from typing import Callable, Optional, Union
import fsspec
import numpy as np
from fsspe... | datasets/src/datasets/dataset_dict.py/0 | {
"file_path": "datasets/src/datasets/dataset_dict.py",
"repo_id": "datasets",
"token_count": 62611
} | 99 |
import os
from functools import partial
from typing import Optional
import fsspec
from fsspec.archive import AbstractArchiveFileSystem
class BaseCompressedFileFileSystem(AbstractArchiveFileSystem):
"""Read contents of compressed file as a filesystem with one file inside."""
root_marker = ""
protocol: st... | datasets/src/datasets/filesystems/compression.py/0 | {
"file_path": "datasets/src/datasets/filesystems/compression.py",
"repo_id": "datasets",
"token_count": 1827
} | 100 |
import multiprocessing
import os
from typing import BinaryIO, Optional, Union
import fsspec
from .. import Dataset, Features, NamedSplit, config
from ..formatting import query_table
from ..packaged_modules.json.json import Json
from ..utils import tqdm as hf_tqdm
from ..utils.typing import NestedDataStructureLike, Pa... | datasets/src/datasets/io/json.py/0 | {
"file_path": "datasets/src/datasets/io/json.py",
"repo_id": "datasets",
"token_count": 3162
} | 101 |
import contextlib
from multiprocessing import Pool, RLock
from tqdm.auto import tqdm
from ..utils import experimental, logging
logger = logging.get_logger(__name__)
class ParallelBackendConfig:
backend_name = None
@experimental
def parallel_map(function, iterable, num_proc, batched, batch_size, types, disab... | datasets/src/datasets/parallel/parallel.py/0 | {
"file_path": "datasets/src/datasets/parallel/parallel.py",
"repo_id": "datasets",
"token_count": 1783
} | 102 |
import enum
import os
from typing import Optional
from huggingface_hub.utils import insecure_hashlib
from .. import config
from ..exceptions import (
ExpectedMoreDownloadedFilesError,
ExpectedMoreSplitsError,
NonMatchingChecksumError,
NonMatchingSplitsSizesError,
UnexpectedDownloadedFileError,
... | datasets/src/datasets/utils/info_utils.py/0 | {
"file_path": "datasets/src/datasets/utils/info_utils.py",
"repo_id": "datasets",
"token_count": 1731
} | 103 |
import os
from typing import TypeVar, Union
T = TypeVar("T")
ListLike = Union[list[T], tuple[T, ...]]
NestedDataStructureLike = Union[T, list[T], dict[str, T]]
PathLike = Union[str, bytes, os.PathLike]
| datasets/src/datasets/utils/typing.py/0 | {
"file_path": "datasets/src/datasets/utils/typing.py",
"repo_id": "datasets",
"token_count": 74
} | 104 |
import textwrap
import pyarrow as pa
import pytest
from datasets import Features, Value
from datasets.builder import InvalidConfigName
from datasets.data_files import DataFilesList
from datasets.packaged_modules.json.json import Json, JsonConfig
@pytest.fixture
def jsonl_file(tmp_path):
filename = tmp_path / "f... | datasets/tests/packaged_modules/test_json.py/0 | {
"file_path": "datasets/tests/packaged_modules/test_json.py",
"repo_id": "datasets",
"token_count": 3820
} | 105 |
import warnings
import pytest
import datasets.utils.deprecation_utils
from datasets.exceptions import (
ChecksumVerificationError,
ExpectedMoreDownloadedFilesError,
ExpectedMoreSplitsError,
NonMatchingChecksumError,
NonMatchingSplitsSizesError,
SplitsVerificationError,
UnexpectedDownloaded... | datasets/tests/test_exceptions.py/0 | {
"file_path": "datasets/tests/test_exceptions.py",
"repo_id": "datasets",
"token_count": 360
} | 106 |
import pytest
from datasets.parallel import ParallelBackendConfig, parallel_backend
from datasets.utils.py_utils import map_nested
from .utils import require_dill_gt_0_3_2, require_joblibspark, require_not_windows
def add_one(i): # picklable for multiprocessing
return i + 1
@require_dill_gt_0_3_2
@require_jo... | datasets/tests/test_parallel.py/0 | {
"file_path": "datasets/tests/test_parallel.py",
"repo_id": "datasets",
"token_count": 825
} | 107 |
import os
import pandas as pd
from huggingface_hub import hf_hub_download, upload_file
from huggingface_hub.utils import EntryNotFoundError
REPO_ID = "diffusers/benchmarks"
def has_previous_benchmark() -> str:
from run_all import FINAL_CSV_FILENAME
csv_path = None
try:
csv_path = hf_hub_downlo... | diffusers/benchmarks/push_results.py/0 | {
"file_path": "diffusers/benchmarks/push_results.py",
"repo_id": "diffusers",
"token_count": 1053
} | 108 |
<!--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... | diffusers/docs/source/en/advanced_inference/outpaint.md/0 | {
"file_path": "diffusers/docs/source/en/advanced_inference/outpaint.md",
"repo_id": "diffusers",
"token_count": 3145
} | 109 |
# Pipeline blocks
## ModularPipelineBlocks
[[autodoc]] diffusers.modular_pipelines.modular_pipeline.ModularPipelineBlocks
## SequentialPipelineBlocks
[[autodoc]] diffusers.modular_pipelines.modular_pipeline.SequentialPipelineBlocks
## LoopSequentialPipelineBlocks
[[autodoc]] diffusers.modular_pipelines.modular_pi... | diffusers/docs/source/en/api/modular_diffusers/pipeline_blocks.md/0 | {
"file_path": "diffusers/docs/source/en/api/modular_diffusers/pipeline_blocks.md",
"repo_id": "diffusers",
"token_count": 159
} | 110 |
<!--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 applica... | diffusers/docs/source/en/api/pipelines/cogvideox.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/cogvideox.md",
"repo_id": "diffusers",
"token_count": 2455
} | 111 |
<!--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... | diffusers/docs/source/en/api/pipelines/dance_diffusion.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/dance_diffusion.md",
"repo_id": "diffusers",
"token_count": 422
} | 112 |
<!--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... | diffusers/docs/source/en/api/pipelines/text_to_video.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/text_to_video.md",
"repo_id": "diffusers",
"token_count": 2721
} | 113 |
<!--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... | diffusers/docs/source/en/api/schedulers/multistep_dpm_solver_inverse.md/0 | {
"file_path": "diffusers/docs/source/en/api/schedulers/multistep_dpm_solver_inverse.md",
"repo_id": "diffusers",
"token_count": 547
} | 114 |
<!--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... | diffusers/docs/source/en/conceptual/evaluation.md/0 | {
"file_path": "diffusers/docs/source/en/conceptual/evaluation.md",
"repo_id": "diffusers",
"token_count": 8470
} | 115 |
<!--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... | diffusers/docs/source/en/modular_diffusers/overview.md/0 | {
"file_path": "diffusers/docs/source/en/modular_diffusers/overview.md",
"repo_id": "diffusers",
"token_count": 658
} | 116 |
<!--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... | diffusers/docs/source/en/optimization/speed-memory-optims.md/0 | {
"file_path": "diffusers/docs/source/en/optimization/speed-memory-optims.md",
"repo_id": "diffusers",
"token_count": 2839
} | 117 |
<!--Copyright 2025 Custom Diffusion authors 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... | diffusers/docs/source/en/training/custom_diffusion.md/0 | {
"file_path": "diffusers/docs/source/en/training/custom_diffusion.md",
"repo_id": "diffusers",
"token_count": 5514
} | 118 |
<!--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... | diffusers/docs/source/en/tutorials/basic_training.md/0 | {
"file_path": "diffusers/docs/source/en/tutorials/basic_training.md",
"repo_id": "diffusers",
"token_count": 6239
} | 119 |
<!--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... | diffusers/docs/source/en/using-diffusers/inference_with_tcd_lora.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/inference_with_tcd_lora.md",
"repo_id": "diffusers",
"token_count": 6012
} | 120 |
<!--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... | diffusers/docs/source/en/using-diffusers/stable_diffusion_jax_how_to.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/stable_diffusion_jax_how_to.md",
"repo_id": "diffusers",
"token_count": 3095
} | 121 |
<!--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... | diffusers/docs/source/ko/api/pipelines/stable_diffusion/stable_diffusion_xl.md/0 | {
"file_path": "diffusers/docs/source/ko/api/pipelines/stable_diffusion/stable_diffusion_xl.md",
"repo_id": "diffusers",
"token_count": 10964
} | 122 |
<!--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... | diffusers/docs/source/ko/optimization/xformers.md/0 | {
"file_path": "diffusers/docs/source/ko/optimization/xformers.md",
"repo_id": "diffusers",
"token_count": 1049
} | 123 |
<!--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... | diffusers/docs/source/ko/tutorials/tutorial_overview.md/0 | {
"file_path": "diffusers/docs/source/ko/tutorials/tutorial_overview.md",
"repo_id": "diffusers",
"token_count": 1209
} | 124 |
<!--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... | diffusers/docs/source/ko/using-diffusers/stable_diffusion_jax_how_to.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/stable_diffusion_jax_how_to.md",
"repo_id": "diffusers",
"token_count": 8474
} | 125 |
# 混合推理 API 参考
## 远程解码
[[autodoc]] utils.remote_utils.remote_decode
## 远程编码
[[autodoc]] utils.remote_utils.remote_encode | diffusers/docs/source/zh/hybrid_inference/api_reference.md/0 | {
"file_path": "diffusers/docs/source/zh/hybrid_inference/api_reference.md",
"repo_id": "diffusers",
"token_count": 83
} | 126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.