text stringlengths 5 424k | id stringlengths 13 178 | metadata dict | __index_level_0__ int64 0 672 |
|---|---|---|---|
# ¿Y ahora? ¿Qué temas debería aprender?
La IA Agéntica es un campo en rápida evolución, y comprender los protocolos fundamentales es esencial para construir sistemas inteligentes y autónomos.
Dos estándares importantes con los que deberías familiarizarte son:
- El **Protocolo de Contexto del Modelo (MCP)**
- El **P... | agents-course/units/es/unit4/additional-readings.mdx/0 | {
"file_path": "agents-course/units/es/unit4/additional-readings.mdx",
"repo_id": "agents-course",
"token_count": 674
} | 10 |
# Conclusion
Si vous êtes arrivé jusqu'ici, félicitations ! 🥳 Vous avez construit avec succès votre propre agent de combat Pokémon ! ⚔️🎮
Vous avez maîtrisé les fondamentaux des **flux de travail agentiques**, connecté un **LLM** à un environnement de jeu, et déployé un Agent intelligent prêt à affronter les défis d... | agents-course/units/fr/bonus-unit3/conclusion.mdx/0 | {
"file_path": "agents-course/units/fr/bonus-unit3/conclusion.mdx",
"repo_id": "agents-course",
"token_count": 447
} | 11 |
# Messages et *tokens* spéciaux
Maintenant que nous comprenons comment fonctionnent les LLM, examinons **comment ils structurent leurs générations via des patrons de chat (appelés aussi gabarit de chat)**.
Tout comme avec ChatGPT, les utilisateurs interagissent généralement avec les agents via une interface de chat. ... | agents-course/units/fr/unit1/messages-and-special-tokens.mdx/0 | {
"file_path": "agents-course/units/fr/unit1/messages-and-special-tokens.mdx",
"repo_id": "agents-course",
"token_count": 4350
} | 12 |
# Qu'est-ce que LangGraph ?
`LangGraph` est un *framework* développé par [LangChain](https://www.langchain.com/) **pour gérer le flux de contrôle des applications qui intègrent un LLM**.
## `LangGraph` est-il différent de `LangChain` ?
LangChain fournit une interface standard pour interagir avec les modèles et autre... | agents-course/units/fr/unit2/langgraph/when_to_use_langgraph.mdx/0 | {
"file_path": "agents-course/units/fr/unit2/langgraph/when_to_use_langgraph.mdx",
"repo_id": "agents-course",
"token_count": 1690
} | 13 |
# Petit Quiz (non noté) [[quiz1]]
Testons votre compréhension de `smolagents` avec un rapide quiz ! N'oubliez pas, se tester aide à renforcer l'apprentissage et à identifier les domaines qui pourraient nécessiter une révision.
Ceci est un quiz optionnel et il n'est pas noté.
### Q1 : Quel est l'un des principaux ava... | agents-course/units/fr/unit2/smolagents/quiz1.mdx/0 | {
"file_path": "agents-course/units/fr/unit2/smolagents/quiz1.mdx",
"repo_id": "agents-course",
"token_count": 2570
} | 14 |
# Obtenez votre certificat 🎓
Si vous avez obtenu un score **supérieur à 30%, félicitations ! 👏 Vous êtes maintenant éligible pour réclamer votre certificat officiel.**
Suivez les étapes ci-dessous pour le recevoir :
1. Visitez la [page du certificat](https://huggingface.co/spaces/agents-course/Unit4-Final-Certific... | agents-course/units/fr/unit4/get-your-certificate.mdx/0 | {
"file_path": "agents-course/units/fr/unit4/get-your-certificate.mdx",
"repo_id": "agents-course",
"token_count": 470
} | 15 |
# 메세지와 특수 토큰 [[messages-and-special-tokens]]
이제 LLM이 어떻게 동작하는지 이해했으니, **채팅 템플릿을 통해 생성 결과를 구조화**하는 방법을 살펴보겠습니다.
예로 ChatGPT를 떠올려봅시다. 사용자는 에이전트(Agent)와 상호작용 할 때 채팅 인터페이스를 사용합니다. 따라서 LLM이 어떻게 채팅을 관리하는지 이해하는 것은 중요합니다.
> **Q**: 하지만 ... 저는 ChatGPT/Hugging Chat을 사용할 때 프롬프트가 아니라 메세지로 대화를 주고 받는 데요?
>
> **A**: 맞습니다! 하지만 사실 그 메... | agents-course/units/ko/unit1/messages-and-special-tokens.mdx/0 | {
"file_path": "agents-course/units/ko/unit1/messages-and-special-tokens.mdx",
"repo_id": "agents-course",
"token_count": 9435
} | 16 |
# (Необязательно) Discord 101 [[discord-101]]
<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit0/discord-etiquette.jpg" alt="Этикет Discord" width="100%"/>
Это руководство поможет вам начать работу с Discord, бесплатной чат-платформой, популярной в игровых и ML-сообществах.
П... | agents-course/units/ru-RU/unit0/discord101.mdx/0 | {
"file_path": "agents-course/units/ru-RU/unit0/discord101.mdx",
"repo_id": "agents-course",
"token_count": 2376
} | 17 |
# Что такое Инструменты?
<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit1/whiteboard-check-2.jpg" alt="Раздел 1 планирование"/>
Одним из важнейших аспектов AI Агентов является их способность предпринимать **действия**. Как мы видели, это происходит благодаря использованию **... | agents-course/units/ru-RU/unit1/tools.mdx/0 | {
"file_path": "agents-course/units/ru-RU/unit1/tools.mdx",
"repo_id": "agents-course",
"token_count": 12534
} | 18 |
# Kết luận [[conclusion]]
Chúc mừng bạn đã hoàn thành chương đầu tiên 🥳
Bạn vừa **nắm vững kiến thức cơ bản về Agents** và đã tạo ra AI agent đầu tiên của mình!
**Việc vẫn còn bối rối với một số khái niệm là hoàn toàn bình thường**. Agents là chủ đề phức tạp và cần thời gian để hiểu sâu mọi khía cạnh.
**Hãy dành t... | agents-course/units/vi/unit1/conclusion.mdx/0 | {
"file_path": "agents-course/units/vi/unit1/conclusion.mdx",
"repo_id": "agents-course",
"token_count": 933
} | 19 |
- title: 第 0 单元. 课程欢迎
sections:
- local: unit0/introduction
title: 欢迎来到课程 🤗
- local: unit0/onboarding
title: 入门指南
- local: unit0/discord101
title: (可选) Discord 使用指南
- title: 直播 1. 课程运作方式和问答
sections:
- local: communication/live1
title: 直播 1. 课程运作方式和问答
- title: 第 1 单元. 智能体简介
... | agents-course/units/zh-CN/_toctree.yml/0 | {
"file_path": "agents-course/units/zh-CN/_toctree.yml",
"repo_id": "agents-course",
"token_count": 3439
} | 20 |
# 后续单元发布时间表及常见问题解答
课程单元发布时间安排如下:
<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/communication/next-units.jpg" alt="下一单元" width="100%"/>
请务必 <a href="https://bit.ly/hf-learn-agents">完成课程注册</a>! 完成注册后, **我们将随单元发布进度为您推送专属学习链接,同步更新挑战任务详情及课程动态**。
持续精进,成就卓越 🤗 | agents-course/units/zh-CN/communication/next-units.mdx/0 | {
"file_path": "agents-course/units/zh-CN/communication/next-units.mdx",
"repo_id": "agents-course",
"token_count": 290
} | 21 |
# 什么是工具?
<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit1/whiteboard-check-2.jpg" alt="Unit 1 planning"/>
AI 智能体的关键能力在于执行**行动**。正如前文所述,这通过**工具**的使用实现。
本节将学习工具的定义、有效设计方法,以及如何通过系统消息将其集成到智能体中。
通过为智能体配备合适的工具——并清晰描述这些工具的工作原理——可显著提升 AI 的能力边界。让我们深入探讨!
## AI 工具的定义
**工具是赋予 LLM 的函... | agents-course/units/zh-CN/unit1/tools.mdx/0 | {
"file_path": "agents-course/units/zh-CN/unit1/tools.mdx",
"repo_id": "agents-course",
"token_count": 7598
} | 22 |
# LlamaIndex 简介
欢迎来到本模块,您将学习如何使用 [LlamaIndex](https://www.llamaindex.ai/) 工具包构建基于大语言模型(LLM)的智能体。
LlamaIndex 是**通过索引和工作流在您的数据上创建 LLM 驱动智能体的完整工具包**。本课程我们将重点关注构建 LlamaIndex 智能体的三个核心部分:**组件**、**智能体与工具**以及**工作流**。
]
use libc::{c_char, c_double, c_float, c_int, c_long, c_ulong};
mod ffi {
use super::*;
extern "C" {
// It would be nice to be able to switch to the NEWLAPACK version of the function but this
// seems to trigger some link error. Available function names can be seen here:
... | candle/candle-core/src/accelerate.rs/0 | {
"file_path": "candle/candle-core/src/accelerate.rs",
"repo_id": "candle",
"token_count": 7639
} | 28 |
//! Implementation of Backend traits for CUDA device
//!
use crate::backend::{BackendDevice, BackendStorage};
use crate::op::{BinaryOpT, CmpOp, ReduceOp, UnaryOpT};
use crate::{builder_arg as barg, CpuStorage, DType, Layout, Result, WithDType};
pub use candle_kernels as kernels;
pub use cudarc;
use cudarc::cublas::{Gem... | candle/candle-core/src/cuda_backend/mod.rs/0 | {
"file_path": "candle/candle-core/src/cuda_backend/mod.rs",
"repo_id": "candle",
"token_count": 49300
} | 29 |
//! Tensor Operation Enums and Traits
//!
#![allow(clippy::redundant_closure_call)]
use crate::Tensor;
use float8::F8E4M3;
use half::{bf16, f16};
use num_traits::float::Float;
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum CmpOp {
Eq,
Ne,
Le,
Ge,
Lt,
Gt,
}
#[derive(Debug, Clone, Copy, PartialE... | candle/candle-core/src/op.rs/0 | {
"file_path": "candle/candle-core/src/op.rs",
"repo_id": "candle",
"token_count": 14932
} | 30 |
//! The shape of a tensor is a tuple with the size of each of its dimensions.
#![allow(clippy::redundant_closure_call)]
use crate::{Error, Result};
#[derive(Clone, PartialEq, Eq)]
pub struct Shape(Vec<usize>);
pub const SCALAR: Shape = Shape(vec![]);
impl std::fmt::Debug for Shape {
fn fmt(&self, f: &mut std::fm... | candle/candle-core/src/shape.rs/0 | {
"file_path": "candle/candle-core/src/shape.rs",
"repo_id": "candle",
"token_count": 10096
} | 31 |
use candle::{test_device, Device, IndexOp, Result, Tensor};
use candle_core as candle;
fn contiguous(device: &Device) -> Result<()> {
let tensor = Tensor::arange(0u32, 24u32, device)?.reshape((2, 3, 4))?;
assert_eq!(
tensor.to_vec3::<u32>()?,
&[
[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 1... | candle/candle-core/tests/layout_tests.rs/0 | {
"file_path": "candle/candle-core/tests/layout_tests.rs",
"repo_id": "candle",
"token_count": 2819
} | 32 |
use hf_hub::{
api::sync::{Api, ApiRepo},
Repo, RepoType,
};
use parquet::file::reader::SerializedFileReader;
use std::fs::File;
/// Re-export of the `FileReader` trait from the `parquet` crate.
///
/// This trait provides access to Parquet file metadata and row groups:
/// - [`FileReader::metadata`]
/// - [`Fi... | candle/candle-datasets/src/hub.rs/0 | {
"file_path": "candle/candle-datasets/src/hub.rs",
"repo_id": "candle",
"token_count": 1152
} | 33 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use candle_transformers::models::bert::{BertModel, Config, HiddenAct, DTYPE};
use anyhow::{Error as E, Result};
use candle::Tensor;
use candle_nn::VarBuilder;
use clap::Parser;
use hf_hub::{api::sync::Api, ... | candle/candle-examples/examples/bert/main.rs/0 | {
"file_path": "candle/candle-examples/examples/bert/main.rs",
"repo_id": "candle",
"token_count": 3718
} | 34 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use clap::Parser;
use candle::{DType, IndexOp, D};
use candle_nn::{Module, VarBuilder};
use candle_transformers::models::convmixer;
#[derive(Parser)]
struct Args {
#[arg(long)]
model: Option<Strin... | candle/candle-examples/examples/convmixer/main.rs/0 | {
"file_path": "candle/candle-examples/examples/convmixer/main.rs",
"repo_id": "candle",
"token_count": 768
} | 35 |
use enterpolation::linear::ConstEquidistantLinear;
use enterpolation::Generator;
use palette::LinSrgb;
use candle::Tensor;
pub struct SpectralRColormap {
gradient: ConstEquidistantLinear<f32, LinSrgb, 9>,
}
impl SpectralRColormap {
pub(crate) fn new() -> Self {
// Define a colormap similar to 'Spectr... | candle/candle-examples/examples/depth_anything_v2/color_map.rs/0 | {
"file_path": "candle/candle-examples/examples/depth_anything_v2/color_map.rs",
"repo_id": "candle",
"token_count": 896
} | 36 |
# candle-eva2
[EVA-02](https://arxiv.org/abs/2303.11331) is a computer vision model.
In this example, it is used as an ImageNet classifier: the model returns the
probability for the image to belong to each of the 1000 ImageNet categories.
## Running some example
```bash
cargo run --example eva2 --release -- --image ... | candle/candle-examples/examples/eva2/README.md/0 | {
"file_path": "candle/candle-examples/examples/eva2/README.md",
"repo_id": "candle",
"token_count": 264
} | 37 |
# gte-Qwen1.5-7B-instruct
gte-Qwen1.5-7B-instruct is a variant of the GTE embedding model family.
- [Model card](https://huggingface.co/Alibaba-NLP/gte-Qwen1.5-7B-instruct) on the HuggingFace Hub.
- [Technical report](https://arxiv.org/abs/2308.03281) *Towards General Text Embeddings with Multi-stage Contrastive Lear... | candle/candle-examples/examples/gte-qwen/README.md/0 | {
"file_path": "candle/candle-examples/examples/gte-qwen/README.md",
"repo_id": "candle",
"token_count": 229
} | 38 |
use std::cmp::min;
use candle::{bail, DType, Device, Result, Tensor};
use candle_transformers::models::llava::{
config::{HFPreProcessorConfig, LLaVAConfig},
utils::select_best_resolution,
};
use hf_hub::api::sync::Api;
use image::{imageops::overlay, DynamicImage, GenericImageView, Rgb, RgbImage};
use serde::{D... | candle/candle-examples/examples/llava/image_processor.rs/0 | {
"file_path": "candle/candle-examples/examples/llava/image_processor.rs",
"repo_id": "candle",
"token_count": 4902
} | 39 |
#[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::{DType, Device, Tensor};
use candle_nn::VarBuilder;
use candle_transformers::{
generation::LogitsProcessor,
models::{moondream, quant... | candle/candle-examples/examples/moondream/main.rs/0 | {
"file_path": "candle/candle-examples/examples/moondream/main.rs",
"repo_id": "candle",
"token_count": 5490
} | 40 |
#[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::paligemma::{Config, Model};
use candle::{DType, Device, Tensor};
use candle_examples::token_output_stream::TokenOutputS... | candle/candle-examples/examples/paligemma/main.rs/0 | {
"file_path": "candle/candle-examples/examples/paligemma/main.rs",
"repo_id": "candle",
"token_count": 3973
} | 41 |
# candle-quantized-t5
Candle implementation for quantizing and running T5 translation models.
## Seq2Seq example
This example uses a quantized version of the t5 model.
```bash
$ cargo run --example quantized-t5 --release -- --prompt "translate to German: A beautiful candle."
...
Eine schöne Kerze.
```
## Generati... | candle/candle-examples/examples/quantized-t5/README.md/0 | {
"file_path": "candle/candle-examples/examples/quantized-t5/README.md",
"repo_id": "candle",
"token_count": 698
} | 42 |
//! Vectorized version of the gym environment.
use candle::{DType, Device, Result, Tensor};
use pyo3::prelude::*;
#[allow(unused)]
#[derive(Debug)]
pub struct Step {
pub obs: Tensor,
pub reward: Tensor,
pub is_done: Tensor,
}
#[allow(unused)]
pub struct VecGymEnv {
env: PyObject,
action_space: usi... | candle/candle-examples/examples/reinforcement-learning/vec_gym_env.rs/0 | {
"file_path": "candle/candle-examples/examples/reinforcement-learning/vec_gym_env.rs",
"repo_id": "candle",
"token_count": 1572
} | 43 |
# candle-stable-diffusion: A Diffusers API in Rust/Candle

_A rusty robot holding a fire torch in its hand_, generated by Stable Diffusion
XL using Rust and [candle](https://github.com/huggingface/candle).
The `stable-diffusion` example is a conversion... | candle/candle-examples/examples/stable-diffusion/README.md/0 | {
"file_path": "candle/candle-examples/examples/stable-diffusion/README.md",
"repo_id": "candle",
"token_count": 935
} | 44 |
## VGG Model Implementation
This example demonstrates the implementation of VGG models (VGG13, VGG16, VGG19) using the Candle library.
The VGG models are defined in `candle-transformers/src/models/vgg.rs`. The main function in `candle-examples/examples/vgg/main.rs` loads an image, selects the VGG model based on the p... | candle/candle-examples/examples/vgg/README.md/0 | {
"file_path": "candle/candle-examples/examples/vgg/README.md",
"repo_id": "candle",
"token_count": 206
} | 45 |
#include <cmath>
#include <cute/tensor.hpp>
#include <cutlass/cutlass.h>
#include <cutlass/array.h>
#include "utils.h"
namespace flash {
using namespace cute;
////////////////////////////////////////////////////////////////////////////////////////////////////
template <bool Is_causal>
struct Alibi {
const f... | candle/candle-flash-attn/kernels/alibi.h/0 | {
"file_path": "candle/candle-flash-attn/kernels/alibi.h",
"repo_id": "candle",
"token_count": 1556
} | 46 |
// Copyright (c) 2024, Tri Dao.
// Splitting the different head dimensions to different files to speed up compilation.
// This file is auto-generated. See "generate_kernels.py"
#include "flash_fwd_launch_template.h"
template<>
void run_mha_fwd_<cutlass::half_t, 192, true>(Flash_fwd_params ¶ms, cudaStream_t stream... | candle/candle-flash-attn/kernels/flash_fwd_hdim192_fp16_causal_sm80.cu/0 | {
"file_path": "candle/candle-flash-attn/kernels/flash_fwd_hdim192_fp16_causal_sm80.cu",
"repo_id": "candle",
"token_count": 138
} | 47 |
/******************************************************************************
* Copyright (c) 2024, Tri Dao.
******************************************************************************/
#pragma once
#include <cmath>
#include <cute/tensor.hpp>
#include <cutlass/numeric_types.h>
#include "philox.cuh"
#include... | candle/candle-flash-attn/kernels/softmax.h/0 | {
"file_path": "candle/candle-flash-attn/kernels/softmax.h",
"repo_id": "candle",
"token_count": 4008
} | 48 |
#include<stdint.h>
#include "cuda_fp16.h"
#include "cuda_utils.cuh"
template<typename T>
__device__ void fill_with(T *buf, T value, const size_t numel) {
for (unsigned int i = blockIdx.x * blockDim.x + threadIdx.x; i < numel; i += blockDim.x * gridDim.x) {
buf[i] = value;
}
}
extern "C" __global__ void... | candle/candle-kernels/src/fill.cu/0 | {
"file_path": "candle/candle-kernels/src/fill.cu",
"repo_id": "candle",
"token_count": 1598
} | 49 |
use crate::linear_split;
use crate::utils::{BufferOffset, EncoderProvider};
use crate::{set_params, Buffer, ComputeCommandEncoder, Device, Kernels, MetalKernelError, Source};
use objc2_metal::MTLResourceUsage;
#[allow(clippy::too_many_arguments)]
pub fn call_cast_contiguous(
device: &Device,
ep: impl EncoderPr... | candle/candle-metal-kernels/src/kernels/cast.rs/0 | {
"file_path": "candle/candle-metal-kernels/src/kernels/cast.rs",
"repo_id": "candle",
"token_count": 762
} | 50 |
use crate::{BlitCommandEncoder, ComputeCommandEncoder};
use objc2::{rc::Retained, runtime::ProtocolObject};
use objc2_foundation::NSString;
use objc2_metal::{MTLCommandBuffer, MTLCommandBufferStatus};
#[derive(Clone, Debug)]
pub struct CommandBuffer {
raw: Retained<ProtocolObject<dyn MTLCommandBuffer>>,
}
impl Co... | candle/candle-metal-kernels/src/metal/command_buffer.rs/0 | {
"file_path": "candle/candle-metal-kernels/src/metal/command_buffer.rs",
"repo_id": "candle",
"token_count": 597
} | 51 |
#include <metal_stdlib>
#include <metal_integer>
#include <metal_atomic>
using namespace metal;
// Constants
// 2^32 and 1/2^32. Useful for converting between float and uint.
static constexpr constant ulong UNIF01_NORM32 = 4294967296;
static constexpr constant float UNIF01_INV32 = 2.328306436538696289e-10;
// 2 * pi
... | candle/candle-metal-kernels/src/metal_src/random.metal/0 | {
"file_path": "candle/candle-metal-kernels/src/metal_src/random.metal",
"repo_id": "candle",
"token_count": 3882
} | 52 |
use crate::benchmarks::{BenchDevice, BenchDeviceHandler};
use candle::{DType, Device, Tensor};
use candle_nn::ops::softmax_last_dim;
use criterion::Throughput;
use criterion::{black_box, criterion_group, Criterion};
use std::time::Instant;
fn run(input: &Tensor) {
let _ = softmax_last_dim(&input).unwrap();
}
cons... | candle/candle-nn/benches/benchmarks/softmax.rs/0 | {
"file_path": "candle/candle-nn/benches/benchmarks/softmax.rs",
"repo_id": "candle",
"token_count": 662
} | 53 |
//! Loss Calculations
//!
use candle::{Result, Tensor};
/// The negative log likelihood loss.
///
/// Arguments
///
/// * [inp]: The input tensor of dimensions `N, C` where `N` is the batch size and `C` the number
/// of categories. This is expected to contain log probabilities.
/// * [target]: The ground truth labe... | candle/candle-nn/src/loss.rs/0 | {
"file_path": "candle/candle-nn/src/loss.rs",
"repo_id": "candle",
"token_count": 1021
} | 54 |
#[cfg(feature = "mkl")]
extern crate intel_mkl_src;
#[cfg(feature = "accelerate")]
extern crate accelerate_src;
use candle::{test_device, test_utils::to_vec3_round, Device, IndexOp, Result, Tensor};
fn softmax(device: &Device) -> Result<()> {
let data = &[[[3f32, 1., 4.], [1., 5., 9.]], [[2., 1., 7.], [8., 2., 8... | candle/candle-nn/tests/ops.rs/0 | {
"file_path": "candle/candle-nn/tests/ops.rs",
"repo_id": "candle",
"token_count": 6734
} | 55 |
fn main() {
pyo3_build_config::add_extension_module_link_args();
}
| candle/candle-pyo3/build.rs/0 | {
"file_path": "candle/candle-pyo3/build.rs",
"repo_id": "candle",
"token_count": 30
} | 56 |
# 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
class ONNXModel:
"""
A wrapper around an ONNX model.
"""
d... | candle/candle-pyo3/py_src/candle/onnx/__init__.pyi/0 | {
"file_path": "candle/candle-pyo3/py_src/candle/onnx/__init__.pyi",
"repo_id": "candle",
"token_count": 939
} | 57 |
import candle
from candle import Tensor, QTensor
from candle.nn import Module, Linear
from candle.utils import cuda_is_available
import pytest
def test_module_can_be_constructed():
class A(Module):
pass
a = A()
assert a is not None
assert len(list(a.buffers())) == 0
def test_module_registe... | candle/candle-pyo3/tests/bindings/test_module.py/0 | {
"file_path": "candle/candle-pyo3/tests/bindings/test_module.py",
"repo_id": "candle",
"token_count": 1853
} | 58 |
//! Chinese contrastive Language-Image Pre-Training
//!
//! Chinese contrastive Language-Image Pre-Training (CLIP) is an architecture trained on
//! pairs of images with related texts.
//!
//! - 💻 [GH Link](https://github.com/OFA-Sys/Chinese-CLIP)
//! - 💻 Transformers Python [reference implementation](https://github.... | candle/candle-transformers/src/models/chinese_clip/mod.rs/0 | {
"file_path": "candle/candle-transformers/src/models/chinese_clip/mod.rs",
"repo_id": "candle",
"token_count": 3001
} | 59 |
//! Implementation of the DINOv2 revision (4 regularization)
//!
//! The DINOv2-reg4 model is a variant of DINOv2 that adds 4 regularization tokens to the
//! original architecture. This implementation is specifically trained for plant species
//! classification on the PlantCLEF2024 dataset with 7,806 classes.
//!
//! ... | candle/candle-transformers/src/models/dinov2reg4.rs/0 | {
"file_path": "candle/candle-transformers/src/models/dinov2reg4.rs",
"repo_id": "candle",
"token_count": 4809
} | 60 |
//! GLM-4 inference implementation.
//!
//! An open bilingual language model with 130B parameters.
//!
//! Based on implementation from [ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B)
use crate::models::with_tracing::{linear_b as linear, Linear};
use candle::{DType, Device, IndexOp, Module, Result, Tensor, D};
use c... | candle/candle-transformers/src/models/glm4.rs/0 | {
"file_path": "candle/candle-transformers/src/models/glm4.rs",
"repo_id": "candle",
"token_count": 11005
} | 61 |
// 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 super::{conv, quantization, seanet, transformer};
use candle::{DType, Device, Module, Result, StreamTensor, StreamingModule, Tensor};
use candle_nn... | candle/candle-transformers/src/models/mimi/encodec.rs/0 | {
"file_path": "candle/candle-transformers/src/models/mimi/encodec.rs",
"repo_id": "candle",
"token_count": 3773
} | 62 |
//! Candle implementations for various deep learning models
//!
//! This crate provides implementations of popular machine learning models and architectures for different modalities.
//!
//! - Large language models: [`llama`], [`phi3`], [`mamba`], [`mixtral`], [`bert`], ...
//! - Text to text models: [`t5`], ...
//! ... | candle/candle-transformers/src/models/mod.rs/0 | {
"file_path": "candle/candle-transformers/src/models/mod.rs",
"repo_id": "candle",
"token_count": 1145
} | 63 |
use candle::{Module, Result, Tensor};
use candle_nn::{linear, Linear, VarBuilder};
use super::vision_model;
use crate::models::mistral;
#[derive(serde::Deserialize, Debug, Clone)]
pub struct Config {
pub projector_hidden_act: candle_nn::Activation,
pub text_config: mistral::Config,
pub vision_config: visi... | candle/candle-transformers/src/models/pixtral/llava.rs/0 | {
"file_path": "candle/candle-transformers/src/models/pixtral/llava.rs",
"repo_id": "candle",
"token_count": 1393
} | 64 |
//! Qwen3 implementation with quantization support.
//!
//! Based on the Qwen3 architecture and implemented with quantized weights
//! for reduced memory usage and faster inference on compatible hardware.
//!
//! References:
//! - [Qwen3 Models](https://huggingface.co/Qwen/Qwen3-0.6B) (architecture based on official im... | candle/candle-transformers/src/models/quantized_qwen3.rs/0 | {
"file_path": "candle/candle-transformers/src/models/quantized_qwen3.rs",
"repo_id": "candle",
"token_count": 7391
} | 65 |
use candle::{DType, IndexOp, Result, Tensor};
use candle_nn::{layer_norm, LayerNorm, Module, VarBuilder};
#[derive(Debug)]
struct PatchEmbed {
proj: candle_nn::Conv2d,
span: tracing::Span,
}
impl PatchEmbed {
fn new(
in_chans: usize,
embed_dim: usize,
k_size: usize,
stride:... | candle/candle-transformers/src/models/segment_anything/image_encoder.rs/0 | {
"file_path": "candle/candle-transformers/src/models/segment_anything/image_encoder.rs",
"repo_id": "candle",
"token_count": 8848
} | 66 |
//! ResNet Building Blocks
//!
//! Some Residual Network blocks used in UNet models.
//!
//! Denoising Diffusion Implicit Models, K. He and al, 2015.
//! - [Paper](https://arxiv.org/abs/1512.03385)
//!
use crate::models::with_tracing::{conv2d, Conv2d};
use candle::{Result, Tensor, D};
use candle_nn as nn;
use candle_nn... | candle/candle-transformers/src/models/stable_diffusion/resnet.rs/0 | {
"file_path": "candle/candle-transformers/src/models/stable_diffusion/resnet.rs",
"repo_id": "candle",
"token_count": 2344
} | 67 |
use super::voxtral_llama::{VoxtralLlama, VoxtralLlamaCache, VoxtralLlamaConfig};
use candle::{DType, Device, IndexOp, Module, Result, Tensor, D};
use candle_nn::{
layer_norm, linear, linear_no_bias, Conv1d, Dropout, LayerNorm, Linear, VarBuilder,
};
use rand::Rng;
#[derive(Debug, Clone)]
pub struct VoxtralEncoderC... | candle/candle-transformers/src/models/voxtral/model.rs/0 | {
"file_path": "candle/candle-transformers/src/models/voxtral/model.rs",
"repo_id": "candle",
"token_count": 18523
} | 68 |
//! Bounding Boxes and Intersection
//!
//! This module provides functionality for handling bounding boxes and their manipulation,
//! particularly in the context of object detection. It includes tools for calculating
//! intersection over union (IoU) and non-maximum suppression (NMS).
/// A bounding box around an obj... | candle/candle-transformers/src/object_detection.rs/0 | {
"file_path": "candle/candle-transformers/src/object_detection.rs",
"repo_id": "candle",
"token_count": 1950
} | 69 |
use candle::{Device, Tensor};
use candle_transformers::generation::LogitsProcessor;
use candle_wasm_example_llama2::worker::{Model as M, ModelData};
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub struct Model {
inner: M,
logits_processor: LogitsProcessor,
tokens: Vec<u32>,
repeat_penalty: f32,
}
im... | candle/candle-wasm-examples/llama2-c/src/bin/m.rs/0 | {
"file_path": "candle/candle-wasm-examples/llama2-c/src/bin/m.rs",
"repo_id": "candle",
"token_count": 1807
} | 70 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle Phi 1.5 / Phi 2.0 Rust/WASM</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
... | candle/candle-wasm-examples/phi/index.html/0 | {
"file_path": "candle/candle-wasm-examples/phi/index.html",
"repo_id": "candle",
"token_count": 9817
} | 71 |
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<title>Candle T5</title>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
@import ur... | candle/candle-wasm-examples/t5/index.html/0 | {
"file_path": "candle/candle-wasm-examples/t5/index.html",
"repo_id": "candle",
"token_count": 4724
} | 72 |
pub const LANGUAGES: [(&str, &str); 99] = [
("en", "english"),
("zh", "chinese"),
("de", "german"),
("es", "spanish"),
("ru", "russian"),
("ko", "korean"),
("fr", "french"),
("ja", "japanese"),
("pt", "portuguese"),
("tr", "turkish"),
("pl", "polish"),
("ca", "catalan"),
... | candle/candle-wasm-examples/whisper/src/languages.rs/0 | {
"file_path": "candle/candle-wasm-examples/whisper/src/languages.rs",
"repo_id": "candle",
"token_count": 1175
} | 73 |
use crate::model::{report_detect, report_pose, Bbox, Multiples, YoloV8, YoloV8Pose};
use candle::{DType, Device, Result, Tensor};
use candle_nn::{Module, VarBuilder};
use serde::{Deserialize, Serialize};
use wasm_bindgen::prelude::*;
use yew_agent::{HandlerId, Public, WorkerLink};
#[wasm_bindgen]
extern "C" {
// U... | candle/candle-wasm-examples/yolo/src/worker.rs/0 | {
"file_path": "candle/candle-wasm-examples/yolo/src/worker.rs",
"repo_id": "candle",
"token_count": 4075
} | 74 |
## Privacy
> Last updated: Sep 15, 2025
Basics:
- Sign-in: You authenticate with your Hugging Face account.
- Conversation history: Stored so you can access past chats; you can delete any conversation at any time from the UI.
🗓 Please also consult huggingface.co's main privacy policy at <https://huggingface.co/pri... | chat-ui/PRIVACY.md/0 | {
"file_path": "chat-ui/PRIVACY.md",
"repo_id": "chat-ui",
"token_count": 937
} | 75 |
ENV_LOCAL_PATH=/app/.env.local
if test -z "${DOTENV_LOCAL}" ; then
if ! test -f "${ENV_LOCAL_PATH}" ; then
echo "DOTENV_LOCAL was not found in the ENV variables and .env.local is not set using a bind volume. Make sure to set environment variables properly. "
fi;
else
echo "DOTENV_LOCAL was found in... | chat-ui/entrypoint.sh/0 | {
"file_path": "chat-ui/entrypoint.sh",
"repo_id": "chat-ui",
"token_count": 266
} | 76 |
import { publicConfigTransporter } from "$lib/utils/PublicConfig.svelte";
import type { Transport } from "@sveltejs/kit";
export const transport: Transport = {
PublicConfig: publicConfigTransporter,
};
| chat-ui/src/hooks.ts/0 | {
"file_path": "chat-ui/src/hooks.ts",
"repo_id": "chat-ui",
"token_count": 57
} | 77 |
<script lang="ts">
import { onDestroy, onMount } from "svelte";
import { cubicOut } from "svelte/easing";
import { fade, fly } from "svelte/transition";
import Portal from "./Portal.svelte";
import { browser } from "$app/environment";
import CarbonClose from "~icons/carbon/close";
interface Props {
width?: st... | chat-ui/src/lib/components/Modal.svelte/0 | {
"file_path": "chat-ui/src/lib/components/Modal.svelte",
"repo_id": "chat-ui",
"token_count": 1266
} | 78 |
<script lang="ts">
interface Props {
classNames?: string;
label?: string;
position?: string;
}
let {
classNames = "",
label = "Copied",
position = "left-1/2 top-full transform -translate-x-1/2 translate-y-2",
}: Props = $props();
</script>
<div
class="
pointer-events-none absolute rounded bg-black ... | chat-ui/src/lib/components/Tooltip.svelte/0 | {
"file_path": "chat-ui/src/lib/components/Tooltip.svelte",
"repo_id": "chat-ui",
"token_count": 260
} | 79 |
<script lang="ts">
interface Props {
classNames?: string;
}
let { classNames = "" }: Props = $props();
</script>
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
class={classNames}
fill="none"
viewBox="0 0 26 23"
>
<path
fill="url(#gr)"
d="M.93 10.65A10.17 10.17 0 0 1 11.11.48h4.67a9.4... | chat-ui/src/lib/components/icons/IconDazzled.svelte/0 | {
"file_path": "chat-ui/src/lib/components/icons/IconDazzled.svelte",
"repo_id": "chat-ui",
"token_count": 941
} | 80 |
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
import type { Semaphores } from "$lib/types/Semaphore";
/**
* Returns the lock id if the lock was acquired, false otherwise
*/
export async function acquireLock(key: Semaphores): Promise<ObjectId | false> {
try {
const id = ne... | chat-ui/src/lib/migrations/lock.ts/0 | {
"file_path": "chat-ui/src/lib/migrations/lock.ts",
"repo_id": "chat-ui",
"token_count": 475
} | 81 |
import { authPlugin } from "$api/authPlugin";
import { conversationGroup } from "$api/routes/groups/conversations";
import { userGroup } from "$api/routes/groups/user";
import { misc } from "$api/routes/groups/misc";
import { modelGroup } from "$api/routes/groups/models";
import { debugGroup } from "$api/routes/groups/... | chat-ui/src/lib/server/api/index.ts/0 | {
"file_path": "chat-ui/src/lib/server/api/index.ts",
"repo_id": "chat-ui",
"token_count": 459
} | 82 |
import { randomUUID } from "$lib/utils/randomUuid";
import { timeout } from "$lib/utils/timeout";
import { logger } from "./logger";
type ExitHandler = () => void | Promise<void>;
type ExitHandlerUnsubscribe = () => void;
const listeners = new Map<string, ExitHandler>();
export function onExit(cb: ExitHandler): Exit... | chat-ui/src/lib/server/exitHandler.ts/0 | {
"file_path": "chat-ui/src/lib/server/exitHandler.ts",
"repo_id": "chat-ui",
"token_count": 559
} | 83 |
import pino from "pino";
import { dev } from "$app/environment";
import { config } from "$lib/server/config";
let options: pino.LoggerOptions = {};
if (dev) {
options = {
transport: {
target: "pino-pretty",
options: {
colorize: true,
},
},
};
}
export const logger = pino({ ...options, level: confi... | chat-ui/src/lib/server/logger.ts/0 | {
"file_path": "chat-ui/src/lib/server/logger.ts",
"repo_id": "chat-ui",
"token_count": 134
} | 84 |
import { writable } from "svelte/store";
export const pendingMessage = writable<
| {
content: string;
files: File[];
}
| undefined
>();
| chat-ui/src/lib/stores/pendingMessage.ts/0 | {
"file_path": "chat-ui/src/lib/stores/pendingMessage.ts",
"repo_id": "chat-ui",
"token_count": 56
} | 85 |
import type { BackendModel } from "$lib/server/models";
export type Model = Pick<
BackendModel,
| "id"
| "name"
| "displayName"
| "isRouter"
| "websiteUrl"
| "datasetName"
| "promptExamples"
| "parameters"
| "description"
| "logoUrl"
| "modelUrl"
| "datasetUrl"
| "preprompt"
| "multimodal"
| "multimoda... | chat-ui/src/lib/types/Model.ts/0 | {
"file_path": "chat-ui/src/lib/types/Model.ts",
"repo_id": "chat-ui",
"token_count": 177
} | 86 |
export function deepestChild(el: HTMLElement): HTMLElement {
if (el.lastElementChild && el.lastElementChild.nodeType !== Node.TEXT_NODE) {
return deepestChild(el.lastElementChild as HTMLElement);
}
return el;
}
| chat-ui/src/lib/utils/deepestChild.ts/0 | {
"file_path": "chat-ui/src/lib/utils/deepestChild.ts",
"repo_id": "chat-ui",
"token_count": 74
} | 87 |
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
} | 88 |
import type { Message } from "$lib/types/Message";
export function isMessageId(id: string): id is Message["id"] {
return id.split("-").length === 5;
}
| chat-ui/src/lib/utils/tree/isMessageId.ts/0 | {
"file_path": "chat-ui/src/lib/utils/tree/isMessageId.ts",
"repo_id": "chat-ui",
"token_count": 48
} | 89 |
export async function GET({ locals }) {
if (locals.user) {
const res = {
id: locals.user._id,
username: locals.user.username,
name: locals.user.name,
email: locals.user.email,
avatarUrl: locals.user.avatarUrl,
hfUserId: locals.user.hfUserId,
};
return Response.json(res);
}
return Response.js... | chat-ui/src/routes/api/user/+server.ts/0 | {
"file_path": "chat-ui/src/routes/api/user/+server.ts",
"repo_id": "chat-ui",
"token_count": 148
} | 90 |
import { dev } from "$app/environment";
import { base } from "$app/paths";
import { collections } from "$lib/server/database";
import { redirect } from "@sveltejs/kit";
import { config } from "$lib/server/config";
export async function POST({ locals, cookies }) {
await collections.sessions.deleteOne({ sessionId: loca... | chat-ui/src/routes/logout/+server.ts/0 | {
"file_path": "chat-ui/src/routes/logout/+server.ts",
"repo_id": "chat-ui",
"token_count": 218
} | 91 |
@import "highlight.js/styles/atom-one-dark";
| chat-ui/src/styles/highlight-js.css/0 | {
"file_path": "chat-ui/src/styles/highlight-js.css",
"repo_id": "chat-ui",
"token_count": 17
} | 92 |
{
"background_color": "#ffffff",
"name": "ChatUI",
"short_name": "ChatUI",
"display": "standalone",
"start_url": "/chat",
"icons": [
{
"src": "/chat/chatui/icon-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/chat/chatui/icon-48x48.png",
"sizes": "48x48",
"type": "image/png... | chat-ui/static/chatui/manifest.json/0 | {
"file_path": "chat-ui/static/chatui/manifest.json",
"repo_id": "chat-ui",
"token_count": 549
} | 93 |
import json
import os
import tempfile
import datasets
from datasets.arrow_writer import ArrowWriter
from datasets.features import Array2D
from utils import generate_examples, get_duration
SHAPE_TEST_1 = (30, 487)
SHAPE_TEST_2 = (36, 1024)
SPEED_TEST_SHAPE = (100, 100)
SPEED_TEST_N_EXAMPLES = 100
DEFAULT_FEATURES = ... | datasets/benchmarks/benchmark_array_xd.py/0 | {
"file_path": "datasets/benchmarks/benchmark_array_xd.py",
"repo_id": "datasets",
"token_count": 2176
} | 94 |
- sections:
- local: index
title: 🤗 Datasets
- local: quickstart
title: Quickstart
- local: installation
title: Installation
title: Get started
- sections:
- local: tutorial
title: Overview
- local: load_hub
title: Load a dataset from the Hub
- local: access
title: Know your data... | datasets/docs/source/_toctree.yml/0 | {
"file_path": "datasets/docs/source/_toctree.yml",
"repo_id": "datasets",
"token_count": 1337
} | 95 |
# Create a document dataset
This guide will show you how to create a document dataset with `PdfFolder` and some metadata. This is a no-code solution for quickly creating a document dataset with several thousand pdfs.
> [!TIP]
> You can control access to your dataset by requiring users to share their contact informati... | datasets/docs/source/document_dataset.mdx/0 | {
"file_path": "datasets/docs/source/document_dataset.mdx",
"repo_id": "datasets",
"token_count": 1651
} | 96 |
# Process text data
This guide shows specific methods for processing text datasets. Learn how to:
- Tokenize a dataset with [`~Dataset.map`].
- Align dataset labels with label ids for NLI datasets.
For a guide on how to process any type of dataset, take a look at the <a class="underline decoration-sky-400 decoration... | datasets/docs/source/nlp_process.mdx/0 | {
"file_path": "datasets/docs/source/nlp_process.mdx",
"repo_id": "datasets",
"token_count": 1115
} | 97 |
# Share a dataset to the Hub
The [Hub](https://huggingface.co/datasets) is home to an extensive collection of community-curated and popular research datasets. We encourage you to share your dataset to the Hub to help grow the ML community and accelerate progress for everyone. All contributions are welcome; adding a da... | datasets/docs/source/upload_dataset.mdx/0 | {
"file_path": "datasets/docs/source/upload_dataset.mdx",
"repo_id": "datasets",
"token_count": 1999
} | 98 |
# Copyright 2020 The TensorFlow Datasets Authors.
#
# 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 a... | datasets/src/datasets/download/download_manager.py/0 | {
"file_path": "datasets/src/datasets/download/download_manager.py",
"repo_id": "datasets",
"token_count": 5650
} | 99 |
# Copyright 2021 The HuggingFace Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | datasets/src/datasets/formatting/jax_formatter.py/0 | {
"file_path": "datasets/src/datasets/formatting/jax_formatter.py",
"repo_id": "datasets",
"token_count": 3107
} | 100 |
from typing import Optional
from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader
class TextDatasetReader(AbstractDatasetReader):
def __init__(
self,
path_or_paths: Nest... | datasets/src/datasets/io/text.py/0 | {
"file_path": "datasets/src/datasets/io/text.py",
"repo_id": "datasets",
"token_count": 961
} | 101 |
import copy
import os
from collections.abc import Iterator
from functools import partial
from itertools import groupby
from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar, Union
import numpy as np
import pyarrow as pa
import pyarrow.compute as pc
from .utils.logging import get_logger
if TYPE_CHECKING... | datasets/src/datasets/table.py/0 | {
"file_path": "datasets/src/datasets/table.py",
"repo_id": "datasets",
"token_count": 41094
} | 102 |
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.
#
# 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
#
# U... | datasets/src/datasets/utils/py_utils.py/0 | {
"file_path": "datasets/src/datasets/utils/py_utils.py",
"repo_id": "datasets",
"token_count": 9896
} | 103 |
import csv
import os
import fsspec
import pytest
from datasets import Dataset, DatasetDict, Features, NamedSplit, Value
from datasets.io.csv import CsvDatasetReader, CsvDatasetWriter
from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases
def _check_csv_dataset(dataset, expected_feat... | datasets/tests/io/test_csv.py/0 | {
"file_path": "datasets/tests/io/test_csv.py",
"repo_id": "datasets",
"token_count": 2970
} | 104 |
from unittest.mock import patch
import numpy as np
import pyspark
import pytest
from datasets import Features, Image, IterableDataset
from datasets.builder import InvalidConfigName
from datasets.data_files import DataFilesList
from datasets.packaged_modules.spark.spark import (
Spark,
SparkConfig,
SparkEx... | datasets/tests/packaged_modules/test_spark.py/0 | {
"file_path": "datasets/tests/packaged_modules/test_spark.py",
"repo_id": "datasets",
"token_count": 2789
} | 105 |
import os
import re
from pathlib import Path
from unittest.mock import patch
import pytest
import zstandard as zstd
from fsspec.registry import _registry as _fsspec_registry
from fsspec.spec import AbstractBufferedFile, AbstractFileSystem
from huggingface_hub.errors import OfflineModeIsEnabled
from datasets.download.... | datasets/tests/test_file_utils.py/0 | {
"file_path": "datasets/tests/test_file_utils.py",
"repo_id": "datasets",
"token_count": 17528
} | 106 |
import os
import tempfile
from functools import partial
from unittest import TestCase
from unittest.mock import patch
import numpy as np
import pytest
from datasets.arrow_dataset import Dataset
from datasets.search import ElasticSearchIndex, FaissIndex, MissingIndex
from .utils import require_elasticsearch, require_... | datasets/tests/test_search.py/0 | {
"file_path": "datasets/tests/test_search.py",
"repo_id": "datasets",
"token_count": 4553
} | 107 |
<!---
Copyright 2022 - The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | diffusers/README.md/0 | {
"file_path": "diffusers/README.md",
"repo_id": "diffusers",
"token_count": 5326
} | 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/api/loaders/lora.md/0 | {
"file_path": "diffusers/docs/source/en/api/loaders/lora.md",
"repo_id": "diffusers",
"token_count": 1878
} | 109 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.