mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 18:28:24 +00:00
20241118 docs (#2629)
* module docs * varbuilder gguf docs * add a link to gguf files * small additonal mod doc titles * safetensor docs * more core docs * more module docs in canlde_core * 2 more link fixes
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
//! Logit Processing and Sampling
|
||||
//!
|
||||
//! Functionality for modeling sampling strategies and logits processing in text generation
|
||||
//! with support for temperature-based sampling, top-k filtering, nucleus sampling (top-p),
|
||||
//! and combinations thereof.
|
||||
use candle::{DType, Error, Result, Tensor};
|
||||
use rand::{distributions::Distribution, SeedableRng};
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
//! 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 object.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Bbox<D> {
|
||||
|
@ -1,3 +1,9 @@
|
||||
//! Utilities for quanitized network layers
|
||||
//!
|
||||
//! This module contains various implementations of standard neural network layers, modules and
|
||||
//! utilities including embedding, linear layers, and various normalization techniques.
|
||||
//! Most implementations provide quantized weights support.
|
||||
|
||||
use crate::models::with_tracing::QMatMul;
|
||||
use crate::quantized_var_builder::VarBuilder;
|
||||
use candle::quantized::QTensor;
|
||||
|
@ -1,3 +1,9 @@
|
||||
//! 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 candle::{Device, Result, Shape};
|
||||
use std::sync::Arc;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Apply penalty and repeat_kv
|
||||
|
||||
use candle::{Result, Tensor};
|
||||
|
||||
pub fn apply_repeat_penalty(logits: &Tensor, penalty: f32, context: &[u32]) -> Result<Tensor> {
|
||||
|
Reference in New Issue
Block a user