mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 02:16:37 +00:00
Update docs (#2553)
* add module docs for candle-core * doc each of the candle-nn modules and add the links to the doc page
This commit is contained in:
@ -32,6 +32,20 @@
|
||||
//! Python can really add overhead in more complex workflows and the [GIL](https://www.backblaze.com/blog/the-python-gil-past-present-and-future/) is a notorious source of headaches.
|
||||
//!
|
||||
//! Rust is cool, and a lot of the HF ecosystem already has Rust crates [safetensors](https://github.com/huggingface/safetensors) and [tokenizers](https://github.com/huggingface/tokenizers)
|
||||
//!
|
||||
//! ## Other Crates
|
||||
//!
|
||||
//! Candle consists of a number of crates. This crate holds core the common data structures but you may wish
|
||||
//! to look at the docs for the other crates which can be found here:
|
||||
//!
|
||||
//! - [candle-core](https://docs.rs/candle-core/). Core Datastructures and DataTypes.
|
||||
//! - [candle-nn](https://docs.rs/candle-nn/). Building blocks for Neural Nets.
|
||||
//! - [candle-datasets](https://docs.rs/candle-datasets/). Rust access to commonly used Datasets like MNIST.
|
||||
//! - [candle-examples](https://docs.rs/candle-examples/). Examples of Candle in Use.
|
||||
//! - [candle-onnx](https://docs.rs/candle-onnx/). Loading and using ONNX models.
|
||||
//! - [candle-pyo3](https://docs.rs/candle-pyo3/). Access to Candle from Python.
|
||||
//! - [candle-transformers](https://docs.rs/candle-transformers/). Candle implemntation of many published transformer models.
|
||||
//!
|
||||
|
||||
#[cfg(feature = "accelerate")]
|
||||
mod accelerate;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Activation Functions
|
||||
//!
|
||||
use candle::{Result, Tensor};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Cache Implementations
|
||||
//!
|
||||
use candle::{Device, Result, Tensor};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -1,3 +1,20 @@
|
||||
//! candle-nn
|
||||
//!
|
||||
//! ## Other Crates
|
||||
//!
|
||||
//! Candle consists of a number of crates. This crate holds structs and functions
|
||||
//! that allow you to build and train neural nets. You may wish
|
||||
//! to look at the docs for the other crates which can be found here:
|
||||
//!
|
||||
//! - [candle-core](https://docs.rs/candle-core/). Core Datastructures and DataTypes.
|
||||
//! - [candle-nn](https://docs.rs/candle-nn/). Building blocks for Neural Nets.
|
||||
//! - [candle-datasets](https://docs.rs/candle-datasets/). Rust access to commonly used Datasets like MNIST.
|
||||
//! - [candle-examples](https://docs.rs/candle-examples/). Examples of Candle in Use.
|
||||
//! - [candle-onnx](https://docs.rs/candle-onnx/). Loading and using ONNX models.
|
||||
//! - [candle-pyo3](https://docs.rs/candle-pyo3/). Access to Candle from Python.
|
||||
//! - [candle-transformers](https://docs.rs/candle-transformers/). Candle implemntation of many published transformer models.
|
||||
//!
|
||||
|
||||
pub mod activation;
|
||||
pub mod batch_norm;
|
||||
pub mod conv;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Loss Calculations
|
||||
//!
|
||||
use candle::{Result, Tensor};
|
||||
|
||||
/// The negative log likelihood loss.
|
||||
|
@ -1,3 +1,6 @@
|
||||
//! Tensor ops.
|
||||
//!
|
||||
|
||||
use candle::{CpuStorage, DType, Layout, Module, Result, Shape, Tensor, D};
|
||||
use rayon::prelude::*;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Rotary Embeddings
|
||||
//!
|
||||
use candle::{CpuStorage, Layout, Result, Shape, Tensor, D};
|
||||
use rayon::prelude::*;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Sequential Layer
|
||||
//!
|
||||
//! A sequential layer used to chain multiple layers and closures.
|
||||
use candle::{Module, Result, Tensor};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! A `VarBuilder` for variable retrieval from models
|
||||
//!
|
||||
//! A `VarBuilder` is used to retrieve variables used by a model. These variables can either come
|
||||
//! from a pre-trained checkpoint, e.g. using `VarBuilder::from_mmaped_safetensors`, or initialized
|
||||
//! for training, e.g. using `VarBuilder::from_varmap`.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! A `VarMap` is a store that holds named variables.
|
||||
//!
|
||||
use candle::{DType, Device, Result, Shape, Tensor, Var};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
Reference in New Issue
Block a user