text stringlengths 5 424k | id stringlengths 13 178 | metadata dict | __index_level_0__ int64 0 672 |
|---|---|---|---|
# AI 智能体(AI Agent)的可观测性与评估

欢迎来到 **附加单元 2**!在本章中,你将探索用于观测、评估、并最终提升你的AI智能体性能的高级策略。
---
## 📚 我应该在什么时候学习这个附加单元?
如果你符合以下情况,那么这个附加单元非常适合你:
- **开发和部署 AI 智能体:** 你希望确保你的智能体在生产环境中能够可靠地运行。
- **需要详细... | agents-course/units/zh-CN/bonus_unit2/introduction.mdx/0 | {
"file_path": "agents-course/units/zh-CN/bonus_unit2/introduction.mdx",
"repo_id": "agents-course",
"token_count": 1121
} | 19 |
# 消息和特殊 Tokens (Messages and Special Tokens)
现在我们了解了 LLMs 是如何工作的,让我们来看看**它们如何通过聊天模板 (chat templates) 构建生成内容**。
就像使用 ChatGPT 一样,用户通常通过聊天界面与智能体交互。因此,我们需要理解 LLMs 如何管理聊天。
> **问**: 但是...当我与 ChatGPT/Hugging Chat 交互时,我是使用聊天消息进行对话,而不是单个提示序列
>
> **答**: 这是正确的!但这实际上是一个 UI 抽象。在输入 LLM 之前,对话中的所有消息都会被连接成一个单一提示。模型不会"记住"对话:它每次都会完整地读... | agents-course/units/zh-CN/unit1/messages-and-special-tokens.mdx/0 | {
"file_path": "agents-course/units/zh-CN/unit1/messages-and-special-tokens.mdx",
"repo_id": "agents-course",
"token_count": 5878
} | 20 |
# 什么是 `LangGraph`?
`LangGraph` 是由 [LangChain](https://www.langchain.com/) 开发的框架,**用于管理集成 LLM 的应用程序的控制流**。
## `LangGraph` 和 `LangChain` 有何不同?
LangChain 提供了与模型和其他组件交互的标准接口,可用于检索、LLM 调用和工具调用。
LangChain 的类可能会在 LangGraph 中使用,但不是必须的。
这两个包是独立的可以单独使用,但最终你在网上找到的资源都会同时使用这两个包。
## 何时应该使用 `LangGraph`?
### 控制 vs 自由度
在设计 AI 应用时... | agents-course/units/zh-CN/unit2/langgraph/when_to_use_langgraph.mdx/0 | {
"file_path": "agents-course/units/zh-CN/unit2/langgraph/when_to_use_langgraph.mdx",
"repo_id": "agents-course",
"token_count": 2597
} | 21 |
# 小测验 (不计分) [[quiz1]]
让我们用一个快速测验来测试你对 `smolagents` 的理解!请记住,自我测试有助于强化学习并识别可能需要复习的领域。
这是一个可选测验,不计分。
### Q1: 选择 `smolagents` 而非其他框架的主要优势之一是什么?
哪个陈述最能体现 `smolagents` 方法的核心优势?
<Question
choices={[
{
text: "它使用高度专业化的配置文件和陡峭的学习曲线,确保只有专业开发人员能够使用它",
explain: "smolagents 设计注重简单性和最小代码复杂性,而不是陡峭的学习曲线。",
},
{
t... | agents-course/units/zh-CN/unit2/smolagents/quiz1.mdx/0 | {
"file_path": "agents-course/units/zh-CN/unit2/smolagents/quiz1.mdx",
"repo_id": "agents-course",
"token_count": 3676
} | 22 |
# 领取你的证书 🎓
如果你得分**高于30%,恭喜你!👏 你现在有资格领取你的官方证书**。
你可以按照以下步骤领取:
1. 访问[证书页面](https://huggingface.co/spaces/agents-course/Unit4-Final-Certificate)。
2. 使用提供的按钮**登录**你的 Hugging Face 账户。
3. **输入你的全名**,这将是显示在你证书上的名字。
4. 点击“**获取我的证书**”来验证你的分数并下载你的证书。
<img src="https://huggingface.co/datasets/agents-course/course-images/res... | agents-course/units/zh-CN/unit4/get-your-certificate.mdx/0 | {
"file_path": "agents-course/units/zh-CN/unit4/get-your-certificate.mdx",
"repo_id": "agents-course",
"token_count": 526
} | 23 |
# Candle Book
The book uses [mdBook](https://github.com/rust-lang/mdBook) for building.
## Installation
To install mdBook, run `cargo install mdbook`. More instructions can be found [here](https://rust-lang.github.io/mdBook/guide/installation.html).
## Viewing the book
To view the book, run `mdbook serve --open ca... | candle/candle-book/CONTRIBUTING.md/0 | {
"file_path": "candle/candle-book/CONTRIBUTING.md",
"repo_id": "candle",
"token_count": 140
} | 24 |
# Hello world!
We will now create the hello world of the ML world, building a model capable of solving MNIST dataset.
Open `src/main.rs` and fill in this content:
```rust
# extern crate candle_core;
use candle_core::{Device, Result, Tensor};
struct Model {
first: Tensor,
second: Tensor,
}
impl Model {
... | candle/candle-book/src/guide/hello_world.md/0 | {
"file_path": "candle/candle-book/src/guide/hello_world.md",
"repo_id": "candle",
"token_count": 2069
} | 25 |
# Serialization
| candle/candle-book/src/training/serialization.md/0 | {
"file_path": "candle/candle-book/src/training/serialization.md",
"repo_id": "candle",
"token_count": 4
} | 26 |
use crate::benchmarks::{BenchDevice, BenchDeviceHandler};
use candle_core::{DType, Device, Tensor};
use criterion::{black_box, criterion_group, Criterion, Throughput};
use std::time::Instant;
fn run(a: &Tensor, b: &Tensor, c: &Tensor) {
a.where_cond(b, c).unwrap();
}
const fn create_cond_arr<const N: usize>() -> ... | candle/candle-core/benches/benchmarks/where_cond.rs/0 | {
"file_path": "candle/candle-core/benches/benchmarks/where_cond.rs",
"repo_id": "candle",
"token_count": 939
} | 27 |
//! Implementation of Backend Fns for CPU
use crate::backend::{BackendDevice, BackendStorage};
use crate::op::{BinaryOpT, CmpOp, ReduceOp, UnaryOpT};
use crate::{DType, Error, IntDType, Layout, Result, Shape, WithDType};
use float8::F8E4M3;
use half::{bf16, f16};
use rayon::prelude::*;
mod utils;
pub use utils::{
... | candle/candle-core/src/cpu_backend/mod.rs/0 | {
"file_path": "candle/candle-core/src/cpu_backend/mod.rs",
"repo_id": "candle",
"token_count": 69775
} | 28 |
//! ML framework for Rust
//!
//! ```rust
//! use candle_core::{Tensor, DType, Device};
//! # use candle_core::Error;
//! # fn main() -> Result<(), Error>{
//!
//! let a = Tensor::arange(0f32, 6f32, &Device::Cpu)?.reshape((2, 3))?;
//! let b = Tensor::arange(0f32, 12f32, &Device::Cpu)?.reshape((3, 4))?;
//! let c = a.m... | candle/candle-core/src/lib.rs/0 | {
"file_path": "candle/candle-core/src/lib.rs",
"repo_id": "candle",
"token_count": 1891
} | 29 |
use super::k_quants::{
BlockQ2K, BlockQ3K, BlockQ4K, BlockQ4_0, BlockQ5K, BlockQ6K, BlockQ8K, BlockQ8_0, QK8_0, QK_K,
};
use crate::Result;
use byteorder::{ByteOrder, LittleEndian};
#[allow(unused_imports)]
#[cfg(target_arch = "arm")]
use core::arch::arm::*;
#[allow(unused_imports)]
#[cfg(target_arch = "aarch64")... | candle/candle-core/src/quantized/neon.rs/0 | {
"file_path": "candle/candle-core/src/quantized/neon.rs",
"repo_id": "candle",
"token_count": 15290
} | 30 |
use candle_core::backend::BackendStorage;
use candle_core::cpu_backend;
use candle_core::test_utils::to_vec1_round;
use candle_core::{CpuStorage, CustomOp1, DType, Device, Error, Layout, Result, Shape, Tensor};
fn fwd<T: num_traits::Float>(v: T, alpha: f64) -> T {
if v.is_sign_positive() {
v
} else {
... | candle/candle-core/tests/custom_op_tests.rs/0 | {
"file_path": "candle/candle-core/tests/custom_op_tests.rs",
"repo_id": "candle",
"token_count": 2784
} | 31 |
# candle-based
Experimental, not instruction-tuned small LLM from the Hazy Research group, combining local and linear attention layers.
[Blogpost](https://hazyresearch.stanford.edu/blog/2024-03-03-based)
[Simple linear attention language models balance the recall-throughput tradeoff](https://arxiv.org/abs/2402.18668... | candle/candle-examples/examples/based/README.md/0 | {
"file_path": "candle/candle-examples/examples/based/README.md",
"repo_id": "candle",
"token_count": 243
} | 32 |
* candle-codegeex4_9b
THUDM/CodeGeeX4 is a versatile model for all AI software development scenarios, including code completion, code interpreter, web search, function calling, repository-level Q&A and much more.
- [[https://github.com/THUDM/CodeGeeX4][GitHub]]
- [[https://codegeex.cn/][HomePage]]
- [[https://huggingf... | candle/candle-examples/examples/codegeex4-9b/README.org/0 | {
"file_path": "candle/candle-examples/examples/codegeex4-9b/README.org",
"repo_id": "candle",
"token_count": 1130
} | 33 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use clap::{Parser, ValueEnum};
use candle::{DType, IndexOp, D};
use candle_nn::{Module, VarBuilder};
use candle_transformers::models::efficientvit;
#[derive(Clone, Copy, Debug, ValueEnum)]
enum Which {
... | candle/candle-examples/examples/efficientvit/main.rs/0 | {
"file_path": "candle/candle-examples/examples/efficientvit/main.rs",
"repo_id": "candle",
"token_count": 1277
} | 34 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use anyhow::{Error as E, Result};
use clap::Parser;
use candle_transformers::models::gemma::{Config as Config1, Model as Model1};
use candle_transformers::models::gemma2::{Config as Config2, Model as Model... | candle/candle-examples/examples/gemma/main.rs/0 | {
"file_path": "candle/candle-examples/examples/gemma/main.rs",
"repo_id": "candle",
"token_count": 6074
} | 35 |
use crate::model::{Cache, Config, Llama};
use candle::{DType, Device, Result};
use candle_datasets::nlp::tinystories::{Dataset, DatasetRandomIter};
use candle_nn::Optimizer;
fn valid_loss(
dataset: &Dataset,
model: &Llama,
args: &crate::TrainingCmd,
device: &Device,
cache: &mut Cache,
) -> Result<f... | candle/candle-examples/examples/llama2-c/training.rs/0 | {
"file_path": "candle/candle-examples/examples/llama2-c/training.rs",
"repo_id": "candle",
"token_count": 1144
} | 36 |
# candle-mobileone
[MobileOne: An Improved One millisecond Mobile Backbone](https://arxiv.org/abs/2206.04040).
This candle implementation uses a pre-trained MobileOne network for inference. The
classification head has been trained on the ImageNet dataset and returns the
probabilities for the top-5 classes.
## Runnin... | candle/candle-examples/examples/mobileone/README.md/0 | {
"file_path": "candle/candle-examples/examples/mobileone/README.md",
"repo_id": "candle",
"token_count": 254
} | 37 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use candle::{IndexOp, D};
use candle_examples::save_image;
use clap::{Parser, ValueEnum};
#[derive(Clone, Copy, Debug, ValueEnum)]
enum Which {
SqueezeNet,
EfficientNet,
EsrGan,
}
#[derive(Par... | candle/candle-examples/examples/onnx/main.rs/0 | {
"file_path": "candle/candle-examples/examples/onnx/main.rs",
"repo_id": "candle",
"token_count": 1834
} | 38 |
use std::collections::VecDeque;
use candle::{DType, Device, Error, Module, Result, Tensor, Var};
use candle_nn::{
func, linear, sequential::seq, Activation, AdamW, Optimizer, ParamsAdamW, Sequential,
VarBuilder, VarMap,
};
use rand::{distr::Uniform, rng, Rng};
use super::gym_env::GymEnv;
pub struct OuNoise {... | candle/candle-examples/examples/reinforcement-learning/ddpg.rs/0 | {
"file_path": "candle/candle-examples/examples/reinforcement-learning/ddpg.rs",
"repo_id": "candle",
"token_count": 8545
} | 39 |
[
{
"index": 1,
"color": "#787878",
"label": "wall"
},
{
"index": 2,
"color": "#B47878",
"label": "building;edifice"
},
{
"index": 3,
"color": "#06E6E6",
"label": "sky"
},
{
"index": 4,
"color": "#503232",
"label": "floor;flooring"
},
{
"index": 5,
... | candle/candle-examples/examples/segformer/assets/labels.json/0 | {
"file_path": "candle/candle-examples/examples/segformer/assets/labels.json",
"repo_id": "candle",
"token_count": 6397
} | 40 |
def remove_prefix(text, prefix):
return text[text.startswith(prefix) and len(prefix):]
nps = {}
for k, v in model.state_dict().items():
k = remove_prefix(k, 'module_list.')
nps[k] = v.detach().numpy()
np.savez('yolo-v3.ot', **nps)
| candle/candle-examples/examples/yolo-v3/extract-weights.py/0 | {
"file_path": "candle/candle-examples/examples/yolo-v3/extract-weights.py",
"repo_id": "candle",
"token_count": 98
} | 41 |
/******************************************************************************
* Copyright (c) 2023, Tri Dao.
******************************************************************************/
#pragma once
#include "cute/algorithm/copy.hpp"
#include "cutlass/cutlass.h"
#include "cutlass/layout/layout.h"
#include <cu... | candle/candle-flash-attn/kernels/kernel_traits_sm90.h/0 | {
"file_path": "candle/candle-flash-attn/kernels/kernel_traits_sm90.h",
"repo_id": "candle",
"token_count": 3269
} | 42 |
#include "cuda_utils.cuh"
#define BINARY_OP_OUT(TYPENAME, OUT_TYPENAME, FN_NAME, FUNC) \
extern "C" __global__ void FN_NAME( \
const size_t numel, \
const size_t num_dims, \
const size_t *dims_and_strides, \
const TYPENAME *lhs, \
const TYPENAME *rhs, \
OUT_TYPENAME *out \
) { \
const size_... | candle/candle-kernels/src/binary_op_macros.cuh/0 | {
"file_path": "candle/candle-kernels/src/binary_op_macros.cuh",
"repo_id": "candle",
"token_count": 1561
} | 43 |
use anyhow::Result;
use candle_metal_kernels::{
metal::{create_command_buffer, Device},
GemmDType,
};
/// This example contains some simple benchmarks so that it's easy to run them in perf etc.
use clap::{Parser, Subcommand};
use half::f16;
use objc2_metal::MTLResourceOptions;
fn run_gemm(f32: bool, n: usize) ... | candle/candle-metal-kernels/examples/metal_benchmarks.rs/0 | {
"file_path": "candle/candle-metal-kernels/examples/metal_benchmarks.rs",
"repo_id": "candle",
"token_count": 2029
} | 44 |
use crate::utils::{BufferOffset, EncoderProvider};
use crate::{set_params, DType, Kernels, MetalKernelError, Source};
use crate::{Buffer, ComputeCommandEncoder, Device, MTLResourceOptions, MTLSize};
use objc2_metal::MTLResourceUsage;
#[allow(clippy::too_many_arguments)]
pub fn call_arg_sort(
device: &Device,
e... | candle/candle-metal-kernels/src/kernels/sort.rs/0 | {
"file_path": "candle/candle-metal-kernels/src/kernels/sort.rs",
"repo_id": "candle",
"token_count": 4810
} | 45 |
#include <metal_stdlib>
using namespace metal;
template<typename T> METAL_FUNC void fill_with(
device T *out,
constant T &value,
constant size_t &numel,
uint tid [[thread_position_in_grid]]
) {
if (tid >= numel) {
return;
}
out[tid] = value;
}
#define FILL_OP(NAME, T) ... | candle/candle-metal-kernels/src/metal_src/fill.metal/0 | {
"file_path": "candle/candle-metal-kernels/src/metal_src/fill.metal",
"repo_id": "candle",
"token_count": 632
} | 46 |
# candle-nn
| candle/candle-nn/README.md/0 | {
"file_path": "candle/candle-nn/README.md",
"repo_id": "candle",
"token_count": 5
} | 47 |
//! Variable initialization.
// This is based on:
// https://github.com/pytorch/pytorch/blob/07107919297db3f8ab37f11c12666b6d6d5f692e/torch/nn/init.py#
use candle::{DType, Device, Result, Shape, Tensor, Var};
/// Number of features as input or output of a layer.
/// In Kaiming initialization, choosing `FanIn` preserve... | candle/candle-nn/src/init.rs/0 | {
"file_path": "candle/candle-nn/src/init.rs",
"repo_id": "candle",
"token_count": 2212
} | 48 |
/* Equivalent PyTorch code.
import torch
from torch.nn.functional import group_norm
t = torch.tensor(
[[[-0.3034, 0.2726, -0.9659],
[-1.1845, -1.3236, 0.0172],
[ 1.9507, 1.2554, -0.8625],
[ 1.0682, 0.3604, 0.3985],
[-0.4957, -0.4461, -0.9721],
[ 1.5157, -0.... | candle/candle-nn/tests/group_norm.rs/0 | {
"file_path": "candle/candle-nn/tests/group_norm.rs",
"repo_id": "candle",
"token_count": 2154
} | 49 |
import math
from typing import Any
import candle
from candle import Tensor
from .module import Module
# See https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/linear.py
class Identity(Module):
r"""A placeholder identity operator that is argument-insensitive.
Args:
args: any argument (unu... | candle/candle-pyo3/py_src/candle/nn/linear.py/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/nn/linear.py",
"repo_id": "candle",
"token_count": 1947
} | 50 |
# See: https://raw.githubusercontent.com/huggingface/tokenizers/main/bindings/python/stub.py
import argparse
import inspect
import os
from typing import Optional
import black
from pathlib import Path
import re
INDENT = " " * 4
GENERATED_COMMENT = "# Generated content DO NOT EDIT\n"
TYPING = """from typing import Any,... | candle/candle-pyo3/stub.py/0 | {
"file_path": "candle/candle-pyo3/stub.py",
"repo_id": "candle",
"token_count": 3931
} | 51 |
//! BERT (Bidirectional Encoder Representations from Transformers)
//!
//! Bert is a general large language model that can be used for various language tasks:
//! - Compute sentence embeddings for a prompt.
//! - Compute similarities between a set of sentences.
//! - [Arxiv](https://arxiv.org/abs/1810.04805) "BERT: Pre... | candle/candle-transformers/src/models/bert.rs/0 | {
"file_path": "candle/candle-transformers/src/models/bert.rs",
"repo_id": "candle",
"token_count": 10114
} | 52 |
//! Implementation of the Descript Audio Codec (DAC) model
//!
//! See: [Descript Audio Codec](https://github.com/descriptinc/descript-audio-codec)
//!
/// An efficient neural codec for compressing/decompressing audio
///
use crate::models::encodec;
use candle::{IndexOp, Result, Tensor, D};
use candle_nn::{Conv1d, Conv... | candle/candle-transformers/src/models/dac.rs/0 | {
"file_path": "candle/candle-transformers/src/models/dac.rs",
"repo_id": "candle",
"token_count": 5694
} | 53 |
use super::model::{attention, timestep_embedding, Config, EmbedNd};
use crate::quantized_nn::{linear, linear_b, Linear};
use crate::quantized_var_builder::VarBuilder;
use candle::{DType, IndexOp, Result, Tensor, D};
use candle_nn::{LayerNorm, RmsNorm};
fn layer_norm(dim: usize, vb: VarBuilder) -> Result<LayerNorm> {
... | candle/candle-transformers/src/models/flux/quantized_model.rs/0 | {
"file_path": "candle/candle-transformers/src/models/flux/quantized_model.rs",
"repo_id": "candle",
"token_count": 7943
} | 54 |
pub fn get_anyres_image_grid_shape(
image_size: (u32, u32),
grid_pinpoints: &[(u32, u32)],
patch_size: u32,
) -> (u32, u32) {
let (width, height) = select_best_resolution(image_size, grid_pinpoints);
(width / patch_size, height / patch_size)
}
pub fn select_best_resolution(
original_size: (u32,... | candle/candle-transformers/src/models/llava/utils.rs/0 | {
"file_path": "candle/candle-transformers/src/models/llava/utils.rs",
"repo_id": "candle",
"token_count": 689
} | 55 |
// Implement the MMDiT model originally introduced for Stable Diffusion 3 (https://arxiv.org/abs/2403.03206),
// as well as the MMDiT-X variant introduced for Stable Diffusion 3.5-medium (https://huggingface.co/stabilityai/stable-diffusion-3.5-medium)
// This follows the implementation of the MMDiT model in the ComfyUI... | candle/candle-transformers/src/models/mmdit/model.rs/0 | {
"file_path": "candle/candle-transformers/src/models/mmdit/model.rs",
"repo_id": "candle",
"token_count": 4202
} | 56 |
//! Multimodal multi-purpose model combining Gemma-based language model with SigLIP image understanding
//!
//! See PaLiGemma details at:
//! - [Paper](https://arxiv.org/abs/2402.05257)
//! - [Google Blog Post](https://blog.research.google/2024/02/paligemma-scaling-language-image.html)
//!
//! The model is a multimodal... | candle/candle-transformers/src/models/paligemma.rs/0 | {
"file_path": "candle/candle-transformers/src/models/paligemma.rs",
"repo_id": "candle",
"token_count": 2807
} | 57 |
//! Implementation of a quantized Moondream vision language model.
//!
//! Moondream is a lightweight vision-language model for image understanding and generation.
//! This module provides a quantized version for reduced memory usage and faster inference.
//!
//! Key features:
//! - ViT-based vision encoder
//! - Phi-2... | candle/candle-transformers/src/models/quantized_moondream.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_moondream.rs",
"repo_id": "candle",
"token_count": 3810
} | 58 |
//! RepVGG inference implementation
//!
//! Key characteristics:
//! - Efficient inference architecture through structural reparameterization
//! - Single 3x3 conv layer after fusing 3x3 branch, 1x1 branch and identity branch
//! - Different configurations including a0-a2, b0-b3 and variants with group convolutions
//!... | candle/candle-transformers/src/models/repvgg.rs/0 | {
"file_path": "candle/candle-transformers/src/models/repvgg.rs",
"repo_id": "candle",
"token_count": 4487
} | 59 |
//! # Denoising Diffusion Implicit Models
//!
//! The Denoising Diffusion Implicit Models (DDIM) is a simple scheduler
//! similar to Denoising Diffusion Probabilistic Models (DDPM). The DDPM
//! generative process is the reverse of a Markovian process, DDIM generalizes
//! this to non-Markovian guidance.
//!
//! Denoi... | candle/candle-transformers/src/models/stable_diffusion/ddim.rs/0 | {
"file_path": "candle/candle-transformers/src/models/stable_diffusion/ddim.rs",
"repo_id": "candle",
"token_count": 3904
} | 60 |
//! TrOCR model implementation.
//!
//! TrOCR is a Transformer-based OCR model that uses a Vision Transformer encoder
//! and a BART-like decoder for optical character recognition.
//!
//! Key characteristics:
//! - Vision Transformer encoder for image processing
//! - BART-style decoder for text generation
//! - Learn... | candle/candle-transformers/src/models/trocr.rs/0 | {
"file_path": "candle/candle-transformers/src/models/trocr.rs",
"repo_id": "candle",
"token_count": 8631
} | 61 |
//! Würstchen Efficient Diffusion Model
//!
//! Würstchen is an efficient diffusion model architecture for generating images using
//! a two-stage approach with a small decoder and prior network.
//!
//! - 💻 [GH Link](https://github.com/dome272/Wuerstchen)
//! - 🤗 [HF Link](https://github.com/huggingface/diffusers/bl... | candle/candle-transformers/src/models/wuerstchen/mod.rs/0 | {
"file_path": "candle/candle-transformers/src/models/wuerstchen/mod.rs",
"repo_id": "candle",
"token_count": 302
} | 62 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Welcome to Candle!</title>
<link data-trunk rel="copy-file" href="tokenizer.json" />
<link data-trunk rel="copy-file" href="model.bin" />
<link data-trunk rel="rust" href="Cargo.toml" data-bin="app" data-type="main" />
<l... | candle/candle-wasm-examples/llama2-c/index.html/0 | {
"file_path": "candle/candle-wasm-examples/llama2-c/index.html",
"repo_id": "candle",
"token_count": 315
} | 63 |
use candle::{DType, Device, Tensor};
use candle_nn::VarBuilder;
use candle_transformers::{
generation::LogitsProcessor,
models::{moondream, quantized_moondream},
};
use candle_wasm_example_moondream::console_log;
use js_sys::Date;
use serde::{Deserialize, Serialize};
use tokenizers::Tokenizer;
use wasm_bindgen:... | candle/candle-wasm-examples/moondream/src/bin/m.rs/0 | {
"file_path": "candle/candle-wasm-examples/moondream/src/bin/m.rs",
"repo_id": "candle",
"token_count": 4975
} | 64 |
use crate::console_log;
use crate::worker::{ModelData, Segment, Worker, WorkerInput, WorkerOutput};
use js_sys::Date;
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::JsFuture;
use yew::{html, Component, Context, Html};
use yew_agent::{Bridge, Bridged};
const SAMPLE_NAMES: [&str; 6] = [
"audios/samples_jfk.... | candle/candle-wasm-examples/whisper/src/app.rs/0 | {
"file_path": "candle/candle-wasm-examples/whisper/src/app.rs",
"repo_id": "candle",
"token_count": 5668
} | 65 |
use candle_wasm_example_yolo::coco_classes;
use candle_wasm_example_yolo::model::Bbox;
use candle_wasm_example_yolo::worker::Model as M;
use candle_wasm_example_yolo::worker::ModelPose as P;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub struct Model {
inner: M,
}
#[wasm_bindgen]
impl Model {
#[wasm_bindge... | candle/candle-wasm-examples/yolo/src/bin/m.rs/0 | {
"file_path": "candle/candle-wasm-examples/yolo/src/bin/m.rs",
"repo_id": "candle",
"token_count": 840
} | 66 |
Dockerfile
.vscode/
.idea
.gitignore
LICENSE
README.md
node_modules/
.svelte-kit/
.env*
!.env
.env.local
db
models/** | chat-ui/.dockerignore/0 | {
"file_path": "chat-ui/.dockerignore",
"repo_id": "chat-ui",
"token_count": 56
} | 67 |
{
"useTabs": true,
"trailingComma": "es5",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
| chat-ui/.prettierrc/0 | {
"file_path": "chat-ui/.prettierrc",
"repo_id": "chat-ui",
"token_count": 93
} | 68 |
{{- if $.Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations: {{ toYaml .Values.ingress.annotations | nindent 4 }}
labels: {{ include "labels.standard" . | nindent 4 }}
name: {{ include "name" . }}
namespace: {{ .Release.Namespace }}
spec:
{{ if $.Values.ingress.clas... | chat-ui/chart/templates/ingress.yaml/0 | {
"file_path": "chat-ui/chart/templates/ingress.yaml",
"repo_id": "chat-ui",
"token_count": 400
} | 69 |
/Users/vm/.venv/bin/python3: No module named uvicorn
/Users/vm/.venv/bin/python3: No module named uvicorn
| chat-ui/server.log/0 | {
"file_path": "chat-ui/server.log",
"repo_id": "chat-ui",
"token_count": 40
} | 70 |
<script lang="ts">
interface Props {
label?: string;
position?: "top" | "bottom" | "left" | "right";
TooltipClassNames?: string;
children?: import("svelte").Snippet;
}
let { label = "", position = "bottom", TooltipClassNames = "", children }: Props = $props();
const positionClasses = {
top: "bottom-full... | chat-ui/src/lib/components/HoverTooltip.svelte/0 | {
"file_path": "chat-ui/src/lib/components/HoverTooltip.svelte",
"repo_id": "chat-ui",
"token_count": 380
} | 71 |
<script lang="ts">
import Modal from "$lib/components/Modal.svelte";
import { base } from "$app/paths";
import { page } from "$app/state";
import CarbonLink from "~icons/carbon/link";
import CarbonCheckmark from "~icons/carbon/checkmark";
import EosIconsLoading from "~icons/eos-icons/loading";
import CopyToClipB... | chat-ui/src/lib/components/ShareConversationModal.svelte/0 | {
"file_path": "chat-ui/src/lib/components/ShareConversationModal.svelte",
"repo_id": "chat-ui",
"token_count": 2770
} | 72 |
<script lang="ts">
import { invalidateAll } from "$app/navigation";
import { page } from "$app/state";
import { base } from "$app/paths";
import type { Model } from "$lib/types/Model";
interface Props {
models: Model[];
currentModel: Model;
}
let { models, currentModel }: Props = $props();
let selectedMo... | chat-ui/src/lib/components/chat/ModelSwitch.svelte/0 | {
"file_path": "chat-ui/src/lib/components/chat/ModelSwitch.svelte",
"repo_id": "chat-ui",
"token_count": 640
} | 73 |
export const CONV_NUM_PER_PAGE = 30;
| chat-ui/src/lib/constants/pagination.ts/0 | {
"file_path": "chat-ui/src/lib/constants/pagination.ts",
"repo_id": "chat-ui",
"token_count": 15
} | 74 |
import { collections } from "$lib/server/database";
import type { Migration } from ".";
import { ObjectId } from "mongodb";
const migration: Migration = {
_id: new ObjectId("000000000000000000000010"),
name: "Update reports with assistantId to use contentId",
up: async () => {
await collections.reports.updateMany... | chat-ui/src/lib/migrations/routines/10-update-reports-assistantid.ts/0 | {
"file_path": "chat-ui/src/lib/migrations/routines/10-update-reports-assistantid.ts",
"repo_id": "chat-ui",
"token_count": 237
} | 75 |
import type { Sharp } from "sharp";
import sharp from "sharp";
import type { MessageFile } from "$lib/types/Message";
import { z, type util } from "zod";
export interface ImageProcessorOptions<TMimeType extends string = string> {
supportedMimeTypes: TMimeType[];
preferredMimeType: TMimeType;
maxSizeInMB: number;
m... | chat-ui/src/lib/server/endpoints/images.ts/0 | {
"file_path": "chat-ui/src/lib/server/endpoints/images.ts",
"repo_id": "chat-ui",
"token_count": 2311
} | 76 |
import type { ProcessedModel } from "../models";
import type { Endpoint } from "../endpoints/endpoints";
import type { Conversation } from "$lib/types/Conversation";
import type { Message } from "$lib/types/Message";
import type { Assistant } from "$lib/types/Assistant";
export interface TextGenerationContext {
model... | chat-ui/src/lib/server/textGeneration/types.ts/0 | {
"file_path": "chat-ui/src/lib/server/textGeneration/types.ts",
"repo_id": "chat-ui",
"token_count": 191
} | 77 |
import type { Timestamps } from "./Timestamps";
export interface ConversationStats extends Timestamps {
date: {
at: Date;
span: "day" | "week" | "month";
field: "updatedAt" | "createdAt";
};
type: "conversation" | "message";
/** _id => number of conversations/messages in the month */
distinct: "sessionId" ... | chat-ui/src/lib/types/ConversationStats.ts/0 | {
"file_path": "chat-ui/src/lib/types/ConversationStats.ts",
"repo_id": "chat-ui",
"token_count": 134
} | 78 |
import type { ObjectId } from "mongodb";
import type { Timestamps } from "./Timestamps";
export interface User extends Timestamps {
_id: ObjectId;
username?: string;
name: string;
email?: string;
avatarUrl: string | undefined;
hfUserId: string;
isAdmin?: boolean;
isEarlyAccess?: boolean;
}
| chat-ui/src/lib/types/User.ts/0 | {
"file_path": "chat-ui/src/lib/types/User.ts",
"repo_id": "chat-ui",
"token_count": 100
} | 79 |
type Gen<T, TReturn> = AsyncGenerator<T, TReturn, undefined>;
type GenPromiseMap<T, TReturn> = Map<
Gen<T, TReturn>,
Promise<{ gen: Gen<T, TReturn> } & IteratorResult<T, TReturn>>
>;
/** Merges multiple async generators into a single async generator that yields values from all of them in parallel. */
export async f... | chat-ui/src/lib/utils/mergeAsyncGenerators.ts/0 | {
"file_path": "chat-ui/src/lib/utils/mergeAsyncGenerators.ts",
"repo_id": "chat-ui",
"token_count": 407
} | 80 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import { describe, expect, it } from "vitest";
import {
insertLegacyConversation,
insertLinearBranchConversation,
insertSideBranchesConversation,
} from "./treeHelpers.spec";
import { buildSubtree } from "./buildSubtree";
descr... | chat-ui/src/lib/utils/tree/buildSubtree.spec.ts/0 | {
"file_path": "chat-ui/src/lib/utils/tree/buildSubtree.spec.ts",
"repo_id": "chat-ui",
"token_count": 1375
} | 81 |
import { json } from "@sveltejs/kit";
import { logger } from "$lib/server/logger";
import { computeAllStats } from "$lib/jobs/refresh-conversation-stats";
// Triger like this:
// curl -X POST "http://localhost:5173/chat/admin/stats/compute" -H "Authorization: Bearer <ADMIN_API_SECRET>"
export async function POST() {
... | chat-ui/src/routes/admin/stats/compute/+server.ts/0 | {
"file_path": "chat-ui/src/routes/admin/stats/compute/+server.ts",
"repo_id": "chat-ui",
"token_count": 161
} | 82 |
export async function GET() {
return new Response("OK", { status: 200 });
}
| chat-ui/src/routes/healthcheck/+server.ts/0 | {
"file_path": "chat-ui/src/routes/healthcheck/+server.ts",
"repo_id": "chat-ui",
"token_count": 22
} | 83 |
import { collections } from "$lib/server/database";
import { z } from "zod";
import { authCondition } from "$lib/server/auth";
import { DEFAULT_SETTINGS, type SettingsEditable } from "$lib/types/Settings";
export async function POST({ request, locals }) {
const body = await request.json();
const { welcomeModalSeen,... | chat-ui/src/routes/settings/(nav)/+server.ts/0 | {
"file_path": "chat-ui/src/routes/settings/(nav)/+server.ts",
"repo_id": "chat-ui",
"token_count": 459
} | 84 |
# How to contribute to Datasets?
[](CODE_OF_CONDUCT.md)
Datasets is an open source project, so all contributions and suggestions are welcome.
You can contribute in many different ways: giving ideas, answering questions, reporti... | datasets/CONTRIBUTING.md/0 | {
"file_path": "datasets/CONTRIBUTING.md",
"repo_id": "datasets",
"token_count": 1794
} | 85 |
# Cache management
When you download a dataset from Hugging Face, the data are stored locally on your computer.
Files from Hugging Face are stored as usual in the `huggingface_hub` cache, which is at `~/.cache/huggingface/hub` by default.
See the [Hub cache documentation](https://huggingface.co/docs/huggingface_hub/gu... | datasets/docs/source/cache.mdx/0 | {
"file_path": "datasets/docs/source/cache.mdx",
"repo_id": "datasets",
"token_count": 1363
} | 86 |
# Datasets
<img class="float-left !m-0 !border-0 !dark:border-0 !shadow-none !max-w-lg w-[150px]" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/datasets_logo.png"/>
🤗 Datasets is a library for easily accessing and sharing AI datasets for Audio, Computer Vision, and Natur... | datasets/docs/source/index.mdx/0 | {
"file_path": "datasets/docs/source/index.mdx",
"repo_id": "datasets",
"token_count": 1017
} | 87 |
# Share a dataset using the CLI
At Hugging Face, we are on a mission to democratize good Machine Learning and we believe in the value of open source. That's why we designed 🤗 Datasets so that anyone can share a dataset with the greater ML community. There are currently thousands of datasets in over 100 languages in t... | datasets/docs/source/share.mdx/0 | {
"file_path": "datasets/docs/source/share.mdx",
"repo_id": "datasets",
"token_count": 2692
} | 88 |
# Load video data
> [!WARNING]
> Video support is experimental and is subject to change.
Video datasets have [`Video`] type columns, which contain `torchvision` objects.
> [!TIP]
> To work with video datasets, you need to have the `torchvision` and `av` packages installed. Check out the [installation](https://github... | datasets/docs/source/video_load.mdx/0 | {
"file_path": "datasets/docs/source/video_load.mdx",
"repo_id": "datasets",
"token_count": 2178
} | 89 |
import os
import re
from functools import partial
from glob import has_magic
from pathlib import Path, PurePath
from typing import Callable, Optional, Union
import huggingface_hub
from fsspec.core import url_to_fs
from huggingface_hub import HfFileSystem
from packaging import version
from tqdm.contrib.concurrent impor... | datasets/src/datasets/data_files.py/0 | {
"file_path": "datasets/src/datasets/data_files.py",
"repo_id": "datasets",
"token_count": 13454
} | 90 |
import importlib
import shutil
import warnings
from typing import List
import fsspec
import fsspec.asyn
from fsspec.implementations.local import LocalFileSystem
from . import compression
COMPRESSION_FILESYSTEMS: list[compression.BaseCompressedFileFileSystem] = [
compression.Bz2FileSystem,
compression.GzipFi... | datasets/src/datasets/filesystems/__init__.py/0 | {
"file_path": "datasets/src/datasets/filesystems/__init__.py",
"repo_id": "datasets",
"token_count": 564
} | 91 |
from typing import Callable, Optional
from .. import Features, NamedSplit, Split
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream
class GeneratorDatasetInputStream(AbstractDatasetInputStream):
def __init__(
self,
generator: Callable,
... | datasets/src/datasets/io/generator.py/0 | {
"file_path": "datasets/src/datasets/io/generator.py",
"repo_id": "datasets",
"token_count": 920
} | 92 |
import glob
import json
import os
import shutil
import time
from pathlib import Path
from typing import Optional, Union
import pyarrow as pa
import datasets
import datasets.config
import datasets.data_files
from datasets.naming import camelcase_to_snakecase, filenames_for_dataset_split
logger = datasets.utils.loggi... | datasets/src/datasets/packaged_modules/cache/cache.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/cache/cache.py",
"repo_id": "datasets",
"token_count": 3782
} | 93 |
import itertools
from dataclasses import dataclass
from typing import Optional, Union
import pyarrow as pa
import pyarrow.dataset as ds
import pyarrow.parquet as pq
import datasets
from datasets.table import table_cast
logger = datasets.utils.logging.get_logger(__name__)
@dataclass
class ParquetConfig(datasets.Bu... | datasets/src/datasets/packaged_modules/parquet/parquet.py/0 | {
"file_path": "datasets/src/datasets/packaged_modules/parquet/parquet.py",
"repo_id": "datasets",
"token_count": 2413
} | 94 |
from .parallel import ParallelBackendConfig, parallel_backend, parallel_map
| datasets/src/datasets/parallel/__init__.py/0 | {
"file_path": "datasets/src/datasets/parallel/__init__.py",
"repo_id": "datasets",
"token_count": 19
} | 95 |
from functools import partial
from huggingface_hub import hf_hub_url
from huggingface_hub.utils import get_session, hf_raise_for_status
hf_dataset_url = partial(hf_hub_url, repo_type="dataset")
def check_auth(hf_api, repo_id, token=None):
headers = hf_api._build_hf_headers(token=token)
path = f"{hf_api.end... | datasets/src/datasets/utils/hub.py/0 | {
"file_path": "datasets/src/datasets/utils/hub.py",
"repo_id": "datasets",
"token_count": 180
} | 96 |
from collections.abc import Iterable, Iterator
class tracked_str(str):
origins = {}
def set_origin(self, origin: str):
if super().__repr__() not in self.origins:
self.origins[super().__repr__()] = origin
def get_origin(self):
return self.origins.get(super().__repr__(), str(se... | datasets/src/datasets/utils/track.py/0 | {
"file_path": "datasets/src/datasets/utils/track.py",
"repo_id": "datasets",
"token_count": 824
} | 97 |
import h5py
import numpy as np
import pytest
from datasets import Array2D, Array3D, Array4D, Features, List, Value, load_dataset
from datasets.builder import InvalidConfigName
from datasets.data_files import DataFilesList
from datasets.exceptions import DatasetGenerationError
from datasets.packaged_modules.hdf5.hdf5 i... | datasets/tests/packaged_modules/test_hdf5.py/0 | {
"file_path": "datasets/tests/packaged_modules/test_hdf5.py",
"repo_id": "datasets",
"token_count": 13606
} | 98 |
import os
import sys
from pathlib import Path
import pytest
from datasets import Dataset, IterableDataset
from datasets.distributed import split_dataset_by_node
from .utils import execute_subprocess_async, get_torch_dist_unique_port, require_torch
def test_split_dataset_by_node_map_style():
full_ds = Dataset.f... | datasets/tests/test_distributed.py/0 | {
"file_path": "datasets/tests/test_distributed.py",
"repo_id": "datasets",
"token_count": 2244
} | 99 |
import re
import sys
import tempfile
import unittest
from pathlib import Path
import pytest
import yaml
from huggingface_hub import DatasetCard, DatasetCardData
from datasets.config import METADATA_CONFIGS_FIELD
from datasets.features import Features, Value
from datasets.info import DatasetInfo
from datasets.utils.me... | datasets/tests/test_metadata_util.py/0 | {
"file_path": "datasets/tests/test_metadata_util.py",
"repo_id": "datasets",
"token_count": 5774
} | 100 |
<!--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/normalization.md/0 | {
"file_path": "diffusers/docs/source/en/api/normalization.md",
"repo_id": "diffusers",
"token_count": 578
} | 101 |
<!--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/cogview4.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/cogview4.md",
"repo_id": "diffusers",
"token_count": 429
} | 102 |
<!--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/stable_diffusion/inpaint.md/0 | {
"file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/inpaint.md",
"repo_id": "diffusers",
"token_count": 667
} | 103 |
# Hybrid Inference API Reference
## Remote Decode
[[autodoc]] utils.remote_utils.remote_decode
## Remote Encode
[[autodoc]] utils.remote_utils.remote_encode
| diffusers/docs/source/en/hybrid_inference/api_reference.md/0 | {
"file_path": "diffusers/docs/source/en/hybrid_inference/api_reference.md",
"repo_id": "diffusers",
"token_count": 55
} | 104 |
<!--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/quickstart.md/0 | {
"file_path": "diffusers/docs/source/en/modular_diffusers/quickstart.md",
"repo_id": "diffusers",
"token_count": 5672
} | 105 |
<!--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": 2845
} | 106 |
# Create a dataset for training
There are many datasets on the [Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) to train a model on, but if you can't find one you're interested in or want to use your own, you can create a dataset with the 🤗 [Datasets](https://hugging... | diffusers/docs/source/en/training/create_dataset.md/0 | {
"file_path": "diffusers/docs/source/en/training/create_dataset.md",
"repo_id": "diffusers",
"token_count": 1309
} | 107 |
<!--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/autopipeline.md/0 | {
"file_path": "diffusers/docs/source/en/tutorials/autopipeline.md",
"repo_id": "diffusers",
"token_count": 926
} | 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/using-diffusers/inference_with_lcm.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/inference_with_lcm.md",
"repo_id": "diffusers",
"token_count": 9014
} | 109 |
<!--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/svd.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/svd.md",
"repo_id": "diffusers",
"token_count": 1829
} | 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 applicable law or agreed... | diffusers/docs/source/ko/conceptual/contribution.md/0 | {
"file_path": "diffusers/docs/source/ko/conceptual/contribution.md",
"repo_id": "diffusers",
"token_count": 35978
} | 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/ko/quicktour.md/0 | {
"file_path": "diffusers/docs/source/ko/quicktour.md",
"repo_id": "diffusers",
"token_count": 11452
} | 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/ko/using-diffusers/conditional_image_generation.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/conditional_image_generation.md",
"repo_id": "diffusers",
"token_count": 1550
} | 113 |
<!--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... | diffusers/docs/source/ko/using-diffusers/svd.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/svd.md",
"repo_id": "diffusers",
"token_count": 3466
} | 114 |
<!--版权 2025 HuggingFace 团队。保留所有权利。
根据 Apache 许可证 2.0 版本("许可证")授权;除非遵守许可证,否则不得使用此文件。
您可以在以下网址获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅许可证以了解具体的语言管理权限和限制。
-->
# 混合推理
**通过混合推理赋能本地 AI 构建者**
> [!TIP]
> 混合推理是一项[实验性功能](https://huggingface.co/blog/remote_va... | diffusers/docs/source/zh/hybrid_inference/overview.md/0 | {
"file_path": "diffusers/docs/source/zh/hybrid_inference/overview.md",
"repo_id": "diffusers",
"token_count": 1485
} | 115 |
<!--版权所有 2025 The HuggingFace Team。保留所有权利。
根据 Apache 许可证 2.0 版本("许可证")授权;除非遵守许可证,否则不得使用此文件。您可以在以下网址获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,无任何明示或暗示的担保或条件。有关许可证的具体语言,请参阅许可证中的权限和限制。
-->
# DeepCache
[DeepCache](https://huggingface.co/papers/2312.00858) 通过策略性地缓存和重用高级特征,同时利用... | diffusers/docs/source/zh/optimization/deepcache.md/0 | {
"file_path": "diffusers/docs/source/zh/optimization/deepcache.md",
"repo_id": "diffusers",
"token_count": 2598
} | 116 |
<!--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/zh/stable_diffusion.md/0 | {
"file_path": "diffusers/docs/source/zh/stable_diffusion.md",
"repo_id": "diffusers",
"token_count": 6142
} | 117 |
# Advanced diffusion training examples
## Train Dreambooth LoRA with Flux.1 Dev
> [!TIP]
> 💡 This example follows some of the techniques and recommended practices covered in the community derived guide we made for SDXL training: [LoRA training scripts of the world, unite!](https://huggingface.co/blog/sdxl_lora_advanc... | diffusers/examples/advanced_diffusion_training/README_flux.md/0 | {
"file_path": "diffusers/examples/advanced_diffusion_training/README_flux.md",
"repo_id": "diffusers",
"token_count": 6906
} | 118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.