SYMBOL INDEX (10803 symbols across 637 files) FILE: candle-book/src/lib.rs function book_hub_1 (line 13) | async fn book_hub_1() { function book_hub_2 (line 30) | fn book_hub_2() { function book_training_1 (line 111) | fn book_training_1() -> Result<()>{ FILE: candle-book/src/simplified.rs constant VOTE_DIM (line 24) | const VOTE_DIM: usize = 2; constant RESULTS (line 25) | const RESULTS: usize = 1; constant EPOCHS (line 26) | const EPOCHS: usize = 10; constant LAYER1_OUT_SIZE (line 27) | const LAYER1_OUT_SIZE: usize = 4; constant LAYER2_OUT_SIZE (line 28) | const LAYER2_OUT_SIZE: usize = 2; constant LEARNING_RATE (line 29) | const LEARNING_RATE: f64 = 0.05; type Dataset (line 32) | pub struct Dataset { type MultiLevelPerceptron (line 39) | struct MultiLevelPerceptron { method new (line 46) | fn new(vs: VarBuilder) -> Result { method forward (line 53) | fn forward(&self, xs: &Tensor) -> Result { function simplified (line 68) | async fn simplified() -> anyhow::Result<()> { function train (line 154) | fn train(m: Dataset, dev: &Device) -> anyhow::Result Tensor { function run_unary_benchmark (line 11) | fn run_unary_benchmark(c: &mut Criterion, device: &Device, dtype: DType,... function criterion_benchmark (line 47) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/broadcast.rs function run (line 7) | fn run(w: &Tensor, bias: &Tensor) { function run_benchmark (line 11) | fn run_benchmark(c: &mut Criterion, device: &Device, dtype: DType, name:... function criterion_benchmark (line 38) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/conv_transpose2d.rs function run (line 7) | fn run( function run_benchmark (line 19) | fn run_benchmark(c: &mut Criterion, device: &Device, dtype: DType, name:... function criterion_benchmark (line 51) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/copy.rs function run_copy_mask_benchmark (line 7) | fn run_copy_mask_benchmark(c: &mut Criterion, device: &Dev... function criterion_benchmark (line 32) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/matmul.rs constant MATMUL_SHAPES (line 8) | const MATMUL_SHAPES: &[(&str, &[usize], &[usize])] = &[ function run (line 23) | fn run(a: &Tensor, b: &Tensor) { function calculate_flops (line 27) | fn calculate_flops(shape_a: &[usize], shape_b: &[usize]) -> usize { function run_bench (line 39) | fn run_bench(c: &mut Criterion, device: &Device, name: &str, shape_a: &[... function criterion_benchmark (line 61) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/mod.rs type BenchDevice (line 15) | pub(crate) trait BenchDevice { method sync (line 16) | fn sync(&self) -> Result<()>; method bench_name (line 18) | fn bench_name>(&self, name: S) -> String; method sync (line 22) | fn sync(&self) -> Result<()> { method bench_name (line 43) | fn bench_name>(&self, name: S) -> String { type BenchDeviceHandler (line 61) | struct BenchDeviceHandler { method new (line 66) | pub fn new() -> Result { FILE: candle-core/benches/benchmarks/qmatmul.rs function run (line 10) | fn run(matmul: &QMatMul, x: &Tensor) { function run_bench (line 14) | fn run_bench(c: &mut Criterion, device: &Device, dtype: GgmlDType) { function criterion_benchmark (line 51) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/random.rs function rand_uniform (line 7) | fn rand_uniform(a: &Tensor) { function rand_normal (line 11) | fn rand_normal(a: &Tensor) { function run_random_bench (line 15) | fn run_random_bench(c: &mut Criterion, device: &Device) { function criterion_benchmark (line 57) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/reduce.rs function run_sum (line 8) | fn run_sum(a: &Tensor) { function run_arg_min (line 11) | fn run_arg_min(a: &Tensor) { function criterion_benchmark (line 15) | fn criterion_benchmark(c: &mut Criterion) { function run_reduce (line 37) | fn run_reduce( function run_arg_reduce (line 98) | fn run_arg_reduce( FILE: candle-core/benches/benchmarks/unary.rs function run_sqrt (line 7) | fn run_sqrt(a: &Tensor) { function run_unary_benchmark (line 11) | fn run_unary_benchmark(c: &mut Criterion, device: &Device, dtype: DType,... function run_cast (line 40) | fn run_cast(a: &Tensor, dtype: DType) { function run_cast_benchmark (line 44) | fn run_cast_benchmark( function criterion_benchmark (line 79) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/benches/benchmarks/where_cond.rs function run (line 7) | fn run(a: &Tensor, b: &Tensor, c: &Tensor) { function create_cond_arr (line 11) | const fn create_cond_arr() -> [u8; N] { constant B (line 21) | const B: usize = 1; constant M (line 22) | const M: usize = 1024; constant K (line 23) | const K: usize = 1024; constant SIZE (line 24) | const SIZE: usize = B * M * K; function run_where_cond_benchmark (line 28) | fn run_where_cond_benchmark(c: &mut Criterion, device: &Device, dtype: D... function criterion_benchmark (line 56) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-core/examples/basics.rs function main (line 10) | fn main() -> Result<()> { FILE: candle-core/examples/cuda_basics.rs function main (line 10) | fn main() -> Result<()> { FILE: candle-core/examples/cuda_sum_benchmark.rs function cos_sin (line 12) | fn cos_sin(n: usize, device: &Device) -> Result { function main (line 22) | fn main() -> Result<()> { FILE: candle-core/examples/metal_basics.rs function main (line 10) | fn main() -> Result<()> { FILE: candle-core/src/accelerate.rs function sgemm_ffi (line 11) | pub fn sgemm_ffi( function dgemm_ffi (line 27) | pub fn dgemm_ffi( function vvexpf (line 43) | pub fn vvexpf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvexp (line 44) | pub fn vvexp(dst: *mut c_double, src: *const c_double, len: *const c_int); function vvsqrtf (line 45) | pub fn vvsqrtf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvsqrt (line 46) | pub fn vvsqrt(dst: *mut c_double, src: *const c_double, len: *const c_int); function vvsinf (line 47) | pub fn vvsinf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvsin (line 48) | pub fn vvsin(dst: *mut c_double, src: *const c_double, len: *const c_int); function vvcosf (line 49) | pub fn vvcosf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvcos (line 50) | pub fn vvcos(dst: *mut c_double, src: *const c_double, len: *const c_int); function vvlogf (line 51) | pub fn vvlogf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvlog (line 52) | pub fn vvlog(dst: *mut c_double, src: *const c_double, len: *const c_int); function vvtanhf (line 53) | pub fn vvtanhf(dst: *mut c_float, src: *const c_float, len: *const c_int); function vvtanh (line 54) | pub fn vvtanh(dst: *mut c_double, src: *const c_double, len: *const c_int); function vDSP_vaddD (line 56) | pub fn vDSP_vaddD( function vDSP_vadd (line 65) | pub fn vDSP_vadd( function vDSP_vsubD (line 74) | pub fn vDSP_vsubD( function vDSP_vsub (line 83) | pub fn vDSP_vsub( function vDSP_vmulD (line 92) | pub fn vDSP_vmulD( function vDSP_vmul (line 101) | pub fn vDSP_vmul( function vDSP_vdivD (line 110) | pub fn vDSP_vdivD( function vDSP_vdiv (line 119) | pub fn vDSP_vdiv( function vDSP_vminD (line 128) | pub fn vDSP_vminD( function vDSP_vmin (line 137) | pub fn vDSP_vmin( function vDSP_vmaxD (line 146) | pub fn vDSP_vmaxD( function vDSP_vmax (line 155) | pub fn vDSP_vmax( function sgemm (line 169) | pub unsafe fn sgemm( function dgemm (line 203) | pub unsafe fn dgemm( function vs_exp (line 236) | pub fn vs_exp(a: &[f32], y: &mut [f32]) { function vd_exp (line 246) | pub fn vd_exp(a: &[f64], y: &mut [f64]) { function vs_sqrt (line 256) | pub fn vs_sqrt(a: &[f32], y: &mut [f32]) { function vd_sqrt (line 266) | pub fn vd_sqrt(a: &[f64], y: &mut [f64]) { function vs_sin (line 276) | pub fn vs_sin(a: &[f32], y: &mut [f32]) { function vd_sin (line 286) | pub fn vd_sin(a: &[f64], y: &mut [f64]) { function vs_cos (line 295) | pub fn vs_cos(a: &[f32], y: &mut [f32]) { function vd_cos (line 305) | pub fn vd_cos(a: &[f64], y: &mut [f64]) { function vs_tanh (line 314) | pub fn vs_tanh(a: &[f32], y: &mut [f32]) { function vd_tanh (line 324) | pub fn vd_tanh(a: &[f64], y: &mut [f64]) { function vs_ln (line 334) | pub fn vs_ln(a: &[f32], y: &mut [f32]) { function vd_ln (line 344) | pub fn vd_ln(a: &[f64], y: &mut [f64]) { function vs_sqr (line 354) | pub fn vs_sqr(a: &[f32], y: &mut [f32]) { function vd_sqr (line 364) | pub fn vd_sqr(a: &[f64], y: &mut [f64]) { function vs_tanh_inplace (line 374) | pub fn vs_tanh_inplace(y: &mut [f32]) { function vd_tanh_inplace (line 379) | pub fn vd_tanh_inplace(y: &mut [f64]) { function vs_exp_inplace (line 384) | pub fn vs_exp_inplace(y: &mut [f32]) { function vd_exp_inplace (line 389) | pub fn vd_exp_inplace(y: &mut [f64]) { function vs_gelu (line 394) | pub fn vs_gelu(vs: &[f32], ys: &mut [f32]) { function vd_gelu (line 405) | pub fn vd_gelu(vs: &[f64], ys: &mut [f64]) { function vs_silu (line 416) | pub fn vs_silu(vs: &[f32], ys: &mut [f32]) { function vd_silu (line 427) | pub fn vd_silu(vs: &[f64], ys: &mut [f64]) { FILE: candle-core/src/backend.rs type BackendStorage (line 6) | pub trait BackendStorage: Sized { method try_clone (line 9) | fn try_clone(&self, _: &Layout) -> Result; method dtype (line 11) | fn dtype(&self) -> DType; method device (line 13) | fn device(&self) -> &Self::Device; method to_cpu_storage (line 16) | fn to_cpu_storage(&self) -> Result; method affine (line 18) | fn affine(&self, _: &Layout, _: f64, _: f64) -> Result; method powf (line 20) | fn powf(&self, _: &Layout, _: f64) -> Result; method elu (line 22) | fn elu(&self, _: &Layout, _: f64) -> Result; method reduce_op (line 24) | fn reduce_op(&self, _: ReduceOp, _: &Layout, _: &[usize]) -> Result Result Result; method unary_impl (line 30) | fn unary_impl(&self, _: &Layout) -> Result; method binary_impl (line 32) | fn binary_impl(&self, _: &Self, _: &Layout, _: &Layout) ... method where_cond (line 34) | fn where_cond(&self, _: &Layout, _: &Self, _: &Layout, _: &Self, _: &L... method conv1d (line 36) | fn conv1d( method conv_transpose1d (line 44) | fn conv_transpose1d( method conv2d (line 52) | fn conv2d( method conv_transpose2d (line 60) | fn conv_transpose2d( method avg_pool2d (line 68) | fn avg_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method max_pool2d (line 69) | fn max_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method upsample_nearest1d (line 70) | fn upsample_nearest1d(&self, _: &Layout, _: usize) -> Result; method upsample_nearest2d (line 71) | fn upsample_nearest2d(&self, _: &Layout, _: usize, _: usize) -> Result... method upsample_bilinear2d (line 72) | fn upsample_bilinear2d( method gather (line 82) | fn gather(&self, _: &Layout, _: &Self, _: &Layout, _: usize) -> Result... method scatter_set (line 84) | fn scatter_set( method scatter_add_set (line 94) | fn scatter_add_set( method index_select (line 104) | fn index_select(&self, _: &Self, _: &Layout, _: &Layout, _: usize) -> ... method index_add (line 105) | fn index_add( method matmul (line 115) | fn matmul( method copy_strided_src (line 123) | fn copy_strided_src(&self, _: &mut Self, _: usize, _: &Layout) -> Resu... method copy2d (line 127) | fn copy2d( method const_set (line 138) | fn const_set(&mut self, _: crate::scalar::Scalar, _: &Layout) -> Resul... type BackendDevice (line 141) | pub trait BackendDevice: Sized + std::fmt::Debug + Clone { method new (line 145) | fn new(_: usize) -> Result; method location (line 147) | fn location(&self) -> crate::DeviceLocation; method same_device (line 149) | fn same_device(&self, _: &Self) -> bool; method zeros_impl (line 151) | fn zeros_impl(&self, _shape: &Shape, _dtype: DType) -> Result Result... method storage_from_slice (line 159) | fn storage_from_slice(&self, _: &[T]) -> Result Result Result Result<... method rand_normal (line 167) | fn rand_normal(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result Result<()>; method get_current_seed (line 170) | fn get_current_seed(&self) -> Result; method synchronize (line 173) | fn synchronize(&self) -> Result<()>; FILE: candle-core/src/backprop.rs function broadcast_back (line 8) | fn broadcast_back(arg: &Tensor, node: &Tensor, reduced_dims: &[usize]) -... method sorted_nodes (line 35) | pub fn sorted_nodes(&self) -> Vec<&Tensor> { method backward (line 165) | pub fn backward(&self) -> Result { type GradStore (line 733) | pub struct GradStore(HashMap); method new (line 737) | fn new() -> Self { method get_id (line 742) | pub fn get_id(&self, id: TensorId) -> Option<&Tensor> { method get (line 747) | pub fn get(&self, tensor: &Tensor) -> Option<&Tensor> { method remove (line 752) | pub fn remove(&mut self, tensor: &Tensor) -> Option { method insert (line 757) | pub fn insert(&mut self, tensor: &Tensor, grad: Tensor) -> Option Option Result<&mut Tensor> { method get_ids (line 781) | pub fn get_ids(&self) -> impl Iterator { FILE: candle-core/src/conv.rs type ParamsConv1D (line 6) | pub struct ParamsConv1D { method l_out (line 21) | pub(crate) fn l_out(&self) -> usize { method out_dims (line 25) | pub(crate) fn out_dims(&self) -> Vec { type ParamsConvTranspose1D (line 32) | pub struct ParamsConvTranspose1D { method l_out (line 45) | pub(crate) fn l_out(&self) -> usize { method out_dims (line 52) | pub(crate) fn out_dims(&self) -> Vec { type CudnnFwdAlgo (line 59) | pub enum CudnnFwdAlgo { type ParamsConv2D (line 72) | pub struct ParamsConv2D { method out_h (line 87) | pub(crate) fn out_h(&self) -> usize { method out_w (line 91) | pub(crate) fn out_w(&self) -> usize { method out_dims (line 95) | pub(crate) fn out_dims(&self) -> Vec { type ParamsConvTranspose2D (line 101) | pub struct ParamsConvTranspose2D { method out_h (line 116) | pub(crate) fn out_h(&self) -> usize { method out_w (line 121) | pub(crate) fn out_w(&self) -> usize { method out_dims (line 126) | pub(crate) fn out_dims(&self) -> Vec { method conv1d_single_group (line 132) | fn conv1d_single_group(&self, kernel: &Self, params: &ParamsConv1D) -> R... method conv1d (line 148) | pub fn conv1d( method conv1d_with_algo (line 160) | pub fn conv1d_with_algo( method conv_transpose1d_single_group (line 207) | fn conv_transpose1d_single_group( method conv_transpose1d (line 231) | pub fn conv_transpose1d( method conv2d_single_group (line 273) | fn conv2d_single_group(&self, kernel: &Self, params: &ParamsConv2D) -> R... method conv2d (line 289) | pub fn conv2d( method conv2d_with_algo (line 300) | pub fn conv2d_with_algo( method conv_transpose2d (line 344) | pub fn conv_transpose2d( FILE: candle-core/src/convert.rs type Error (line 7) | type Error = Error; function try_from (line 8) | fn try_from(tensor: &Tensor) -> Result { type Error (line 14) | type Error = Error; function try_from (line 15) | fn try_from(tensor: &Tensor) -> Result { type Error (line 21) | type Error = Error; function try_from (line 22) | fn try_from(tensor: &Tensor) -> Result { type Error (line 28) | type Error = Error; function try_from (line 29) | fn try_from(tensor: Tensor) -> Result { type Error (line 35) | type Error = Error; function try_from (line 36) | fn try_from(tensor: Tensor) -> Result { type Error (line 42) | type Error = Error; function try_from (line 43) | fn try_from(tensor: Tensor) -> Result { type Error (line 49) | type Error = Error; method try_from (line 50) | fn try_from(v: &[T]) -> Result { type Error (line 56) | type Error = Error; method try_from (line 57) | fn try_from(v: Vec) -> Result { method write_bytes (line 102) | pub fn write_bytes(&self, f: &mut W) -> crate::Result... FILE: candle-core/src/cpu/avx.rs type CurrentCpu (line 9) | pub struct CurrentCpu {} type Unit (line 16) | type Unit = __m256; type Array (line 17) | type Array = [__m256; ARR]; constant STEP (line 19) | const STEP: usize = STEP; constant EPR (line 20) | const EPR: usize = EPR; method n (line 22) | fn n() -> usize { method zero (line 26) | unsafe fn zero() -> Self::Unit { method zero_array (line 30) | unsafe fn zero_array() -> Self::Array { method from_f32 (line 34) | unsafe fn from_f32(v: f32) -> Self::Unit { method load (line 38) | unsafe fn load(mem_addr: *const f32) -> Self::Unit { method vec_add (line 42) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit { method vec_fma (line 46) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_store (line 50) | unsafe fn vec_store(mem_addr: *mut f32, a: Self::Unit) { method vec_reduce (line 54) | unsafe fn vec_reduce(mut x: Self::Array, y: *mut f32) { constant STEP (line 11) | const STEP: usize = 32; constant EPR (line 12) | const EPR: usize = 8; constant ARR (line 13) | const ARR: usize = STEP / EPR; type CurrentCpuF16 (line 71) | pub struct CurrentCpuF16 {} type Unit (line 73) | type Unit = __m256; type Array (line 74) | type Array = [__m256; ARR]; constant STEP (line 76) | const STEP: usize = STEP; constant EPR (line 77) | const EPR: usize = EPR; method n (line 79) | fn n() -> usize { method zero (line 83) | unsafe fn zero() -> Self::Unit { method zero_array (line 87) | unsafe fn zero_array() -> Self::Array { method from_f32 (line 91) | unsafe fn from_f32(v: f32) -> Self::Unit { method load (line 96) | unsafe fn load(mem_addr: *const f16) -> Self::Unit { method load (line 101) | unsafe fn load(mem_addr: *const f16) -> Self::Unit { method vec_add (line 109) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit { method vec_fma (line 113) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_store (line 118) | unsafe fn vec_store(mem_addr: *mut f16, a: Self::Unit) { method vec_store (line 123) | unsafe fn vec_store(mem_addr: *mut f16, a: Self::Unit) { method vec_reduce (line 131) | unsafe fn vec_reduce(mut x: Self::Array, y: *mut f32) { type CurrentCpuBF16 (line 150) | pub struct CurrentCpuBF16 {} type Unit (line 152) | type Unit = __m256; type Array (line 153) | type Array = [__m256; ARR]; constant STEP (line 155) | const STEP: usize = STEP; constant EPR (line 156) | const EPR: usize = EPR; method n (line 158) | fn n() -> usize { method zero (line 162) | unsafe fn zero() -> Self::Unit { method zero_array (line 166) | unsafe fn zero_array() -> Self::Array { method from_f32 (line 170) | unsafe fn from_f32(v: f32) -> Self::Unit { method load (line 175) | unsafe fn load(mem_addr: *const bf16) -> Self::Unit { method load (line 180) | unsafe fn load(mem_addr: *const bf16) -> Self::Unit { method vec_add (line 188) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit { method vec_fma (line 192) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_store (line 197) | unsafe fn vec_store(mem_addr: *mut bf16, a: Self::Unit) { method vec_store (line 202) | unsafe fn vec_store(mem_addr: *mut bf16, a: Self::Unit) { method vec_reduce (line 210) | unsafe fn vec_reduce(mut x: Self::Array, y: *mut f32) { FILE: candle-core/src/cpu/erf.rs function polynomial (line 19) | pub fn polynomial(z: f64, coeff: &[f64]) -> f64 { function erf_f64 (line 35) | pub fn erf_f64(x: f64) -> f64 { function erf_f32 (line 39) | pub fn erf_f32(x: f32) -> f32 { function erf_inv (line 45) | pub fn erf_inv(x: f64) -> f64 { function erfc_f64 (line 61) | pub fn erfc_f64(x: f64) -> f64 { function erfc_f32 (line 65) | pub fn erfc_f32(x: f32) -> f32 { function erfc_inv (line 71) | pub fn erfc_inv(x: f64) -> f64 { constant ERF_INV_IMPL_AN (line 89) | const ERF_INV_IMPL_AN: &[f64] = &[ constant ERF_INV_IMPL_AD (line 102) | const ERF_INV_IMPL_AD: &[f64] = &[ constant ERF_INV_IMPL_BN (line 117) | const ERF_INV_IMPL_BN: &[f64] = &[ constant ERF_INV_IMPL_BD (line 131) | const ERF_INV_IMPL_BD: &[f64] = &[ constant ERF_INV_IMPL_CN (line 145) | const ERF_INV_IMPL_CN: &[f64] = &[ constant ERF_INV_IMPL_CD (line 161) | const ERF_INV_IMPL_CD: &[f64] = &[ constant ERF_INV_IMPL_DN (line 174) | const ERF_INV_IMPL_DN: &[f64] = &[ constant ERF_INV_IMPL_DD (line 188) | const ERF_INV_IMPL_DD: &[f64] = &[ constant ERF_INV_IMPL_EN (line 200) | const ERF_INV_IMPL_EN: &[f64] = &[ constant ERF_INV_IMPL_ED (line 214) | const ERF_INV_IMPL_ED: &[f64] = &[ constant ERF_INV_IMPL_FN (line 226) | const ERF_INV_IMPL_FN: &[f64] = &[ constant ERF_INV_IMPL_FD (line 239) | const ERF_INV_IMPL_FD: &[f64] = &[ constant ERF_INV_IMPL_GN (line 251) | const ERF_INV_IMPL_GN: &[f64] = &[ constant ERF_INV_IMPL_GD (line 264) | const ERF_INV_IMPL_GD: &[f64] = &[ function erf_inv_impl (line 277) | fn erf_inv_impl(p: f64, q: f64, s: f64) -> f64 { FILE: candle-core/src/cpu/kernels.rs type VecOps (line 1) | pub trait VecOps: num_traits::NumAssign + Copy { method min (line 2) | fn min(self, rhs: Self) -> Self; method max (line 3) | fn max(self, rhs: Self) -> Self; method vec_dot (line 12) | unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, ... method vec_reduce_sum (line 26) | unsafe fn vec_reduce_sum(xs: *const Self, res: *mut Self, len: usize) { method vec_reduce_max (line 40) | unsafe fn vec_reduce_max(xs: *const Self, res: *mut Self, len: usize) { method vec_reduce_min (line 54) | unsafe fn vec_reduce_min(xs: *const Self, res: *mut Self, len: usize) { method min (line 64) | fn min(self, other: Self) -> Self { method max (line 69) | fn max(self, other: Self) -> Self { method vec_dot (line 74) | unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, ... method vec_reduce_sum (line 79) | unsafe fn vec_reduce_sum(xs: *const Self, res: *mut Self, len: usize) { method min (line 86) | fn min(self, other: Self) -> Self { method max (line 91) | fn max(self, other: Self) -> Self { method vec_dot (line 96) | unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, ... method min (line 105) | fn min(self, other: Self) -> Self { method max (line 110) | fn max(self, other: Self) -> Self { method min (line 116) | fn min(self, other: Self) -> Self { method max (line 121) | fn max(self, other: Self) -> Self { method vec_dot (line 126) | unsafe fn vec_dot(lhs: *const Self, rhs: *const Self, res: *mut Self, ... method min (line 134) | fn min(self, other: Self) -> Self { method max (line 139) | fn max(self, other: Self) -> Self { method min (line 145) | fn min(self, other: Self) -> Self { method max (line 150) | fn max(self, other: Self) -> Self { method min (line 156) | fn min(self, other: Self) -> Self { method max (line 161) | fn max(self, other: Self) -> Self { method min (line 167) | fn min(self, other: Self) -> Self { method max (line 172) | fn max(self, other: Self) -> Self { method min (line 178) | fn min(self, other: Self) -> Self { method max (line 183) | fn max(self, other: Self) -> Self { method min (line 190) | fn min(self, other: Self) -> Self { method max (line 195) | fn max(self, other: Self) -> Self { function par_for_each (line 201) | pub fn par_for_each(n_threads: usize, func: impl Fn(usize) + Send + Sync) { function par_range (line 215) | pub fn par_range(lo: usize, up: usize, n_threads: usize, func: impl Fn(u... FILE: candle-core/src/cpu/mod.rs type Cpu (line 7) | trait Cpu { constant STEP (line 10) | const STEP: usize; constant EPR (line 11) | const EPR: usize; method n (line 13) | fn n() -> usize; method zero (line 14) | unsafe fn zero() -> Self::Unit; method zero_array (line 15) | unsafe fn zero_array() -> Self::Array; method load (line 16) | unsafe fn load(mem_addr: *const f32) -> Self::Unit; method vec_add (line 17) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit; method vec_fma (line 18) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_reduce (line 19) | unsafe fn vec_reduce(x: Self::Array, y: *mut f32); method from_f32 (line 20) | unsafe fn from_f32(v: f32) -> Self::Unit; method vec_store (line 21) | unsafe fn vec_store(mem_addr: *mut f32, a: Self::Unit); type CpuF16 (line 25) | trait CpuF16 { constant STEP (line 28) | const STEP: usize; constant EPR (line 29) | const EPR: usize; method n (line 31) | fn n() -> usize; method zero (line 32) | unsafe fn zero() -> Self::Unit; method zero_array (line 33) | unsafe fn zero_array() -> Self::Array; method load (line 34) | unsafe fn load(mem_addr: *const f16) -> Self::Unit; method vec_add (line 35) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit; method vec_fma (line 36) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_reduce (line 37) | unsafe fn vec_reduce(x: Self::Array, y: *mut f32); method from_f32 (line 38) | unsafe fn from_f32(v: f32) -> Self::Unit; method vec_store (line 39) | unsafe fn vec_store(mem_addr: *mut f16, a: Self::Unit); type CpuBF16 (line 43) | trait CpuBF16 { constant STEP (line 46) | const STEP: usize; constant EPR (line 47) | const EPR: usize; method n (line 49) | fn n() -> usize; method zero (line 50) | unsafe fn zero() -> Self::Unit; method zero_array (line 51) | unsafe fn zero_array() -> Self::Array; method load (line 52) | unsafe fn load(mem_addr: *const bf16) -> Self::Unit; method vec_add (line 53) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit; method vec_fma (line 54) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_reduce (line 55) | unsafe fn vec_reduce(x: Self::Array, y: *mut f32); method from_f32 (line 56) | unsafe fn from_f32(v: f32) -> Self::Unit; method vec_store (line 57) | unsafe fn vec_store(mem_addr: *mut bf16, a: Self::Unit); function vec_dot_f32 (line 89) | pub(crate) unsafe fn vec_dot_f32(a_row: *const f32, b_row: *const f32, c... function vec_dot_f32 (line 119) | pub(crate) unsafe fn vec_dot_f32(a_row: *const f32, b_row: *const f32, c... function vec_sum (line 132) | pub(crate) unsafe fn vec_sum(row: *const f32, b: *mut f32, k: usize) { function vec_sum (line 159) | pub(crate) unsafe fn vec_sum(row: *const f32, b: *mut f32, k: usize) { function vec_dot_f16 (line 168) | pub(crate) unsafe fn vec_dot_f16(a_row: *const f16, b_row: *const f16, c... function vec_dot_bf16 (line 196) | pub(crate) unsafe fn vec_dot_bf16(a_row: *const bf16, b_row: *const bf16... function vec_dot_f16 (line 224) | pub(crate) unsafe fn vec_dot_f16(a_row: *const f16, b_row: *const f16, c... function vec_dot_bf16 (line 235) | pub(crate) unsafe fn vec_dot_bf16(a_row: *const bf16, b_row: *const bf16... FILE: candle-core/src/cpu/neon.rs type CurrentCpu (line 8) | pub struct CurrentCpu {} method reduce_one (line 16) | unsafe fn reduce_one(x: float32x4_t) -> f32 { method reduce_one (line 21) | unsafe fn reduce_one(x: float32x4_t) -> f32 { type Unit (line 27) | type Unit = float32x4_t; type Array (line 28) | type Array = [float32x4_t; ARR]; constant STEP (line 30) | const STEP: usize = STEP; constant EPR (line 31) | const EPR: usize = EPR; method n (line 33) | fn n() -> usize { method zero (line 37) | unsafe fn zero() -> Self::Unit { method from_f32 (line 41) | unsafe fn from_f32(x: f32) -> Self::Unit { method zero_array (line 45) | unsafe fn zero_array() -> Self::Array { method load (line 49) | unsafe fn load(mem_addr: *const f32) -> Self::Unit { method vec_add (line 53) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit { method vec_fma (line 57) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_store (line 61) | unsafe fn vec_store(mem_addr: *mut f32, a: Self::Unit) { method vec_reduce (line 65) | unsafe fn vec_reduce(mut x: Self::Array, y: *mut f32) { constant STEP (line 10) | const STEP: usize = 16; constant EPR (line 11) | const EPR: usize = 4; constant ARR (line 12) | const ARR: usize = STEP / EPR; FILE: candle-core/src/cpu/simd128.rs type CurrentCpu (line 4) | pub struct CurrentCpu {} type Unit (line 11) | type Unit = v128; type Array (line 12) | type Array = [v128; ARR]; constant STEP (line 14) | const STEP: usize = STEP; constant EPR (line 15) | const EPR: usize = EPR; method n (line 17) | fn n() -> usize { method zero (line 21) | unsafe fn zero() -> Self::Unit { method zero_array (line 25) | unsafe fn zero_array() -> Self::Array { method from_f32 (line 29) | unsafe fn from_f32(v: f32) -> Self::Unit { method load (line 33) | unsafe fn load(mem_addr: *const f32) -> Self::Unit { method vec_add (line 37) | unsafe fn vec_add(a: Self::Unit, b: Self::Unit) -> Self::Unit { method vec_fma (line 41) | unsafe fn vec_fma(a: Self::Unit, b: Self::Unit, c: Self::Unit) -> Self... method vec_store (line 45) | unsafe fn vec_store(mem_addr: *mut f32, a: Self::Unit) { method vec_reduce (line 49) | unsafe fn vec_reduce(mut x: Self::Array, y: *mut f32) { constant STEP (line 6) | const STEP: usize = 16; constant EPR (line 7) | const EPR: usize = 4; constant ARR (line 8) | const ARR: usize = STEP / EPR; FILE: candle-core/src/cpu_backend/conv2d.rs type Conv2D (line 12) | pub(super) struct Conv2D<'a>(pub(super) &'a crate::conv::ParamsConv2D); type Conv2dImpl (line 15) | enum Conv2dImpl { constant DEFAULT_CONV2D_IMPL (line 21) | const DEFAULT_CONV2D_IMPL: Conv2dImpl = Conv2dImpl::TiledIm2Col; constant OP (line 24) | const OP: &'static str = "conv2d"; method f (line 25) | fn f( function conv2d_1x1 (line 56) | fn conv2d_1x1( function conv2d_tiled (line 126) | fn conv2d_tiled( function conv2d_direct (line 280) | fn conv2d_direct( function alloc_uninit_vec (line 382) | fn alloc_uninit_vec(size: usize) -> Vec { function conv2d_im2col_gemm (line 391) | fn conv2d_im2col_gemm( FILE: candle-core/src/cpu_backend/mod.rs constant USE_IM2COL_CONV1D (line 16) | const USE_IM2COL_CONV1D: bool = true; constant USE_COL2IM_CONV1D_TR (line 17) | const USE_COL2IM_CONV1D_TR: bool = true; type CpuStorage (line 22) | pub enum CpuStorage { method as_slice (line 1659) | pub fn as_slice(&self) -> Result<&[D]> { method concat (line 1663) | pub fn concat(storages: &[CpuStorage]) -> Result { type CpuStorageRef (line 41) | pub enum CpuStorageRef<'a> { type CpuDevice (line 60) | pub struct CpuDevice; type Cmp (line 62) | struct Cmp(CmpOp); constant OP (line 64) | const OP: &'static str = "cmp"; method f (line 66) | fn f( type WCond (line 85) | struct WCond<'a, T: IntDType>(&'a [T], &'a Layout); constant OP (line 88) | const OP: &'static str = "where"; method f (line 90) | fn f(&self, t: &[T], t_l: &Layout, f: &[T], f_l: &Layout) ... type ReduceIndex (line 122) | struct ReduceIndex { method fold_impl (line 131) | fn fold_impl(&self, src: &[T], src_l: &Layout, f: F, g: G)... method f (line 208) | fn f) -> CpuStorage>( type ReduceSum (line 231) | struct ReduceSum<'a> { function fold_impl (line 239) | fn fold_impl(&self, src: &[T], src_l: &Layout, start_elt: T) -> Resul... method f (line 304) | fn f(&self, src: &[T], src_l: &Layout) -> Result> { type Affine (line 309) | struct Affine(f64, f64); method f (line 312) | fn f(&self, vs: &[T], layout: &Layout) -> Result> { type AvgPool2D (line 319) | struct AvgPool2D((usize, usize), (usize, usize)); method f (line 322) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type MaxPool2D (line 360) | struct MaxPool2D((usize, usize), (usize, usize)); method f (line 363) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type UpsampleNearest1D (line 402) | struct UpsampleNearest1D(usize); method f (line 405) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type UpsampleNearest2D (line 432) | struct UpsampleNearest2D(usize, usize); method f (line 435) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type UpsampleBilinear2D (line 469) | struct UpsampleBilinear2D { method f (line 478) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type Gather (line 588) | struct Gather<'a, I: IntDType> { method f (line 595) | fn f(&self, src: &[T], src_l: &Layout) -> Result> { type IndexSelect (line 646) | struct IndexSelect<'a, T: IntDType> { method f (line 653) | fn f(&self, src: &[T], layout: &Layout) -> Result> { type ElemUpdate (line 704) | trait ElemUpdate { method f (line 705) | fn f(dst: &mut T, src: T); method f (line 712) | fn f(dst: &mut T, src: T) { method f (line 718) | fn f(dst: &mut T, src: T) { type Set (line 708) | struct Set; type Add (line 709) | struct Add; type Scatter (line 723) | struct Scatter<'a, I: IntDType, M: ElemUpdate> { function new (line 731) | fn new(ids: &'a [I], ids_l: &'a Layout, dim: usize) -> Self { constant OP (line 742) | const OP: &'static str = "scatter"; method f (line 743) | fn f( type IndexAdd (line 804) | struct IndexAdd<'a, I: IntDType> { constant OP (line 810) | const OP: &'static str = "index-add"; method f (line 813) | fn f(&self, v1: &[T], l1: &Layout, src: &[T], src_l: &Layo... function copy2d_ (line 876) | fn copy2d_( function copy_strided_src_ (line 895) | fn copy_strided_src_(src: &[T], dst: &mut [T], dst_offset: usiz... type Conv1D (line 933) | struct Conv1D<'a>(&'a crate::conv::ParamsConv1D); constant OP (line 936) | const OP: &'static str = "conv1d"; method f (line 937) | fn f(&self, inp: &[T], inp_l: &Layout, k: &[T], k_l: &Layo... type Im2Col1D (line 995) | struct Im2Col1D { method l_out (line 1003) | fn l_out(&self, l: usize) -> usize { method f (line 1009) | fn f(&self, vs: &[T], layout: &Layout) -> Result> { type Im2Col (line 1054) | struct Im2Col { method hw_out (line 1063) | fn hw_out(&self, h: usize, w: usize) -> (usize, usize) { method f (line 1071) | fn f(&self, vs: &[T], layout: &Layout) -> Result> { type Col2Im1D (line 1129) | struct Col2Im1D { method f (line 1134) | fn f(&self, col: &[T], l: &Layout) -> Result> { type ConvTranspose1D (line 1157) | struct ConvTranspose1D<'a>(&'a crate::conv::ParamsConvTranspose1D); constant OP (line 1160) | const OP: &'static str = "conv_transpose1d"; method f (line 1161) | fn f(&self, inp: &[T], inp_l: &Layout, k: &[T], k_l: &Layo... type ConvTranspose2D (line 1226) | struct ConvTranspose2D<'a>(&'a crate::conv::ParamsConvTranspose2D); constant OP (line 1229) | const OP: &'static str = "conv_transpose2d"; method f (line 1230) | fn f(&self, inp: &[T], inp_l: &Layout, k: &[T], k_l: &Layo... type MatMul (line 1316) | struct MatMul((usize, usize, usize, usize)); method striding_error (line 1319) | fn striding_error(&self, lhs_l: &Layout, rhs_l: &Layout, msg: &'static... method ab_skip (line 1329) | fn ab_skip(&self, lhs_l: &Layout, rhs_l: &Layout) -> Result<(usize, us... constant OP (line 1355) | const OP: &'static str = "mat_mul"; method f (line 1358) | fn f( method f (line 1441) | fn f( method f (line 1532) | fn f( function elu (line 1650) | fn elu(v: T, alpha: T) -> T { type Device (line 1826) | type Device = CpuDevice; method dtype (line 1828) | fn dtype(&self) -> DType { method to_dtype (line 1847) | fn to_dtype(&self, layout: &Layout, dtype: DType) -> Result { method reduce_op (line 2269) | fn reduce_op(&self, op: ReduceOp, layout: &Layout, reduce_dims: &[usize]... method cmp (line 2325) | fn cmp(&self, op: CmpOp, rhs: &Self, lhs_l: &Layout, rhs_l: &Layout) -> ... method affine (line 2329) | fn affine(&self, layout: &Layout, mul: f64, add: f64) -> Result { method avg_pool2d (line 2333) | fn avg_pool2d( method max_pool2d (line 2342) | fn max_pool2d( method upsample_nearest1d (line 2351) | fn upsample_nearest1d(&self, layout: &Layout, sz: usize) -> Result { method upsample_nearest2d (line 2355) | fn upsample_nearest2d(&self, layout: &Layout, h: usize, w: usize) -> Res... method upsample_bilinear2d (line 2359) | fn upsample_bilinear2d( method powf (line 2378) | fn powf(&self, layout: &Layout, e: f64) -> Result { method elu (line 2414) | fn elu(&self, layout: &Layout, alpha: f64) -> Result { method unary_impl (line 2449) | fn unary_impl(&self, layout: &Layout) -> Result { method binary_impl (line 2518) | fn binary_impl( method copy2d (line 2605) | fn copy2d( method copy_strided_src (line 2666) | fn copy_strided_src(&self, dst: &mut Self, dst_offset: usize, src_l: &La... method where_cond (line 2703) | fn where_cond( method conv1d (line 2721) | fn conv1d( method conv_transpose1d (line 2767) | fn conv_transpose1d( method conv2d (line 2822) | fn conv2d( method conv_transpose2d (line 2832) | fn conv_transpose2d( method index_select (line 2842) | fn index_select(&self, ids: &Self, l: &Layout, ids_l: &Layout, dim: usiz... method gather (line 2851) | fn gather(&self, l: &Layout, ids: &Self, ids_l: &Layout, dim: usize) -> ... method scatter_set (line 2860) | fn scatter_set( method scatter_add_set (line 2877) | fn scatter_add_set( method index_add (line 2896) | fn index_add( method matmul (line 2945) | fn matmul( method device (line 2955) | fn device(&self) -> &Self::Device { method try_clone (line 2959) | fn try_clone(&self, _: &Layout) -> Result { method to_cpu_storage (line 2963) | fn to_cpu_storage(&self) -> Result { method const_set (line 2967) | fn const_set(&mut self, s: crate::scalar::Scalar, l: &Layout) -> Result<... type Storage (line 3027) | type Storage = CpuStorage; method location (line 3029) | fn location(&self) -> crate::DeviceLocation { method same_device (line 3033) | fn same_device(&self, _: &Self) -> bool { method storage_from_slice (line 3037) | fn storage_from_slice(&self, s: &[T]) -> Result Result Result Result { method set_seed (line 3053) | fn set_seed(&self, _seed: u64) -> Result<()> { method get_current_seed (line 3057) | fn get_current_seed(&self) -> Result { method rand_uniform (line 3061) | fn rand_uniform(&self, shape: &Shape, dtype: DType, min: f64, max: f64) ... method rand_normal (line 3124) | fn rand_normal(&self, shape: &Shape, dtype: DType, mean: f64, std: f64) ... method alloc_uninit (line 3187) | unsafe fn alloc_uninit(&self, shape: &Shape, dtype: DType) -> Result Result { method synchronize (line 3271) | fn synchronize(&self) -> Result<()> { FILE: candle-core/src/cpu_backend/utils.rs type C (line 5) | type C = super::CpuStorage; type Map1 (line 6) | pub trait Map1 { method f (line 7) | fn f(&self, vs: &[T], layout: &Layout) -> Result>; method map (line 9) | fn map(&self, vs: &C, layout: &Layout) -> Result { type Map1Any (line 30) | pub trait Map1Any { method f (line 31) | fn f) -> C>(&self, vs: &[T], layout: &Layou... method map (line 33) | fn map(&self, vs: &C, layout: &Layout) -> Result { type Map2 (line 54) | pub trait Map2 { constant OP (line 55) | const OP: &'static str; method f (line 56) | fn f(&self, v1: &[T], l1: &Layout, v2: &[T], l2: &Layout... method map (line 58) | fn map(&self, v1: &C, l1: &Layout, v2: &C, l2: &Layout) -> Result { type Map2InPlace (line 80) | pub trait Map2InPlace { constant OP (line 81) | const OP: &'static str; method f (line 82) | fn f(&self, v1: &mut [T], l1: &Layout, v2: &[T], l2: &La... method map (line 84) | fn map(&self, v1: &mut C, l1: &Layout, v2: &C, l2: &Layout) -> Result<... type Map2U8 (line 107) | pub trait Map2U8 { constant OP (line 108) | const OP: &'static str; method f (line 109) | fn f(&self, v1: &[T], l1: &Layout, v2: &[T], l2: &Layout... method map (line 111) | fn map(&self, v1: &C, l1: &Layout, v2: &C, l2: &Layout) -> Result { function binary_map (line 133) | pub fn binary_map U>( function binary_map_vec (line 213) | pub fn binary_map_vec T, FV: FnMut(&[T], &[T]... function unary_map (line 324) | pub fn unary_map U>( function unary_map_vec (line 359) | pub fn unary_map_vec U, FV: FnMut(&[T],... FILE: candle-core/src/cuda_backend/cudnn.rs function from (line 16) | fn from(err: cudarc::cudnn::CudnnError) -> Self { function from (line 22) | fn from(err: cudarc::driver::DriverError) -> Self { function launch_conv2d (line 27) | pub(crate) fn launch_conv2d< function launch_conv1d (line 126) | pub(crate) fn launch_conv1d< FILE: candle-core/src/cuda_backend/device.rs type DeviceId (line 15) | pub struct DeviceId(usize); method new (line 18) | fn new() -> Self { type CudaRng (line 26) | struct CudaRng(cudarc::curand::CudaRng); type ModuleStore (line 29) | pub struct ModuleStore { type CudaDevice (line 34) | pub struct CudaDevice { method fmt (line 46) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method alloc (line 53) | pub unsafe fn alloc( method alloc_zeros (line 60) | pub fn alloc_zeros Arc { method disable_event_tracking (line 168) | pub unsafe fn disable_event_tracking(&self) { method is_event_tracking (line 172) | pub fn is_event_tracking(&self) -> bool { method compile (line 177) | pub fn compile( method id (line 198) | pub fn id(&self) -> DeviceId { method get_or_load_custom_func (line 202) | pub fn get_or_load_custom_func( method get_or_load_func (line 227) | pub fn get_or_load_func(&self, fn_name: &str, mdl: &kernels::Module) -... method cublas_handle (line 247) | pub fn cublas_handle(&self) -> Arc { method new_with_stream (line 253) | pub fn new_with_stream(ordinal: usize) -> Result { type CudaFunc (line 118) | pub struct CudaFunc { type Target (line 124) | type Target = CudaFunction; method deref (line 126) | fn deref(&self) -> &Self::Target { method into_cuda_function (line 132) | pub fn into_cuda_function(self) -> CudaFunction { method builder (line 148) | pub fn builder(&self) -> cudarc::driver::LaunchArgs<'_> { type Storage (line 275) | type Storage = CudaStorage; method new (line 277) | fn new(ordinal: usize) -> Result { method set_seed (line 297) | fn set_seed(&self, seed: u64) -> Result<()> { method get_current_seed (line 306) | fn get_current_seed(&self) -> Result { method location (line 310) | fn location(&self) -> crate::DeviceLocation { method same_device (line 316) | fn same_device(&self, rhs: &Self) -> bool { method zeros_impl (line 320) | fn zeros_impl(&self, shape: &Shape, dtype: DType) -> Result { method rand_uniform (line 375) | fn rand_uniform(&self, shape: &Shape, dtype: DType, lo: f64, up: f64) ->... method rand_normal (line 423) | fn rand_normal(&self, shape: &Shape, dtype: DType, mean: f64, std: f64) ... method alloc_uninit (line 474) | unsafe fn alloc_uninit(&self, shape: &Shape, dtype: DType) -> Result(&self, s: &[T]) -> Result Result Result<... method synchronize (line 706) | fn synchronize(&self) -> Result<()> { FILE: candle-core/src/cuda_backend/error.rs type CudaError (line 5) | pub enum CudaError { function from (line 49) | fn from(val: CudaError) -> Self { type WrapErr (line 54) | pub trait WrapErr { method w (line 55) | fn w(self) -> std::result::Result; function w (line 59) | fn w(self) -> std::result::Result { FILE: candle-core/src/cuda_backend/mod.rs type SlicePtrOrNull (line 23) | pub enum SlicePtrOrNull { function builder_arg (line 29) | pub fn builder_arg<'a, 'b: 'a>(&'b self, builder: &mut cudarc::driver::L... function builder_arg (line 38) | pub fn builder_arg<'a, 'b: 'a>(&'b self, builder: &mut cudarc::driver::L... function params_from_layout (line 56) | pub fn params_from_layout(dev: &CudaDevice, l: &Layout) -> Result { type CudaStorageSlice (line 67) | pub enum CudaStorageSlice { type Clone (line 85) | struct Clone; method f (line 87) | fn f( function kernel_name (line 97) | pub fn kernel_name(root: &str) -> String { type Affine (line 102) | struct Affine(f64, f64); method f (line 104) | fn f( type Elu (line 133) | struct Elu(f64); method f (line 135) | fn f( type Im2Col1D (line 164) | struct Im2Col1D { method l_out (line 173) | fn l_out(&self, l: usize) -> usize { method f (line 179) | fn f( type Im2Col (line 212) | struct Im2Col { method hw_out (line 222) | fn hw_out(&self, h: usize, w: usize) -> (usize, usize) { method f (line 230) | fn f( type Powf (line 264) | struct Powf(f64); method f (line 266) | fn f( type FastReduce (line 294) | struct FastReduce<'a>(&'a [usize], ReduceOp); method f (line 296) | fn f) ->... method f (line 377) | fn f( function slice_ptr (line 404) | fn slice_ptr(v: &CudaSlice, lo: usize) -> (u64, cudarc... type IndexSelect (line 410) | struct IndexSelect<'a>(&'a CudaStorage, &'a Layout, usize); method f (line 412) | fn f( type Gather (line 463) | struct Gather<'a>(&'a CudaStorage, &'a Layout, usize); method f (line 465) | fn f( type IndexAdd (line 516) | struct IndexAdd<'a>(&'a CudaStorage, &'a Layout, usize); method f (line 518) | fn f( type Scatter (line 570) | struct Scatter<'a>(&'a CudaStorage, &'a Layout, usize); method f (line 572) | fn f( type ScatterAdd (line 622) | struct ScatterAdd<'a>(&'a CudaStorage, &'a Layout, usize); method f (line 624) | fn f( type Conv1D (line 674) | struct Conv1D<'a>(&'a crate::conv::ParamsConv1D); method f (line 676) | fn f( type Conv2D (line 718) | struct Conv2D<'a>(&'a crate::conv::ParamsConv2D); method f (line 720) | fn f( type Col2Im1D (line 761) | struct Col2Im1D { method f (line 766) | fn f( type ConvTranspose1D (line 789) | struct ConvTranspose1D<'a>(&'a crate::conv::ParamsConvTranspose1D); method f (line 791) | fn f( type ConvTranspose2D (line 837) | struct ConvTranspose2D<'a>(&'a crate::conv::ParamsConvTranspose2D); method f (line 839) | fn f( type PoolOp (line 886) | enum PoolOp { type Pool2D (line 891) | struct Pool2D { method f (line 900) | fn f( type UpsampleNearest2D (line 943) | struct UpsampleNearest2D(usize, usize); method f (line 945) | fn f( type UpsampleBilinear2D (line 983) | struct UpsampleBilinear2D { method f (line 992) | fn f( type WhereCond (line 1035) | struct WhereCond<'a>(&'a CudaStorage, &'a Layout); method f (line 1037) | fn f( method f (line 1092) | fn f( type Cmp (line 1127) | struct Cmp(CmpOp); method f (line 1129) | fn f( function slice_src_and_dst (line 1172) | fn slice_src_and_dst<'a, T>( type CudaStorage (line 1192) | pub struct CudaStorage { method wrap_cuda_slice (line 1249) | pub fn wrap_cuda_slice(slice: CudaSlice, device: Cuda... method as_cuda_slice (line 1253) | pub fn as_cuda_slice(&self) -> Result<&CudaSlice> { method as_cuda_slice_mut (line 1257) | pub fn as_cuda_slice_mut(&mut self) -> Result<&mut CudaS... method transfer_to_device (line 1261) | pub fn transfer_to_device(&self, dst: &CudaDevice) -> Result { type CudaDType (line 1197) | pub trait CudaDType: Sized { method as_cuda_slice (line 1198) | fn as_cuda_slice(s: &CudaStorage) -> Result<&CudaSlice>; method as_cuda_slice_mut (line 1199) | fn as_cuda_slice_mut(s: &mut CudaStorage) -> Result<&mut CudaSlice, dev: CudaDevice) -> CudaStorage; function gemm_config (line 1343) | fn gemm_config( type Device (line 1436) | type Device = CudaDevice; method try_clone (line 1438) | fn try_clone(&self, layout: &Layout) -> Result { method dtype (line 1444) | fn dtype(&self) -> DType { method device (line 1463) | fn device(&self) -> &CudaDevice { method const_set (line 1467) | fn const_set(&mut self, s: crate::scalar::Scalar, layout: &Layout) -> Re... method to_dtype (line 1507) | fn to_dtype(&self, layout: &Layout, dtype: DType) -> Result { method affine (line 1648) | fn affine(&self, layout: &Layout, mul: f64, add: f64) -> Result { method powf (line 1654) | fn powf(&self, layout: &Layout, e: f64) -> Result { method elu (line 1660) | fn elu(&self, layout: &Layout, alpha: f64) -> Result { method reduce_op (line 1666) | fn reduce_op(&self, op: ReduceOp, layout: &Layout, sum_dims: &[usize]) -... method cmp (line 1672) | fn cmp(&self, op: CmpOp, rhs: &Self, lhs_l: &Layout, rhs_l: &Layout) -> ... method unary_impl (line 1678) | fn unary_impl(&self, layout: &Layout) -> Result { method binary_impl (line 1684) | fn binary_impl( method to_cpu_storage (line 1695) | fn to_cpu_storage(&self) -> Result { method where_cond (line 1748) | fn where_cond( method conv1d (line 1762) | fn conv1d( method conv1d (line 1813) | fn conv1d( method conv_transpose1d (line 1883) | fn conv_transpose1d( method conv2d (line 1943) | fn conv2d( method conv2d (line 1998) | fn conv2d( method conv_transpose2d (line 2068) | fn conv_transpose2d( method avg_pool2d (line 2081) | fn avg_pool2d(&self, l: &Layout, k: (usize, usize), stride: (usize, usiz... method max_pool2d (line 2094) | fn max_pool2d(&self, l: &Layout, k: (usize, usize), stride: (usize, usiz... method upsample_nearest1d (line 2107) | fn upsample_nearest1d(&self, _: &Layout, _out_sz: usize) -> Result { method upsample_nearest2d (line 2111) | fn upsample_nearest2d(&self, l: &Layout, out_w: usize, out_h: usize) -> ... method upsample_bilinear2d (line 2117) | fn upsample_bilinear2d( method index_select (line 2138) | fn index_select(&self, ids: &Self, l: &Layout, ids_l: &Layout, dim: usiz... method gather (line 2143) | fn gather(&self, l: &Layout, ids: &Self, ids_l: &Layout, dim: usize) -> ... method scatter_set (line 2148) | fn scatter_set( method scatter_add_set (line 2160) | fn scatter_add_set( method index_add (line 2172) | fn index_add( method matmul (line 2188) | fn matmul( method copy2d (line 2244) | fn copy2d( method copy_strided_src (line 2292) | fn copy_strided_src(&self, dst: &mut Self, dst_offset: usize, src_l: &La... function gemm_reduced_precision_f32 (line 2482) | pub fn gemm_reduced_precision_f32() -> bool { function set_gemm_reduced_precision_f32 (line 2488) | pub fn set_gemm_reduced_precision_f32(b: bool) { function gemm_reduced_precision_f16 (line 2494) | pub fn gemm_reduced_precision_f16() -> bool { function set_gemm_reduced_precision_f16 (line 2500) | pub fn set_gemm_reduced_precision_f16(b: bool) { function gemm_reduced_precision_bf16 (line 2506) | pub fn gemm_reduced_precision_bf16() -> bool { function set_gemm_reduced_precision_bf16 (line 2512) | pub fn set_gemm_reduced_precision_bf16(b: bool) { function gemm_strided_batched_f32 (line 2516) | unsafe fn gemm_strided_batched_f32( function gemm_strided_batched_f16 (line 2566) | unsafe fn gemm_strided_batched_f16( function gemm_strided_batched_bf16 (line 2625) | unsafe fn gemm_strided_batched_bf16( FILE: candle-core/src/cuda_backend/utils.rs type S (line 8) | pub type S = super::CudaStorageSlice; type Map1 (line 10) | pub trait Map1 { method f (line 11) | fn f( method map (line 18) | fn map(&self, s: &S, d: &CudaDevice, l: &Layout) -> Result { type Map2 (line 38) | pub trait Map2 { method f (line 39) | fn f( method map (line 48) | fn map(&self, s1: &S, l1: &Layout, s2: &S, l2: &Layout, d: &CudaDevice... type Map3 (line 66) | pub trait Map3 { method f (line 68) | fn f( method map (line 80) | fn map( type Map2InPlace (line 107) | pub trait Map2InPlace { method f (line 108) | fn f( method map (line 117) | fn map( type Map1Any (line 141) | pub trait Map1Any { method f (line 142) | fn f) ... method map (line 150) | fn map(&self, s: &S, d: &CudaDevice, l: &Layout) -> Result { type Map2Any (line 170) | pub trait Map2Any { method f (line 171) | fn f( method map (line 180) | fn map(&self, s1: &S, l1: &Layout, s2: &S, l2: &Layout, d: &CudaDevice... FILE: candle-core/src/custom_op.rs type CustomOp1 (line 7) | pub trait CustomOp1 { method name (line 9) | fn name(&self) -> &'static str; method cpu_fwd (line 13) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(Cp... method cuda_fwd (line 17) | fn cuda_fwd(&self, _storage: &CudaStorage, _layout: &Layout) -> Result... method metal_fwd (line 25) | fn metal_fwd( method bwd (line 38) | fn bwd(&self, _arg: &Tensor, _res: &Tensor, _grad_res: &Tensor) -> Res... type CustomOp2 (line 43) | pub trait CustomOp2 { method name (line 44) | fn name(&self) -> &'static str; method cpu_fwd (line 48) | fn cpu_fwd( method cuda_fwd (line 58) | fn cuda_fwd( method metal_fwd (line 72) | fn metal_fwd( method bwd (line 84) | fn bwd( type CustomOp3 (line 95) | pub trait CustomOp3 { method name (line 96) | fn name(&self) -> &'static str; method cpu_fwd (line 100) | fn cpu_fwd( method cuda_fwd (line 112) | fn cuda_fwd( method metal_fwd (line 128) | fn metal_fwd( method bwd (line 142) | fn bwd( method apply_op1_no_bwd (line 156) | pub fn apply_op1_no_bwd(&self, c: &C) -> Result { method apply_op2_no_bwd (line 162) | pub fn apply_op2_no_bwd(&self, rhs: &Self, c: &C) -> Resul... method apply_op3_no_bwd (line 170) | pub fn apply_op3_no_bwd(&self, t2: &Self, t3: &Self, c: &C... method apply_op1_arc (line 183) | pub fn apply_op1_arc(&self, c: Arc>) ->... method apply_op1 (line 191) | pub fn apply_op1(&self, c: C) -> R... method apply_op2_arc (line 196) | pub fn apply_op2_arc( method apply_op2 (line 211) | pub fn apply_op2(&self, r: &Self, ... method apply_op3_arc (line 216) | pub fn apply_op3_arc( method apply_op3 (line 236) | pub fn apply_op3( type InplaceOp1 (line 250) | pub trait InplaceOp1 { method name (line 252) | fn name(&self) -> &'static str; method cpu_fwd (line 256) | fn cpu_fwd(&self, storage: &mut CpuStorage, layout: &Layout) -> Result... method cuda_fwd (line 260) | fn cuda_fwd(&self, _storage: &mut CudaStorage, _layout: &Layout) -> Re... method metal_fwd (line 268) | fn metal_fwd(&self, _storage: &mut MetalStorage, _layout: &Layout) -> ... method name (line 421) | fn name(&self) -> &'static str { method cpu_fwd (line 425) | fn cpu_fwd(&self, _: &mut CpuStorage, _: &Layout) -> Result<()> { method metal_fwd (line 430) | fn metal_fwd(&self, sto: &mut MetalStorage, layout: &Layout) -> Result... method cuda_fwd (line 462) | fn cuda_fwd(&self, sto: &mut CudaStorage, layout: &Layout) -> Result<(... type InplaceOp2 (line 275) | pub trait InplaceOp2 { method name (line 276) | fn name(&self) -> &'static str; method cpu_fwd (line 280) | fn cpu_fwd(&self, s1: &mut CpuStorage, l1: &Layout, s2: &CpuStorage, l... method cuda_fwd (line 285) | fn cuda_fwd(&self, _: &mut CudaStorage, _: &Layout, _: &CudaStorage, _... method metal_fwd (line 293) | fn metal_fwd( type InplaceOp3 (line 306) | pub trait InplaceOp3 { method name (line 307) | fn name(&self) -> &'static str; method cpu_fwd (line 311) | fn cpu_fwd( method cuda_fwd (line 323) | fn cuda_fwd( method metal_fwd (line 339) | fn metal_fwd( method inplace_op1 (line 356) | pub fn inplace_op1(&self, c: &C) -> Result<()> { method inplace_op2 (line 361) | pub fn inplace_op2(&self, rhs: &Self, c: &C) -> Result<()> { method inplace_op3 (line 367) | pub fn inplace_op3(&self, t2: &Self, t3: &Self, c: &C) ->... type UgIOp1 (line 380) | pub struct UgIOp1 { method new (line 392) | pub fn new( FILE: candle-core/src/device.rs type DeviceLocation (line 8) | pub enum DeviceLocation { type Device (line 16) | pub enum Device { method new_cuda (line 234) | pub fn new_cuda(ordinal: usize) -> Result { method as_cuda_device (line 238) | pub fn as_cuda_device(&self) -> Result<&crate::CudaDevice> { method as_metal_device (line 246) | pub fn as_metal_device(&self) -> Result<&crate::MetalDevice> { method new_cuda_with_stream (line 254) | pub fn new_cuda_with_stream(ordinal: usize) -> Result { method new_metal (line 258) | pub fn new_metal(ordinal: usize) -> Result { method set_seed (line 262) | pub fn set_seed(&self, seed: u64) -> Result<()> { method get_current_seed (line 270) | pub fn get_current_seed(&self) -> Result { method same_device (line 278) | pub fn same_device(&self, rhs: &Self) -> bool { method location (line 287) | pub fn location(&self) -> DeviceLocation { method is_cpu (line 295) | pub fn is_cpu(&self) -> bool { method is_cuda (line 299) | pub fn is_cuda(&self) -> bool { method is_metal (line 303) | pub fn is_metal(&self) -> bool { method supports_bf16 (line 307) | pub fn supports_bf16(&self) -> bool { method bf16_default_to_f32 (line 315) | pub fn bf16_default_to_f32(&self) -> DType { method cuda_if_available (line 323) | pub fn cuda_if_available(ordinal: usize) -> Result { method metal_if_available (line 331) | pub fn metal_if_available(ordinal: usize) -> Result { method rand_uniform_f64 (line 339) | pub(crate) fn rand_uniform_f64( method rand_uniform (line 368) | pub(crate) fn rand_uniform( method rand_normal_f64 (line 377) | pub(crate) fn rand_normal_f64( method rand_normal (line 406) | pub(crate) fn rand_normal( method zeros (line 415) | pub(crate) fn zeros(&self, shape: &Shape, dtype: DType) -> Result(&self, data: &[D]) -> R... method storage (line 463) | pub(crate) fn storage(&self, array: A) -> Result { method storage_owned (line 479) | pub(crate) fn storage_owned(&self, data: Vec) -> Resu... method synchronize (line 495) | pub fn synchronize(&self) -> Result<()> { type NdArray (line 22) | pub trait NdArray { method shape (line 23) | fn shape(&self) -> Result; method to_cpu_storage (line 25) | fn to_cpu_storage(&self) -> CpuStorage; method shape (line 29) | fn shape(&self) -> Result { method to_cpu_storage (line 33) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 39) | fn shape(&self) -> Result { method to_cpu_storage (line 43) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 49) | fn shape(&self) -> Result { method to_cpu_storage (line 53) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 59) | fn shape(&self) -> Result { method to_cpu_storage (line 63) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 71) | fn shape(&self) -> Result { method to_cpu_storage (line 75) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 89) | fn shape(&self) -> Result { method to_cpu_storage (line 93) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 107) | fn shape(&self) -> Result { method to_cpu_storage (line 111) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 117) | fn shape(&self) -> Result { method to_cpu_storage (line 131) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 138) | fn shape(&self) -> Result { method to_cpu_storage (line 152) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 163) | fn shape(&self) -> Result { method to_cpu_storage (line 178) | fn to_cpu_storage(&self) -> CpuStorage { method shape (line 197) | fn shape(&self) -> Result { method to_cpu_storage (line 212) | fn to_cpu_storage(&self) -> CpuStorage { FILE: candle-core/src/display.rs method fmt_dt (line 9) | fn fmt_dt( method fmt (line 55) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type PrinterOptions (line 81) | pub struct PrinterOptions { method const_default (line 94) | const fn const_default() -> Self { function print_options (line 105) | pub fn print_options() -> &'static std::sync::Mutex { function set_print_options (line 109) | pub fn set_print_options(options: PrinterOptions) { function set_print_options_default (line 113) | pub fn set_print_options_default() { function set_print_options_short (line 117) | pub fn set_print_options_short() { function set_print_options_full (line 127) | pub fn set_print_options_full() { function set_line_width (line 137) | pub fn set_line_width(line_width: usize) { function set_precision (line 141) | pub fn set_precision(precision: usize) { function set_edge_items (line 145) | pub fn set_edge_items(edge_items: usize) { function set_threshold (line 149) | pub fn set_threshold(threshold: usize) { function set_sci_mode (line 153) | pub fn set_sci_mode(sci_mode: Option) { type FmtSize (line 157) | struct FmtSize { method new (line 162) | fn new() -> Self { method final_size (line 166) | fn final_size(self) -> usize { method write_str (line 172) | fn write_str(&mut self, s: &str) -> std::fmt::Result { type TensorFormatter (line 178) | trait TensorFormatter { method fmt (line 181) | fn fmt(&self, v: Self::Elem, max_w: usize, f: &mut... method max_width (line 183) | fn max_width(&self, to_display: &Tensor) -> usize { method write_newline_indent (line 195) | fn write_newline_indent(i: usize, f: &mut std::fmt::Formatter) -> std:... method fmt_tensor (line 203) | fn fmt_tensor( type Elem (line 369) | type Elem = S; method fmt (line 371) | fn fmt(&self, v: Self::Elem, max_w: usize, f: &mut... type Elem (line 414) | type Elem = S; method fmt (line 416) | fn fmt(&self, v: Self::Elem, max_w: usize, f: &mut... type FloatFormatter (line 299) | struct FloatFormatter { function new (line 310) | fn new(t: &Tensor, po: &PrinterOptions) -> Result { type IntFormatter (line 398) | struct IntFormatter { function new (line 403) | fn new() -> Self { function get_summarized_data (line 421) | fn get_summarized_data(t: &Tensor, edge_items: usize) -> Result { method fmt (line 454) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { FILE: candle-core/src/dtype.rs type DType (line 8) | pub enum DType { type Err (line 51) | type Err = DTypeParseError; method from_str (line 52) | fn from_str(s: &str) -> std::result::Result { method as_str (line 75) | pub fn as_str(&self) -> &'static str { method size_in_bytes (line 95) | pub fn size_in_bytes(&self) -> usize { method is_int (line 114) | pub fn is_int(&self) -> bool { method is_float (line 129) | pub fn is_float(&self) -> bool { type DTypeParseError (line 40) | pub struct DTypeParseError(String); method fmt (line 43) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type WithDType (line 145) | pub trait WithDType: constant DTYPE (line 157) | const DTYPE: DType; method from_f64 (line 159) | fn from_f64(v: f64) -> Self; method to_f64 (line 160) | fn to_f64(self) -> f64; method to_scalar (line 161) | fn to_scalar(self) -> crate::scalar::Scalar; method cpu_storage_ref (line 162) | fn cpu_storage_ref(data: &[Self]) -> CpuStorageRef<'_>; method to_cpu_storage_owned (line 163) | fn to_cpu_storage_owned(data: Vec) -> CpuStorage; method to_cpu_storage (line 165) | fn to_cpu_storage(data: &[Self]) -> CpuStorage { method cpu_storage_as_slice (line 169) | fn cpu_storage_as_slice(s: &CpuStorage) -> Result<&[Self]>; method cpu_storage_data (line 170) | fn cpu_storage_data(s: CpuStorage) -> Result>; type IntDType (line 238) | pub trait IntDType: WithDType + num_traits::Bounded { method is_true (line 239) | fn is_true(&self) -> bool; method as_usize (line 240) | fn as_usize(&self) -> usize; method is_true (line 244) | fn is_true(&self) -> bool { method as_usize (line 247) | fn as_usize(&self) -> usize { method is_true (line 253) | fn is_true(&self) -> bool { method as_usize (line 256) | fn as_usize(&self) -> usize { method is_true (line 262) | fn is_true(&self) -> bool { method as_usize (line 265) | fn as_usize(&self) -> usize { method is_true (line 271) | fn is_true(&self) -> bool { method as_usize (line 274) | fn as_usize(&self) -> usize { method is_true (line 280) | fn is_true(&self) -> bool { method as_usize (line 283) | fn as_usize(&self) -> usize { type FloatDType (line 288) | pub trait FloatDType: WithDType {} FILE: candle-core/src/dummy_cuda_backend.rs type CudaDevice (line 8) | pub struct CudaDevice; method new_with_stream (line 28) | pub fn new_with_stream(_: usize) -> Result { method id (line 31) | pub fn id(&self) -> DeviceId { type Storage (line 235) | type Storage = CudaStorage; method new (line 236) | fn new(_: usize) -> Result { method set_seed (line 240) | fn set_seed(&self, _: u64) -> Result<()> { method get_current_seed (line 244) | fn get_current_seed(&self) -> Result { method location (line 248) | fn location(&self) -> crate::DeviceLocation { method same_device (line 252) | fn same_device(&self, _: &Self) -> bool { method zeros_impl (line 256) | fn zeros_impl(&self, _shape: &Shape, _dtype: DType) -> Result Result... method storage_from_slice (line 264) | fn storage_from_slice(&self, _: &[T]) -> Result Result Result Result<... method rand_normal (line 280) | fn rand_normal(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result Result<()> { type CudaStorage (line 11) | pub struct CudaStorage; method transfer_to_device (line 14) | pub fn transfer_to_device(&self, _dst: &CudaDevice) -> Result { type Device (line 37) | type Device = CudaDevice; method try_clone (line 39) | fn try_clone(&self, _: &Layout) -> Result { method dtype (line 43) | fn dtype(&self) -> DType { method device (line 47) | fn device(&self) -> &Self::Device { method const_set (line 51) | fn const_set(&mut self, _: crate::scalar::Scalar, _: &Layout) -> Resul... method to_cpu_storage (line 55) | fn to_cpu_storage(&self) -> Result { method affine (line 59) | fn affine(&self, _: &Layout, _: f64, _: f64) -> Result { method powf (line 63) | fn powf(&self, _: &Layout, _: f64) -> Result { method elu (line 67) | fn elu(&self, _: &Layout, _: f64) -> Result { method reduce_op (line 71) | fn reduce_op(&self, _: ReduceOp, _: &Layout, _: &[usize]) -> Result Result Result { method unary_impl (line 83) | fn unary_impl(&self, _: &Layout) -> Result { method binary_impl (line 87) | fn binary_impl(&self, _: &Self, _: &Layout, _: &Layout) ... method where_cond (line 91) | fn where_cond(&self, _: &Layout, _: &Self, _: &Layout, _: &Self, _: &L... method conv1d (line 95) | fn conv1d( method conv_transpose1d (line 105) | fn conv_transpose1d( method conv2d (line 115) | fn conv2d( method conv_transpose2d (line 125) | fn conv_transpose2d( method index_select (line 135) | fn index_select(&self, _: &Self, _: &Layout, _: &Layout, _: usize) -> ... method gather (line 138) | fn gather(&self, _: &Layout, _: &Self, _: &Layout, _: usize) -> Result... method scatter_set (line 142) | fn scatter_set( method scatter_add_set (line 154) | fn scatter_add_set( method index_add (line 166) | fn index_add( method matmul (line 178) | fn matmul( method copy_strided_src (line 188) | fn copy_strided_src(&self, _: &mut Self, _: usize, _: &Layout) -> Resu... method copy2d (line 192) | fn copy2d( method avg_pool2d (line 205) | fn avg_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method max_pool2d (line 209) | fn max_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method upsample_nearest1d (line 213) | fn upsample_nearest1d(&self, _: &Layout, _: usize) -> Result { method upsample_nearest2d (line 217) | fn upsample_nearest2d(&self, _: &Layout, _: usize, _: usize) -> Result... method upsample_bilinear2d (line 221) | fn upsample_bilinear2d( type DeviceId (line 25) | pub struct DeviceId(usize); function gemm_reduced_precision_f16 (line 291) | pub fn gemm_reduced_precision_f16() -> bool { function set_gemm_reduced_precision_f16 (line 297) | pub fn set_gemm_reduced_precision_f16(_: bool) {} function gemm_reduced_precision_bf16 (line 301) | pub fn gemm_reduced_precision_bf16() -> bool { function set_gemm_reduced_precision_bf16 (line 307) | pub fn set_gemm_reduced_precision_bf16(_: bool) {} function gemm_reduced_precision_f32 (line 311) | pub fn gemm_reduced_precision_f32() -> bool { function set_gemm_reduced_precision_f32 (line 317) | pub fn set_gemm_reduced_precision_f32(_b: bool) {} FILE: candle-core/src/dummy_dtype.rs type F6E2M3 (line 11) | pub struct F6E2M3; method fmt (line 247) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type F6E3M2 (line 16) | pub struct F6E3M2; method fmt (line 253) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type F4 (line 21) | pub struct F4; method fmt (line 259) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type F8E8M0 (line 26) | pub struct F8E8M0; method fmt (line 265) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { FILE: candle-core/src/dummy_metal_backend.rs type MetalDevice (line 6) | pub struct MetalDevice; type Storage (line 228) | type Storage = MetalStorage; method new (line 229) | fn new(_: usize) -> Result { method set_seed (line 233) | fn set_seed(&self, _: u64) -> Result<()> { method get_current_seed (line 237) | fn get_current_seed(&self) -> Result { method location (line 241) | fn location(&self) -> crate::DeviceLocation { method same_device (line 245) | fn same_device(&self, _: &Self) -> bool { method zeros_impl (line 249) | fn zeros_impl(&self, _shape: &Shape, _dtype: DType) -> Result Result... method storage_from_slice (line 257) | fn storage_from_slice(&self, _: &[T]) -> Result Result Result Result<... method rand_normal (line 273) | fn rand_normal(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result Result<()> { type MetalStorage (line 9) | pub struct MetalStorage; type Device (line 30) | type Device = MetalDevice; method try_clone (line 32) | fn try_clone(&self, _: &Layout) -> Result { method dtype (line 36) | fn dtype(&self) -> DType { method device (line 40) | fn device(&self) -> &Self::Device { method const_set (line 44) | fn const_set(&mut self, _: crate::scalar::Scalar, _: &Layout) -> Resul... method to_cpu_storage (line 48) | fn to_cpu_storage(&self) -> Result { method affine (line 52) | fn affine(&self, _: &Layout, _: f64, _: f64) -> Result { method powf (line 56) | fn powf(&self, _: &Layout, _: f64) -> Result { method elu (line 60) | fn elu(&self, _: &Layout, _: f64) -> Result { method reduce_op (line 64) | fn reduce_op(&self, _: ReduceOp, _: &Layout, _: &[usize]) -> Result Result Result { method unary_impl (line 76) | fn unary_impl(&self, _: &Layout) -> Result { method binary_impl (line 80) | fn binary_impl(&self, _: &Self, _: &Layout, _: &Layout) ... method where_cond (line 84) | fn where_cond(&self, _: &Layout, _: &Self, _: &Layout, _: &Self, _: &L... method conv1d (line 88) | fn conv1d( method conv_transpose1d (line 98) | fn conv_transpose1d( method conv2d (line 108) | fn conv2d( method conv_transpose2d (line 118) | fn conv_transpose2d( method index_select (line 128) | fn index_select(&self, _: &Self, _: &Layout, _: &Layout, _: usize) -> ... method gather (line 131) | fn gather(&self, _: &Layout, _: &Self, _: &Layout, _: usize) -> Result... method scatter_set (line 135) | fn scatter_set( method scatter_add_set (line 147) | fn scatter_add_set( method index_add (line 159) | fn index_add( method matmul (line 171) | fn matmul( method copy_strided_src (line 181) | fn copy_strided_src(&self, _: &mut Self, _: usize, _: &Layout) -> Resu... method copy2d (line 185) | fn copy2d( method avg_pool2d (line 198) | fn avg_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method max_pool2d (line 202) | fn max_pool2d(&self, _: &Layout, _: (usize, usize), _: (usize, usize))... method upsample_nearest1d (line 206) | fn upsample_nearest1d(&self, _: &Layout, _: usize) -> Result { method upsample_nearest2d (line 210) | fn upsample_nearest2d(&self, _: &Layout, _: usize, _: usize) -> Result... method upsample_bilinear2d (line 214) | fn upsample_bilinear2d( type MetalError (line 12) | pub enum MetalError { method from (line 18) | fn from(e: String) -> Self { FILE: candle-core/src/error.rs type MatMulUnexpectedStriding (line 7) | pub struct MatMulUnexpectedStriding { type Error (line 22) | pub enum Error { method fmt (line 15) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method wrap (line 251) | pub fn wrap(err: impl std::fmt::Display + Send + Sync + 'static) -> Se... method msg (line 255) | pub fn msg(err: impl std::fmt::Display) -> Self { method debug (line 259) | pub fn debug(err: impl std::fmt::Debug) -> Self { method bt (line 263) | pub fn bt(self) -> Self { method with_path (line 275) | pub fn with_path>(self, p: P) -> Self { method context (line 282) | pub fn context(self, c: impl std::fmt::Display + Send + Sync + 'static... type Result (line 248) | pub type Result = std::result::Result; function zip (line 303) | pub fn zip(r1: Result, r2: Result) -> Result<(T, U)> { type Sealed (line 312) | pub trait Sealed {} type Context (line 321) | pub trait Context: private::Sealed { method context (line 323) | fn context(self, context: C) -> std::result::Result method with_context (line 329) | fn with_context(self, f: F) -> std::result::Result function context (line 339) | fn context(self, context: C) -> std::result::Result function with_context (line 355) | fn with_context(self, context: F) -> std::result::Result function context (line 372) | fn context(self, context: C) -> std::result::Result function with_context (line 384) | fn with_context(self, context: F) -> std::result::Result FILE: candle-core/src/indexer.rs method index (line 27) | fn index(&self, indexers: &[TensorIndexer]) -> Result { type TensorIndexer (line 66) | pub enum TensorIndexer { method from (line 77) | fn from(index: usize) -> Self { method from (line 83) | fn from(index: &[u32]) -> Self { method from (line 92) | fn from(index: Vec) -> Self { method from (line 102) | fn from(tensor: &Tensor) -> Self { method from (line 116) | fn from(range: T) -> Self { type RB (line 107) | trait RB: RangeBounds {} type IndexOp (line 134) | pub trait IndexOp { method i (line 137) | fn i(&self, index: T) -> Result; method i (line 171) | fn i(&self, index: T) -> Result { method i (line 207) | fn i(&self, (a,): (A,)) -> Result { method i (line 233) | fn i(&self, (a, b): (A, B)) -> Result { FILE: candle-core/src/layout.rs type Layout (line 5) | pub struct Layout { method new (line 13) | pub fn new(shape: Shape, stride: Vec, start_offset: usize) -> S... method contiguous_with_offset (line 21) | pub fn contiguous_with_offset>(shape: S, start_offset: ... method contiguous (line 31) | pub fn contiguous>(shape: S) -> Self { method dims (line 35) | pub fn dims(&self) -> &[usize] { method dim (line 40) | pub fn dim(&self, dim: D) -> Result { method shape (line 45) | pub fn shape(&self) -> &Shape { method stride (line 49) | pub fn stride(&self) -> &[usize] { method start_offset (line 53) | pub fn start_offset(&self) -> usize { method contiguous_offsets (line 59) | pub fn contiguous_offsets(&self) -> Option<(usize, usize)> { method is_contiguous (line 71) | pub fn is_contiguous(&self) -> bool { method is_fortran_contiguous (line 76) | pub fn is_fortran_contiguous(&self) -> bool { method narrow (line 80) | pub fn narrow(&self, dim: usize, start: usize, len: usize) -> Result Result { method permute (line 130) | pub fn permute(&self, idxs: &[usize]) -> Result { method broadcast_as (line 155) | pub fn broadcast_as>(&self, shape: S) -> Result { method strided_index (line 190) | pub(crate) fn strided_index(&self) -> crate::StridedIndex<'_> { method strided_blocks (line 194) | pub(crate) fn strided_blocks(&self) -> crate::StridedBlocks<'_> { method offsets_b (line 224) | pub(crate) fn offsets_b(&self) -> Option (usize, usize); method to_usize2 (line 136) | fn to_usize2(self) -> (usize, usize) { method to_usize2 (line 142) | fn to_usize2(self) -> (usize, usize) { type Module (line 148) | pub trait Module { method forward (line 149) | fn forward(&self, xs: &Tensor) -> Result; method forward (line 153) | fn forward(&self, xs: &Tensor) -> Result { method forward (line 159) | fn forward(&self, xs: &Tensor) -> Result { type ModuleT (line 169) | pub trait ModuleT { method forward_t (line 170) | fn forward_t(&self, xs: &Tensor, train: bool) -> Result; method forward_t (line 174) | fn forward_t(&self, xs: &Tensor, _train: bool) -> Result { FILE: candle-core/src/metal_backend/device.rs type DeviceId (line 22) | pub struct DeviceId(usize); method new (line 25) | pub(crate) fn new() -> Self { type MetalDevice (line 34) | pub struct MetalDevice { method fmt (line 81) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type Target (line 87) | type Target = Device; method deref (line 89) | fn deref(&self) -> &Self::Target { method compile (line 96) | pub fn compile( method id (line 118) | pub fn id(&self) -> DeviceId { method metal_device (line 122) | pub fn metal_device(&self) -> &Device { method drop_unused_buffers (line 126) | fn drop_unused_buffers(&self) -> Result<()> { method command_encoder (line 139) | pub fn command_encoder(&self) -> Result { method blit_command_encoder (line 148) | pub fn blit_command_encoder(&self) -> Result { method wait_until_completed (line 157) | pub fn wait_until_completed(&self) -> Result<()> { method kernels (line 163) | pub fn kernels(&self) -> &Kernels { method device (line 167) | pub fn device(&self) -> &Device { method new_buffer (line 172) | pub fn new_buffer( method new_private_buffer (line 185) | pub fn new_private_buffer( method new_buffer_with_data (line 203) | pub fn new_buffer_with_data(&self, data: &[T]) -> Result Result Result> { method capture (line 247) | pub fn capture>(&self, path: P) -> Result<()> { constant RESOURCE_OPTIONS (line 69) | pub const RESOURCE_OPTIONS: MTLResourceOptions = constant PRIVATE_RESOURCE_OPTIONS (line 76) | pub const PRIVATE_RESOURCE_OPTIONS: MTLResourceOptions = MTLResourceOpti... constant PRIVATE_RESOURCE_OPTIONS (line 78) | pub const PRIVATE_RESOURCE_OPTIONS: MTLResourceOptions = MTLResourceOpti... function buf_size (line 269) | fn buf_size(size: usize) -> usize { function find_available_buffer (line 273) | fn find_available_buffer(size: usize, buffers: &BufferMap) -> Option(buffer: &'a Buffer, l: &Layout, dtype: DType) -> Buf... type LockError (line 28) | pub enum LockError { type MetalError (line 52) | pub enum MetalError { method from (line 36) | fn from(value: TryLockError) -> Self { method from (line 45) | fn from(p: PoisonError) -> Self { method from (line 68) | fn from(e: String) -> Self { type MetalStorage (line 74) | pub struct MetalStorage { method new (line 1827) | pub fn new(buffer: Arc, device: MetalDevice, count: usize, dty... method buffer (line 1836) | pub fn buffer(&self) -> &Buffer { method binary (line 1840) | pub fn binary( method to_cpu (line 1910) | pub(crate) fn to_cpu(&self) -> Result> { type Device (line 86) | type Device = MetalDevice; method try_clone (line 88) | fn try_clone(&self, _: &Layout) -> Result { method dtype (line 92) | fn dtype(&self) -> DType { method device (line 96) | fn device(&self) -> &Self::Device { method to_cpu_storage (line 100) | fn to_cpu_storage(&self) -> Result { method affine (line 118) | fn affine(&self, layout: &Layout, mul: f64, add: f64) -> Result { method powf (line 179) | fn powf(&self, layout: &Layout, pow: f64) -> Result { method elu (line 232) | fn elu(&self, layout: &Layout, alpha: f64) -> Result { method reduce_op (line 285) | fn reduce_op(&self, op: ReduceOp, layout: &Layout, sum_dims: &[usize]) -... method cmp (line 425) | fn cmp(&self, op: CmpOp, rhs: &Self, lhs_l: &Layout, rhs_l: &Layout) -> ... method const_set (line 437) | fn const_set(&mut self, s: crate::scalar::Scalar, l: &Layout) -> Result<... method to_dtype (line 529) | fn to_dtype(&self, layout: &Layout, dtype: DType) -> Result { method unary_impl (line 647) | fn unary_impl(&self, layout: &Layout) -> Result { method binary_impl (line 812) | fn binary_impl( method where_cond (line 821) | fn where_cond( method conv1d (line 879) | fn conv1d( method conv_transpose1d (line 956) | fn conv_transpose1d( method conv2d (line 1071) | fn conv2d( method conv_transpose2d (line 1155) | fn conv_transpose2d( method avg_pool2d (line 1220) | fn avg_pool2d( method max_pool2d (line 1263) | fn max_pool2d( method upsample_nearest1d (line 1306) | fn upsample_nearest1d(&self, _: &Layout, _: usize) -> Result { method upsample_nearest2d (line 1310) | fn upsample_nearest2d(&self, inp_l: &Layout, out_w: usize, out_h: usize)... method upsample_bilinear2d (line 1350) | fn upsample_bilinear2d( method gather (line 1405) | fn gather(&self, src_l: &Layout, ids: &Self, ids_l: &Layout, dim: usize)... method scatter_set (line 1453) | fn scatter_set( method scatter_add_set (line 1503) | fn scatter_add_set( method index_select (line 1553) | fn index_select(&self, ids: &Self, src_l: &Layout, ids_l: &Layout, dim: ... method index_add (line 1612) | fn index_add( method matmul (line 1675) | fn matmul( method copy2d (line 1719) | fn copy2d( method copy_strided_src (line 1779) | fn copy_strided_src(&self, dst: &mut Self, dst_offset: usize, src_l: &La... type Storage (line 1925) | type Storage = MetalStorage; method new (line 1927) | fn new(ordinal: usize) -> Result { method location (line 1952) | fn location(&self) -> crate::DeviceLocation { method same_device (line 1958) | fn same_device(&self, rhs: &Self) -> bool { method alloc_uninit (line 1962) | unsafe fn alloc_uninit(&self, shape: &Shape, dtype: DType) -> Result Result { method storage_from_slice (line 1983) | fn storage_from_slice(&self, s: &[T]) -> Result Result Result<... method rand_uniform (line 2036) | fn rand_uniform( method rand_normal (line 2073) | fn rand_normal( method set_seed (line 2110) | fn set_seed(&self, seed: u64) -> Result<()> { method get_current_seed (line 2123) | fn get_current_seed(&self) -> Result { method synchronize (line 2127) | fn synchronize(&self) -> Result<()> { function read_to_vec (line 2132) | fn read_to_vec(buffer: &Buffer, n: usize) -> Vec { FILE: candle-core/src/mkl.rs function vsTanh (line 7) | pub fn vsTanh(n: c_int, a: *const c_float, y: *mut c_float); function vdTanh (line 8) | pub fn vdTanh(n: c_int, a: *const c_double, y: *mut c_double); function vsExp (line 9) | pub fn vsExp(n: c_int, a: *const c_float, y: *mut c_float); function vdExp (line 10) | pub fn vdExp(n: c_int, a: *const c_double, y: *mut c_double); function vsLn (line 11) | pub fn vsLn(n: c_int, a: *const c_float, y: *mut c_float); function vdLn (line 12) | pub fn vdLn(n: c_int, a: *const c_double, y: *mut c_double); function vsSin (line 13) | pub fn vsSin(n: c_int, a: *const c_float, y: *mut c_float); function vdSin (line 14) | pub fn vdSin(n: c_int, a: *const c_double, y: *mut c_double); function vsCos (line 15) | pub fn vsCos(n: c_int, a: *const c_float, y: *mut c_float); function vdCos (line 16) | pub fn vdCos(n: c_int, a: *const c_double, y: *mut c_double); function vsSqrt (line 17) | pub fn vsSqrt(n: c_int, a: *const c_float, y: *mut c_float); function vdSqrt (line 18) | pub fn vdSqrt(n: c_int, a: *const c_double, y: *mut c_double); function vsAdd (line 20) | pub fn vsAdd(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_f... function vdAdd (line 21) | pub fn vdAdd(n: c_int, a: *const c_double, b: *const c_double, y: *mut c... function vsSub (line 22) | pub fn vsSub(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_f... function vdSub (line 23) | pub fn vdSub(n: c_int, a: *const c_double, b: *const c_double, y: *mut c... function vsMul (line 24) | pub fn vsMul(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_f... function vdMul (line 25) | pub fn vdMul(n: c_int, a: *const c_double, b: *const c_double, y: *mut c... function vsDiv (line 26) | pub fn vsDiv(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_f... function vdDiv (line 27) | pub fn vdDiv(n: c_int, a: *const c_double, b: *const c_double, y: *mut c... function vsFmax (line 28) | pub fn vsFmax(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_... function vdFmax (line 29) | pub fn vdFmax(n: c_int, a: *const c_double, b: *const c_double, y: *mut ... function vsFmin (line 30) | pub fn vsFmin(n: c_int, a: *const c_float, b: *const c_float, y: *mut c_... function vdFmin (line 31) | pub fn vdFmin(n: c_int, a: *const c_double, b: *const c_double, y: *mut ... function sgemm_ (line 33) | pub fn sgemm_( function dgemm_ (line 48) | pub fn dgemm_( function hgemm_ (line 63) | pub fn hgemm_( function sgemm (line 83) | pub unsafe fn sgemm( function dgemm (line 117) | pub unsafe fn dgemm( function hgemm (line 151) | pub unsafe fn hgemm( function vs_exp (line 184) | pub fn vs_exp(a: &[f32], y: &mut [f32]) { function vd_exp (line 194) | pub fn vd_exp(a: &[f64], y: &mut [f64]) { function vs_ln (line 204) | pub fn vs_ln(a: &[f32], y: &mut [f32]) { function vd_ln (line 214) | pub fn vd_ln(a: &[f64], y: &mut [f64]) { function vs_sin (line 224) | pub fn vs_sin(a: &[f32], y: &mut [f32]) { function vd_sin (line 234) | pub fn vd_sin(a: &[f64], y: &mut [f64]) { function vs_cos (line 244) | pub fn vs_cos(a: &[f32], y: &mut [f32]) { function vd_cos (line 254) | pub fn vd_cos(a: &[f64], y: &mut [f64]) { function vs_sqrt (line 264) | pub fn vs_sqrt(a: &[f32], y: &mut [f32]) { function vd_sqrt (line 274) | pub fn vd_sqrt(a: &[f64], y: &mut [f64]) { function vs_sqr (line 284) | pub fn vs_sqr(a: &[f32], y: &mut [f32]) { function vd_sqr (line 294) | pub fn vd_sqr(a: &[f64], y: &mut [f64]) { function vs_tanh (line 304) | pub fn vs_tanh(a: &[f32], y: &mut [f32]) { function vd_tanh (line 314) | pub fn vd_tanh(a: &[f64], y: &mut [f64]) { function vs_tanh_inplace (line 327) | pub fn vs_tanh_inplace(y: &mut [f32]) { function vd_tanh_inplace (line 332) | pub fn vd_tanh_inplace(y: &mut [f64]) { function vs_exp_inplace (line 337) | pub fn vs_exp_inplace(y: &mut [f32]) { function vd_exp_inplace (line 342) | pub fn vd_exp_inplace(y: &mut [f64]) { function vs_gelu (line 347) | pub fn vs_gelu(vs: &[f32], ys: &mut [f32]) { function vd_gelu (line 358) | pub fn vd_gelu(vs: &[f64], ys: &mut [f64]) { function vs_silu (line 369) | pub fn vs_silu(vs: &[f32], ys: &mut [f32]) { function vd_silu (line 380) | pub fn vd_silu(vs: &[f64], ys: &mut [f64]) { FILE: candle-core/src/npy.rs constant NPY_MAGIC_STRING (line 36) | const NPY_MAGIC_STRING: &[u8] = b"\x93NUMPY"; constant NPY_SUFFIX (line 37) | const NPY_SUFFIX: &str = ".npy"; function read_header (line 39) | fn read_header(reader: &mut R) -> Result { type Header (line 64) | struct Header { method shape (line 71) | fn shape(&self) -> Shape { method to_string (line 75) | fn to_string(&self) -> Result { method parse (line 109) | fn parse(header: &str) -> Result
{ method from_reader (line 207) | pub(crate) fn from_reader( method read_npy (line 273) | pub fn read_npy>(path: T) -> Result { method read_npz (line 284) | pub fn read_npz>(path: T) -> Result> { method read_npz_by_name (line 306) | pub fn read_npz_by_name>(path: T, names: &[&str]) -> Resu... method write (line 329) | fn write(&self, f: &mut T) -> Result<()> { method write_npy (line 349) | pub fn write_npy>(&self, path: T) -> Result<()> { method write_npz (line 355) | pub fn write_npz, T: AsRef, P: AsRef>( type NpzTensors (line 372) | pub struct NpzTensors { method new (line 380) | pub fn new>(path: T) -> Result { method names (line 399) | pub fn names(&self) -> Vec<&String> { method get_shape_and_dtype (line 405) | pub fn get_shape_and_dtype(&self, name: &str) -> Result<(Shape, DType)> { method get (line 418) | pub fn get(&self, name: &str) -> Result> { function parse (line 442) | fn parse() { FILE: candle-core/src/op.rs type CmpOp (line 10) | pub enum CmpOp { type ReduceOp (line 20) | pub enum ReduceOp { method name (line 29) | pub(crate) fn name(&self) -> &'static str { type BinaryOp (line 42) | pub enum BinaryOp { type UnaryOp (line 53) | pub enum UnaryOp { type Op (line 76) | pub enum Op { type UnaryOpT (line 192) | pub trait UnaryOpT { constant NAME (line 193) | const NAME: &'static str; constant KERNEL (line 194) | const KERNEL: &'static str; constant V (line 195) | const V: Self; method bf16 (line 196) | fn bf16(v1: bf16) -> bf16; method f16 (line 197) | fn f16(v1: f16) -> f16; method f32 (line 198) | fn f32(v1: f32) -> f32; method f64 (line 199) | fn f64(v1: f64) -> f64; method u8 (line 200) | fn u8(v1: u8) -> u8; method u32 (line 201) | fn u32(v1: u32) -> u32; method i16 (line 202) | fn i16(v1: i16) -> i16; method i32 (line 203) | fn i32(v1: i32) -> i32; method i64 (line 204) | fn i64(v1: i64) -> i64; method f8e4m3 (line 205) | fn f8e4m3(v1: f8e4m3) -> f8e4m3; constant BF16_VEC (line 209) | const BF16_VEC: bool = false; method bf16_vec (line 210) | fn bf16_vec(_xs: &[bf16], _ys: &mut [bf16]) {} constant F16_VEC (line 211) | const F16_VEC: bool = false; method f16_vec (line 212) | fn f16_vec(_xs: &[f16], _ys: &mut [f16]) {} constant F32_VEC (line 213) | const F32_VEC: bool = false; method f32_vec (line 214) | fn f32_vec(_xs: &[f32], _ys: &mut [f32]) {} constant F64_VEC (line 215) | const F64_VEC: bool = false; method f64_vec (line 216) | fn f64_vec(_xs: &[f64], _ys: &mut [f64]) {} constant NAME (line 525) | const NAME: &'static str = "gelu"; constant V (line 526) | const V: Self = Gelu; method bf16 (line 528) | fn bf16(v: bf16) -> bf16 { method f16 (line 539) | fn f16(v: f16) -> f16 { method f32 (line 550) | fn f32(v: f32) -> f32 { method f64 (line 554) | fn f64(v: f64) -> f64 { method u8 (line 558) | fn u8(_: u8) -> u8 { method u32 (line 562) | fn u32(_: u32) -> u32 { method i16 (line 566) | fn i16(_: i16) -> i16 { method i32 (line 570) | fn i32(_: i32) -> i32 { method i64 (line 574) | fn i64(_: i64) -> i64 { method f8e4m3 (line 578) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant KERNEL (line 588) | const KERNEL: &'static str = "ugelu"; constant F32_VEC (line 591) | const F32_VEC: bool = true; method f32_vec (line 595) | fn f32_vec(xs: &[f32], ys: &mut [f32]) { constant F64_VEC (line 600) | const F64_VEC: bool = true; method f64_vec (line 604) | fn f64_vec(xs: &[f64], ys: &mut [f64]) { constant F32_VEC (line 609) | const F32_VEC: bool = true; method f32_vec (line 613) | fn f32_vec(xs: &[f32], ys: &mut [f32]) { constant F64_VEC (line 618) | const F64_VEC: bool = true; method f64_vec (line 622) | fn f64_vec(xs: &[f64], ys: &mut [f64]) { constant NAME (line 630) | const NAME: &'static str = "erf"; constant KERNEL (line 631) | const KERNEL: &'static str = "uerf"; constant V (line 632) | const V: Self = Erf; method bf16 (line 634) | fn bf16(v: bf16) -> bf16 { method f16 (line 638) | fn f16(v: f16) -> f16 { method f32 (line 642) | fn f32(v: f32) -> f32 { method f64 (line 646) | fn f64(v: f64) -> f64 { method u8 (line 650) | fn u8(_: u8) -> u8 { method u32 (line 654) | fn u32(_: u32) -> u32 { method i16 (line 658) | fn i16(_: i16) -> i16 { method i32 (line 662) | fn i32(_: i32) -> i32 { method i64 (line 666) | fn i64(_: i64) -> i64 { method f8e4m3 (line 670) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 677) | const NAME: &'static str = "silu"; constant V (line 678) | const V: Self = Silu; method bf16 (line 680) | fn bf16(v: bf16) -> bf16 { method f16 (line 684) | fn f16(v: f16) -> f16 { method f32 (line 688) | fn f32(v: f32) -> f32 { method f64 (line 692) | fn f64(v: f64) -> f64 { method u8 (line 696) | fn u8(_: u8) -> u8 { method u32 (line 700) | fn u32(_: u32) -> u32 { method i16 (line 704) | fn i16(_: i16) -> i16 { method i32 (line 708) | fn i32(_: i32) -> i32 { method i64 (line 712) | fn i64(_: i64) -> i64 { method f8e4m3 (line 716) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant KERNEL (line 719) | const KERNEL: &'static str = "usilu"; constant F32_VEC (line 722) | const F32_VEC: bool = true; method f32_vec (line 726) | fn f32_vec(xs: &[f32], ys: &mut [f32]) { constant F64_VEC (line 731) | const F64_VEC: bool = true; method f64_vec (line 735) | fn f64_vec(xs: &[f64], ys: &mut [f64]) { constant F32_VEC (line 740) | const F32_VEC: bool = true; method f32_vec (line 744) | fn f32_vec(xs: &[f32], ys: &mut [f32]) { constant F64_VEC (line 749) | const F64_VEC: bool = true; method f64_vec (line 753) | fn f64_vec(xs: &[f64], ys: &mut [f64]) { constant NAME (line 759) | const NAME: &'static str = "abs"; constant KERNEL (line 760) | const KERNEL: &'static str = "uabs"; constant V (line 761) | const V: Self = Abs; method bf16 (line 763) | fn bf16(v: bf16) -> bf16 { method f16 (line 767) | fn f16(v: f16) -> f16 { method f32 (line 771) | fn f32(v: f32) -> f32 { method f64 (line 775) | fn f64(v: f64) -> f64 { method u8 (line 779) | fn u8(v: u8) -> u8 { method u32 (line 783) | fn u32(v: u32) -> u32 { method i16 (line 787) | fn i16(v: i16) -> i16 { method i32 (line 791) | fn i32(v: i32) -> i32 { method i64 (line 795) | fn i64(v: i64) -> i64 { method f8e4m3 (line 799) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 805) | const NAME: &'static str = "ceil"; constant KERNEL (line 806) | const KERNEL: &'static str = "uceil"; constant V (line 807) | const V: Self = Ceil; method bf16 (line 809) | fn bf16(v: bf16) -> bf16 { method f16 (line 813) | fn f16(v: f16) -> f16 { method f32 (line 817) | fn f32(v: f32) -> f32 { method f64 (line 821) | fn f64(v: f64) -> f64 { method u8 (line 825) | fn u8(v: u8) -> u8 { method u32 (line 829) | fn u32(v: u32) -> u32 { method i16 (line 833) | fn i16(v: i16) -> i16 { method i32 (line 837) | fn i32(v: i32) -> i32 { method i64 (line 841) | fn i64(v: i64) -> i64 { method f8e4m3 (line 845) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 851) | const NAME: &'static str = "floor"; constant KERNEL (line 852) | const KERNEL: &'static str = "ufloor"; constant V (line 853) | const V: Self = Floor; method bf16 (line 855) | fn bf16(v: bf16) -> bf16 { method f16 (line 859) | fn f16(v: f16) -> f16 { method f32 (line 863) | fn f32(v: f32) -> f32 { method f64 (line 867) | fn f64(v: f64) -> f64 { method u8 (line 871) | fn u8(v: u8) -> u8 { method u32 (line 875) | fn u32(v: u32) -> u32 { method i16 (line 879) | fn i16(v: i16) -> i16 { method i32 (line 883) | fn i32(v: i32) -> i32 { method i64 (line 887) | fn i64(v: i64) -> i64 { method f8e4m3 (line 891) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 897) | const NAME: &'static str = "round"; constant KERNEL (line 898) | const KERNEL: &'static str = "uround"; constant V (line 899) | const V: Self = Round; method bf16 (line 901) | fn bf16(v: bf16) -> bf16 { method f16 (line 905) | fn f16(v: f16) -> f16 { method f32 (line 909) | fn f32(v: f32) -> f32 { method f64 (line 913) | fn f64(v: f64) -> f64 { method u8 (line 917) | fn u8(v: u8) -> u8 { method u32 (line 921) | fn u32(v: u32) -> u32 { method i16 (line 925) | fn i16(v: i16) -> i16 { method i32 (line 929) | fn i32(v: i32) -> i32 { method i64 (line 933) | fn i64(v: i64) -> i64 { method f8e4m3 (line 937) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 943) | const NAME: &'static str = "gelu_erf"; constant KERNEL (line 944) | const KERNEL: &'static str = "ugelu_erf"; constant V (line 945) | const V: Self = GeluErf; method bf16 (line 947) | fn bf16(v: bf16) -> bf16 { method f16 (line 951) | fn f16(v: f16) -> f16 { method f32 (line 955) | fn f32(v: f32) -> f32 { method f64 (line 959) | fn f64(v: f64) -> f64 { method u8 (line 963) | fn u8(_: u8) -> u8 { method u32 (line 967) | fn u32(_: u32) -> u32 { method i16 (line 971) | fn i16(_: i16) -> i16 { method i32 (line 975) | fn i32(_: i32) -> i32 { method i64 (line 979) | fn i64(_: i64) -> i64 { method f8e4m3 (line 983) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 989) | const NAME: &'static str = "relu"; constant KERNEL (line 990) | const KERNEL: &'static str = "urelu"; constant V (line 991) | const V: Self = Relu; method bf16 (line 993) | fn bf16(v: bf16) -> bf16 { method f16 (line 997) | fn f16(v: f16) -> f16 { method f32 (line 1001) | fn f32(v: f32) -> f32 { method f64 (line 1005) | fn f64(v: f64) -> f64 { method u8 (line 1009) | fn u8(v: u8) -> u8 { method u32 (line 1013) | fn u32(v: u32) -> u32 { method i16 (line 1017) | fn i16(v: i16) -> i16 { method i32 (line 1021) | fn i32(v: i32) -> i32 { method i64 (line 1025) | fn i64(v: i64) -> i64 { method f8e4m3 (line 1029) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { constant NAME (line 1099) | const NAME: &'static str = "sign"; constant KERNEL (line 1100) | const KERNEL: &'static str = "usign"; constant V (line 1101) | const V: Self = Sign; method bf16 (line 1103) | fn bf16(v: bf16) -> bf16 { method f16 (line 1107) | fn f16(v: f16) -> f16 { method f32 (line 1111) | fn f32(v: f32) -> f32 { method f64 (line 1115) | fn f64(v: f64) -> f64 { method u8 (line 1119) | fn u8(v: u8) -> u8 { method u32 (line 1123) | fn u32(v: u32) -> u32 { method i16 (line 1127) | fn i16(v: i16) -> i16 { method i32 (line 1131) | fn i32(v: i32) -> i32 { method i64 (line 1135) | fn i64(v: i64) -> i64 { method f8e4m3 (line 1139) | fn f8e4m3(v: f8e4m3) -> f8e4m3 { type BinaryOpT (line 219) | pub trait BinaryOpT { constant NAME (line 220) | const NAME: &'static str; constant KERNEL (line 221) | const KERNEL: &'static str; constant V (line 222) | const V: Self; method bf16 (line 223) | fn bf16(v1: bf16, v2: bf16) -> bf16; method f16 (line 224) | fn f16(v1: f16, v2: f16) -> f16; method f32 (line 225) | fn f32(v1: f32, v2: f32) -> f32; method f64 (line 226) | fn f64(v1: f64, v2: f64) -> f64; method u8 (line 227) | fn u8(v1: u8, v2: u8) -> u8; method u32 (line 228) | fn u32(v1: u32, v2: u32) -> u32; method i16 (line 229) | fn i16(v1: i16, v2: i16) -> i16; method i32 (line 230) | fn i32(v1: i32, v2: i32) -> i32; method i64 (line 231) | fn i64(v1: i64, v2: i64) -> i64; method f8e4m3 (line 232) | fn f8e4m3(v1: f8e4m3, v2: f8e4m3) -> f8e4m3; constant BF16_VEC (line 234) | const BF16_VEC: bool = false; method bf16_vec (line 235) | fn bf16_vec(_xs1: &[bf16], _xs2: &[bf16], _ys: &mut [bf16]) {} constant F16_VEC (line 236) | const F16_VEC: bool = false; method f16_vec (line 237) | fn f16_vec(_xs1: &[f16], _xs2: &[f16], _ys: &mut [f16]) {} constant F32_VEC (line 238) | const F32_VEC: bool = false; method f32_vec (line 239) | fn f32_vec(_xs1: &[f32], _xs2: &[f32], _ys: &mut [f32]) {} constant F64_VEC (line 240) | const F64_VEC: bool = false; method f64_vec (line 241) | fn f64_vec(_xs1: &[f64], _xs2: &[f64], _ys: &mut [f64]) {} constant U8_VEC (line 242) | const U8_VEC: bool = false; method u8_vec (line 243) | fn u8_vec(_xs1: &[u8], _xs2: &[u8], _ys: &mut [u8]) {} constant U32_VEC (line 244) | const U32_VEC: bool = false; method u32_vec (line 245) | fn u32_vec(_xs1: &[u32], _xs2: &[u32], _ys: &mut [u32]) {} constant I64_VEC (line 246) | const I64_VEC: bool = false; method i64_vec (line 247) | fn i64_vec(_xs1: &[i64], _xs2: &[i64], _ys: &mut [i64]) {} type Add (line 250) | pub struct Add; type Div (line 251) | pub struct Div; type Mul (line 252) | pub struct Mul; type Sub (line 253) | pub struct Sub; type Maximum (line 254) | pub struct Maximum; type Minimum (line 255) | pub struct Minimum; type Exp (line 256) | pub struct Exp; type Log (line 257) | pub struct Log; type Sin (line 258) | pub struct Sin; type Cos (line 259) | pub struct Cos; type Abs (line 260) | pub struct Abs; type Neg (line 261) | pub struct Neg; type Recip (line 262) | pub struct Recip; type Sqr (line 263) | pub struct Sqr; type Sqrt (line 264) | pub struct Sqrt; type Gelu (line 265) | pub struct Gelu; type GeluErf (line 266) | pub struct GeluErf; type Erf (line 267) | pub struct Erf; type Relu (line 268) | pub struct Relu; type Silu (line 269) | pub struct Silu; type Tanh (line 270) | pub struct Tanh; type Floor (line 271) | pub struct Floor; type Ceil (line 272) | pub struct Ceil; type Round (line 273) | pub struct Round; type Sign (line 274) | pub struct Sign; constant SQRT_TWO_OVER_PI_F32 (line 517) | const SQRT_TWO_OVER_PI_F32: f32 = 0.79788456080286535587989211986876373; constant SQRT_TWO_OVER_PI_F64 (line 519) | const SQRT_TWO_OVER_PI_F64: f64 = 0.79788456080286535587989211986876373; type BackpropOp (line 1037) | pub struct BackpropOp(Option); method none (line 1040) | pub fn none() -> Self { method new1 (line 1044) | pub(crate) fn new1(arg: &Tensor, f: impl Fn(Tensor) -> Op) -> Self { method new2 (line 1053) | pub(crate) fn new2(arg1: &Tensor, arg2: &Tensor, f: impl Fn(Tensor, Te... method new3 (line 1062) | pub(crate) fn new3( method new (line 1076) | pub(crate) fn new>(args: &[A], f: impl Fn(Vec... method is_none (line 1086) | pub(crate) fn is_none(&self) -> bool { type Target (line 1092) | type Target = Option; method deref (line 1093) | fn deref(&self) -> &Self::Target { FILE: candle-core/src/pickle.rs constant VERBOSE (line 9) | const VERBOSE: bool = false; type OpCode (line 14) | pub enum OpCode { type Error (line 53) | type Error = u8; method try_from (line 54) | fn try_from(value: u8) -> std::result::Result { function read_to_newline (line 94) | fn read_to_newline(r: &mut R) -> Result> { type Object (line 105) | pub enum Object { method unicode (line 134) | pub fn unicode(self) -> OResult { method reduce (line 141) | pub fn reduce(self) -> OResult<(Self, Self)> { method none (line 148) | pub fn none(self) -> OResult<()> { method persistent_load (line 155) | pub fn persistent_load(self) -> OResult { method bool (line 162) | pub fn bool(self) -> OResult { method int (line 169) | pub fn int(self) -> OResult { method int_or_long (line 176) | pub fn int_or_long(self) -> OResult { method tuple (line 184) | pub fn tuple(self) -> OResult> { method dict (line 191) | pub fn dict(self) -> OResult> { method class (line 198) | pub fn class(self) -> OResult<(String, String)> { method into_tensor_info (line 208) | pub fn into_tensor_info( type OResult (line 131) | type OResult = std::result::Result; type Error (line 259) | type Error = Object; method try_from (line 260) | fn try_from(value: Object) -> std::result::Result { type Error (line 269) | type Error = Object; function try_from (line 270) | fn try_from(value: Object) -> std::result::Result { type Error (line 279) | type Error = Object; function try_from (line 280) | fn try_from(value: Object) -> std::result::Result { type Stack (line 296) | pub struct Stack { method empty (line 302) | pub fn empty() -> Self { method stack (line 309) | pub fn stack(&self) -> &[Object] { method read_loop (line 313) | pub fn read_loop(&mut self, r: &mut R) -> Result<()> { method finalize (line 322) | pub fn finalize(mut self) -> Result { method push (line 326) | fn push(&mut self, obj: Object) { method pop (line 330) | fn pop(&mut self) -> Result { method build (line 338) | fn build(&mut self) -> Result<()> { method reduce (line 355) | fn reduce(&mut self) -> Result<()> { method last (line 383) | fn last(&mut self) -> Result<&mut Object> { method memo_get (line 390) | fn memo_get(&self, id: u32) -> Result { method memo_put (line 400) | fn memo_put(&mut self, id: u32) -> Result<()> { method persistent_load (line 406) | fn persistent_load(&self, id: Object) -> Result { method new_obj (line 410) | fn new_obj(&self, class: Object, args: Object) -> Result { method pop_to_marker (line 417) | fn pop_to_marker(&mut self) -> Result> { method read (line 437) | pub fn read(&mut self, r: &mut R) -> Result { method from (line 619) | fn from(value: Object) -> Self { function rebuild_args (line 626) | fn rebuild_args(args: Object) -> Result<(Layout, DType, String, usize)> { type TensorInfo (line 656) | pub struct TensorInfo { function read_pth_tensor_info (line 670) | pub fn read_pth_tensor_info>( type PthTensors (line 743) | pub struct PthTensors { method new (line 751) | pub fn new>(path: P, key: Option<&str>) -> R... method tensor_infos (line 761) | pub fn tensor_infos(&self) -> &HashMap { method get (line 765) | pub fn get(&self, name: &str) -> Result> { function read_all_with_key (line 820) | pub fn read_all_with_key>( function read_all (line 839) | pub fn read_all>(path: P) -> Result __m256 { function mul_sum_us8_pairs_float (line 20) | pub(crate) unsafe fn mul_sum_us8_pairs_float(ax: __m256i, sy: __m256i) -... function hsum_float_8 (line 26) | pub(crate) unsafe fn hsum_float_8(x: __m256) -> f32 { function bytes_from_nibbles_32 (line 35) | pub(crate) unsafe fn bytes_from_nibbles_32(rsi: *const u8) -> __m256i { function mul_sum_i8_pairs_float (line 43) | pub(crate) unsafe fn mul_sum_i8_pairs_float(x: __m256i, y: __m256i) -> _... function vec_dot_q4_0_q8_0 (line 50) | pub(crate) fn vec_dot_q4_0_q8_0(n: usize, xs: &[BlockQ4_0], ys: &[BlockQ... function vec_dot_q8_0_q8_0 (line 71) | pub(crate) fn vec_dot_q8_0_q8_0(n: usize, xs: &[BlockQ8_0], ys: &[BlockQ... function get_scale_shuffle (line 90) | unsafe fn get_scale_shuffle(i: usize) -> __m128i { function get_scale_shuffle_k4 (line 102) | unsafe fn get_scale_shuffle_k4(i: usize) -> __m256i { function get_scale_shuffle_q3k (line 119) | unsafe fn get_scale_shuffle_q3k(i: usize) -> __m256i { function vec_dot_q6k_q8k (line 131) | pub(crate) fn vec_dot_q6k_q8k(n: usize, xs: &[BlockQ6K], ys: &[BlockQ8K]... function mm256_set_m128i (line 219) | unsafe fn mm256_set_m128i(a: __m128i, b: __m128i) -> __m256i { function vec_dot_q2k_q8k (line 224) | pub(crate) fn vec_dot_q2k_q8k(n: usize, xs: &[BlockQ2K], ys: &[BlockQ8K]... function vec_dot_q3k_q8k (line 307) | pub(crate) fn vec_dot_q3k_q8k(n: usize, xs: &[BlockQ3K], ys: &[BlockQ8K]... function vec_dot_q4k_q8k (line 443) | pub(crate) fn vec_dot_q4k_q8k(n: usize, xs: &[BlockQ4K], ys: &[BlockQ8K]... function vec_dot_q5k_q8k (line 528) | pub(crate) fn vec_dot_q5k_q8k(n: usize, xs: &[BlockQ5K], ys: &[BlockQ8K]... function vec_dot_q8k_q8k (line 641) | pub(crate) fn vec_dot_q8k_q8k(n: usize, xs: &[BlockQ8K], ys: &[BlockQ8K]... FILE: candle-core/src/quantized/cuda.rs type PaddedCudaSlice (line 10) | struct PaddedCudaSlice { type QCudaStorage (line 16) | pub struct QCudaStorage { method indexed_moe_forward (line 492) | pub fn indexed_moe_forward( method zeros (line 529) | pub fn zeros(device: &CudaDevice, el_count: usize, dtype: GgmlDType) -... method dtype (line 544) | pub fn dtype(&self) -> GgmlDType { method device (line 548) | pub fn device(&self) -> &CudaDevice { method dequantize (line 552) | pub fn dequantize(&self, elem_count: usize) -> Result { method dequantize_f16 (line 605) | pub fn dequantize_f16(&self, elem_count: usize) -> Result { method quantize (line 609) | pub fn quantize(&mut self, src: &CudaStorage) -> Result<()> { method quantize_imatrix (line 632) | pub fn quantize_imatrix( method quantize_imatrix_onto (line 660) | pub fn quantize_imatrix_onto( method quantize_onto (line 689) | pub fn quantize_onto(&mut self, src: &crate::CpuStorage) -> Result<()> { method storage_size_in_bytes (line 713) | pub fn storage_size_in_bytes(&self) -> usize { method fwd (line 717) | pub fn fwd( method data (line 740) | pub fn data(&self) -> Result> { method device_ptr (line 747) | pub fn device_ptr(&self) -> Result<*const u8> { method dequantize_matmul_vec (line 754) | fn dequantize_matmul_vec( method dequantize_matmul (line 794) | fn dequantize_matmul( function set_force_dmmv (line 24) | pub fn set_force_dmmv(f: bool) { constant WARP_SIZE (line 28) | pub const WARP_SIZE: usize = 32; constant MMQ_X_Q4_0_AMPERE (line 29) | pub const MMQ_X_Q4_0_AMPERE: usize = 4; constant MMQ_Y_Q4_0_AMPERE (line 30) | pub const MMQ_Y_Q4_0_AMPERE: usize = 32; constant NWARPS_Q4_0_AMPERE (line 31) | pub const NWARPS_Q4_0_AMPERE: usize = 4; constant GGML_CUDA_MMV_X (line 32) | pub const GGML_CUDA_MMV_X: usize = 32; constant GGML_CUDA_MMV_Y (line 33) | pub const GGML_CUDA_MMV_Y: usize = 1; constant CUDA_QUANTIZE_BLOCK_SIZE (line 34) | pub const CUDA_QUANTIZE_BLOCK_SIZE: usize = 256; constant CUDA_DEQUANTIZE_BLOCK_SIZE (line 35) | pub const CUDA_DEQUANTIZE_BLOCK_SIZE: usize = 256; constant MATRIX_ROW_PADDING (line 36) | pub const MATRIX_ROW_PADDING: usize = 512; function ceil_div (line 38) | fn ceil_div(p: usize, q: usize) -> usize { function pad (line 42) | fn pad(p: usize, q: usize) -> usize { function quantize_q8_1 (line 46) | fn quantize_q8_1( function dequantize_f32 (line 103) | fn dequantize_f32( function dequantize_f16 (line 163) | fn dequantize_f16( function dequantize_mul_mat_vec (line 223) | fn dequantize_mul_mat_vec( function mul_mat_vec_via_q8_1 (line 269) | fn mul_mat_vec_via_q8_1( function mul_mat_via_q8_1 (line 340) | fn mul_mat_via_q8_1( function indexed_moe_forward_fused_q8_1_input (line 410) | fn indexed_moe_forward_fused_q8_1_input( function load_quantized (line 842) | pub fn load_quantized( function cuda_quantize_q8_1 (line 868) | fn cuda_quantize_q8_1() -> Result<()> { function cuda_mmv_q8_1 (line 882) | fn cuda_mmv_q8_1() -> Result<()> { function cuda_mm_q8_1 (line 921) | fn cuda_mm_q8_1() -> Result<()> { function cuda_mm_q8_1_pad (line 962) | fn cuda_mm_q8_1_pad() -> Result<()> { FILE: candle-core/src/quantized/dummy_cuda.rs type QCudaStorage (line 5) | pub struct QCudaStorage { method zeros (line 11) | pub fn zeros(_: &CudaDevice, _: usize, _: GgmlDType) -> Result { method dtype (line 15) | pub fn dtype(&self) -> GgmlDType { method device (line 19) | pub fn device(&self) -> &CudaDevice { method dequantize (line 23) | pub fn dequantize(&self, _elem_count: usize) -> Result { method dequantize_f16 (line 27) | pub fn dequantize_f16(&self, _elem_count: usize) -> Result { method quantize (line 31) | pub fn quantize(&mut self, _src: &CudaStorage) -> Result<()> { method quantize_imatrix (line 35) | pub fn quantize_imatrix( method quantize_imatrix_onto (line 44) | pub fn quantize_imatrix_onto( method quantize_onto (line 53) | pub fn quantize_onto(&mut self, _src: &crate::CpuStorage) -> Result<()> { method device_ptr (line 57) | pub fn device_ptr(&self) -> Result<*const u8> { method storage_size_in_bytes (line 61) | pub fn storage_size_in_bytes(&self) -> usize { method fwd (line 65) | pub fn fwd( method data (line 74) | pub fn data(&self) -> Result> { method indexed_moe_forward (line 78) | pub fn indexed_moe_forward( function load_quantized (line 90) | pub fn load_quantized( FILE: candle-core/src/quantized/dummy_metal.rs type QMetalStorage (line 5) | pub struct QMetalStorage { method zeros (line 11) | pub fn zeros(_: &MetalDevice, _: usize, _: GgmlDType) -> Result { method dtype (line 15) | pub fn dtype(&self) -> GgmlDType { method device (line 19) | pub fn device(&self) -> &MetalDevice { method dequantize (line 23) | pub fn dequantize(&self, _elem_count: usize) -> Result { method quantize (line 27) | pub fn quantize(&mut self, _src: &MetalStorage) -> Result<()> { method quantize_imatrix (line 31) | pub fn quantize_imatrix( method quantize_imatrix_onto (line 40) | pub fn quantize_imatrix_onto( method quantize_onto (line 49) | pub fn quantize_onto(&mut self, _src: &crate::CpuStorage) -> Result<()> { method storage_size_in_bytes (line 53) | pub fn storage_size_in_bytes(&self) -> usize { method fwd (line 57) | pub fn fwd( method data (line 66) | pub fn data(&self) -> Result> { method indexed_moe_forward (line 70) | pub fn indexed_moe_forward( function load_quantized (line 82) | pub fn load_quantized( FILE: candle-core/src/quantized/ggml_file.rs type Magic (line 10) | enum Magic { type Error (line 19) | type Error = crate::Error; method try_from (line 20) | fn try_from(value: u32) -> Result { type VersionedMagic (line 34) | pub enum VersionedMagic { method read (line 43) | fn read(reader: &mut R) -> Result { method align32 (line 60) | fn align32(&self) -> bool { type HParams (line 69) | pub struct HParams { method read (line 80) | fn read(reader: &mut R) -> Result { type Vocab (line 101) | pub struct Vocab { method read (line 106) | fn read(reader: &mut R, n_vocab: usize) -> Result( function qtensor_from_ggml (line 138) | pub fn qtensor_from_ggml( function read_one_tensor (line 191) | fn read_one_tensor( type Content (line 225) | pub struct Content { method read (line 234) | pub fn read( method remove (line 260) | pub fn remove(&mut self, name: &str) -> Result { FILE: candle-core/src/quantized/gguf_file.rs constant DEFAULT_ALIGNMENT (line 10) | pub const DEFAULT_ALIGNMENT: u64 = 32; type Magic (line 13) | enum Magic { type Error (line 18) | type Error = crate::Error; method try_from (line 19) | fn try_from(value: u32) -> Result { type VersionedMagic (line 29) | pub enum VersionedMagic { method read (line 36) | fn read(reader: &mut R) -> Result { type TensorInfo (line 51) | pub struct TensorInfo { method read (line 58) | pub fn read( type Content (line 85) | pub struct Content { method read (line 396) | pub fn read(reader: &mut R) -> Resul... method tensor (line 470) | pub fn tensor( function read_string (line 92) | fn read_string(reader: &mut R, magic: &VersionedMagic)... type ValueType (line 110) | pub enum ValueType { method from_u32 (line 356) | fn from_u32(v: u32) -> Result { method to_u32 (line 376) | fn to_u32(self) -> u32 { type Value (line 143) | pub enum Value { method value_type (line 160) | pub fn value_type(&self) -> ValueType { method to_u8 (line 178) | pub fn to_u8(&self) -> Result { method to_i8 (line 185) | pub fn to_i8(&self) -> Result { method to_u16 (line 192) | pub fn to_u16(&self) -> Result { method to_i16 (line 199) | pub fn to_i16(&self) -> Result { method to_u32 (line 206) | pub fn to_u32(&self) -> Result { method to_i32 (line 213) | pub fn to_i32(&self) -> Result { method to_u64 (line 221) | pub fn to_u64(&self) -> Result { method to_i64 (line 233) | pub fn to_i64(&self) -> Result { method to_f32 (line 240) | pub fn to_f32(&self) -> Result { method to_f64 (line 247) | pub fn to_f64(&self) -> Result { method to_bool (line 254) | pub fn to_bool(&self) -> Result { method to_vec (line 261) | pub fn to_vec(&self) -> Result<&Vec> { method to_string (line 268) | pub fn to_string(&self) -> Result<&String> { method read (line 275) | fn read( method write (line 316) | fn write(&self, w: &mut W) -> Result<()> { function write_string (line 484) | fn write_string(w: &mut W, str: &str) -> Result<()> { function write (line 491) | pub fn write( FILE: candle-core/src/quantized/imatrix_file.rs function load_imatrix (line 10) | pub fn load_imatrix>(fname: P) -> Result Self { method to_float (line 33) | fn to_float(xs: &[Self], ys: &mut [f32]); method from_float (line 34) | fn from_float(xs: &[f32], ys: &mut [Self]); method from_float_imatrix (line 35) | fn from_float_imatrix( method direct_copy (line 47) | fn direct_copy(_xs: &[f32], _ys: &mut [Self]) {} method vec_dot (line 51) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32; method vec_dot_unopt (line 54) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32; constant DTYPE (line 173) | const DTYPE: GgmlDType = GgmlDType::Q4_0; constant BLCK_SIZE (line 174) | const BLCK_SIZE: usize = QK4_0; type VecDotType (line 175) | type VecDotType = BlockQ8_0; method to_float (line 178) | fn to_float(xs: &[Self], ys: &mut [f32]) { method from_float (line 200) | fn from_float(xs: &[f32], ys: &mut [Self]) { method vec_dot (line 240) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 253) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { constant DTYPE (line 274) | const DTYPE: GgmlDType = GgmlDType::Q4_1; constant BLCK_SIZE (line 275) | const BLCK_SIZE: usize = QK4_1; type VecDotType (line 276) | type VecDotType = BlockQ8_1; method vec_dot (line 278) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 282) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 312) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 351) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 375) | const DTYPE: GgmlDType = GgmlDType::Q5_0; constant BLCK_SIZE (line 376) | const BLCK_SIZE: usize = QK5_0; type VecDotType (line 377) | type VecDotType = BlockQ8_0; method vec_dot (line 379) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 393) | fn vec_dot_unopt(_n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f... method from_float (line 416) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 455) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 481) | const DTYPE: GgmlDType = GgmlDType::Q5_1; constant BLCK_SIZE (line 482) | const BLCK_SIZE: usize = QK5_1; type VecDotType (line 483) | type VecDotType = BlockQ8_1; method vec_dot (line 485) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 489) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 523) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 566) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 594) | const DTYPE: GgmlDType = GgmlDType::Q8_0; constant BLCK_SIZE (line 595) | const BLCK_SIZE: usize = QK8_0; type VecDotType (line 596) | type VecDotType = BlockQ8_0; method to_float (line 599) | fn to_float(xs: &[Self], ys: &mut [f32]) { method from_float (line 617) | fn from_float(xs: &[f32], ys: &mut [Self]) { method vec_dot (line 649) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 662) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { constant DTYPE (line 684) | const DTYPE: GgmlDType = GgmlDType::Q8_1; constant BLCK_SIZE (line 685) | const BLCK_SIZE: usize = QK8_1; type VecDotType (line 686) | type VecDotType = BlockQ8_1; method vec_dot (line 688) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 692) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 712) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 743) | fn to_float(_xs: &[Self], _ys: &mut [f32]) { constant DTYPE (line 749) | const DTYPE: GgmlDType = GgmlDType::Q2K; constant BLCK_SIZE (line 750) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 751) | type VecDotType = BlockQ8K; method vec_dot (line 754) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 767) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 820) | fn from_float(xs: &[f32], ys: &mut [Self]) { method from_float_imatrix (line 884) | fn from_float_imatrix(xs: &[f32], ys: &mut [Self], imatrix_weights: &[... method to_float (line 942) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 982) | const DTYPE: GgmlDType = GgmlDType::Q3K; constant BLCK_SIZE (line 983) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 984) | type VecDotType = BlockQ8K; method vec_dot (line 987) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 997) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 1119) | fn from_float(xs: &[f32], ys: &mut [Self]) { method from_float_imatrix (line 1200) | fn from_float_imatrix(xs: &[f32], ys: &mut [Self], imatrix_weights: &[... method to_float (line 1298) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 1354) | const DTYPE: GgmlDType = GgmlDType::Q4K; constant BLCK_SIZE (line 1355) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 1356) | type VecDotType = BlockQ8K; method vec_dot (line 1359) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 1372) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 1454) | fn from_float(xs: &[f32], ys: &mut [Self]) { method from_float_imatrix (line 1514) | fn from_float_imatrix(xs: &[f32], ys: &mut [Self], imatrix_weights: &[... method to_float (line 1579) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 1611) | const DTYPE: GgmlDType = GgmlDType::Q5K; constant BLCK_SIZE (line 1612) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 1613) | type VecDotType = BlockQ8K; method vec_dot (line 1616) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 1626) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 1716) | fn from_float(xs: &[f32], ys: &mut [Self]) { method from_float_imatrix (line 1791) | fn from_float_imatrix(xs: &[f32], ys: &mut [Self], imatrix_weights: &[... method to_float (line 1874) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 1912) | const DTYPE: GgmlDType = GgmlDType::Q6K; constant BLCK_SIZE (line 1913) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 1914) | type VecDotType = BlockQ8K; method vec_dot (line 1917) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 1930) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 1989) | fn from_float(xs: &[f32], ys: &mut [Self]) { method from_float_imatrix (line 2061) | fn from_float_imatrix(xs: &[f32], ys: &mut [Self], imatrix_weights: &[... method to_float (line 2142) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 2177) | const DTYPE: GgmlDType = GgmlDType::Q8K; constant BLCK_SIZE (line 2178) | const BLCK_SIZE: usize = QK_K; type VecDotType (line 2179) | type VecDotType = BlockQ8K; method vec_dot (line 2182) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 2195) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 2214) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 2253) | fn to_float(xs: &[Self], ys: &mut [f32]) { constant DTYPE (line 2353) | const DTYPE: GgmlDType = GgmlDType::F32; constant BLCK_SIZE (line 2354) | const BLCK_SIZE: usize = 1; constant DIRECT_COPY (line 2355) | const DIRECT_COPY: bool = true; type VecDotType (line 2356) | type VecDotType = f32; method vec_dot (line 2358) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 2362) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 2370) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 2381) | fn to_float(xs: &[Self], ys: &mut [f32]) { method direct_copy (line 2392) | fn direct_copy(xs: &[f32], ys: &mut [Self]) { constant DTYPE (line 2398) | const DTYPE: GgmlDType = GgmlDType::F16; constant BLCK_SIZE (line 2399) | const BLCK_SIZE: usize = 1; constant DIRECT_COPY (line 2400) | const DIRECT_COPY: bool = true; type VecDotType (line 2401) | type VecDotType = f16; method vec_dot (line 2403) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 2407) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 2415) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 2426) | fn to_float(xs: &[Self], ys: &mut [f32]) { method direct_copy (line 2437) | fn direct_copy(xs: &[f32], ys: &mut [Self]) { constant DTYPE (line 2443) | const DTYPE: GgmlDType = GgmlDType::BF16; constant BLCK_SIZE (line 2444) | const BLCK_SIZE: usize = 1; constant DIRECT_COPY (line 2445) | const DIRECT_COPY: bool = true; type VecDotType (line 2446) | type VecDotType = bf16; method vec_dot (line 2448) | fn vec_dot(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method vec_dot_unopt (line 2452) | fn vec_dot_unopt(n: usize, xs: &[Self], ys: &[Self::VecDotType]) -> f32 { method from_float (line 2460) | fn from_float(xs: &[f32], ys: &mut [Self]) { method to_float (line 2471) | fn to_float(xs: &[Self], ys: &mut [f32]) { method direct_copy (line 2482) | fn direct_copy(xs: &[f32], ys: &mut [Self]) { type BlockQ4_0 (line 59) | pub struct BlockQ4_0 { constant _ (line 63) | const _: () = assert!(std::mem::size_of::() == 18); type BlockQ4_1 (line 67) | pub struct BlockQ4_1 { constant _ (line 72) | const _: () = assert!(std::mem::size_of::() == 20); type BlockQ5_0 (line 76) | pub struct BlockQ5_0 { constant _ (line 81) | const _: () = assert!(std::mem::size_of::() == 22); type BlockQ5_1 (line 85) | pub struct BlockQ5_1 { constant _ (line 91) | const _: () = assert!(std::mem::size_of::() == 24); type BlockQ8_0 (line 95) | pub struct BlockQ8_0 { constant _ (line 99) | const _: () = assert!(std::mem::size_of::() == 34); type BlockQ8_1 (line 103) | pub struct BlockQ8_1 { constant _ (line 108) | const _: () = assert!(std::mem::size_of::() == 36); type BlockQ2K (line 112) | pub struct BlockQ2K { constant _ (line 118) | const _: () = assert!(QK_K / 16 + QK_K / 4 + 2 * 2 == std::mem::size_of:... type BlockQ3K (line 122) | pub struct BlockQ3K { constant _ (line 128) | const _: () = assert!(QK_K / 8 + QK_K / 4 + 12 + 2 == std::mem::size_of:... type BlockQ4K (line 133) | pub struct BlockQ4K { constant _ (line 139) | const _: () = assert!(QK_K / 2 + K_SCALE_SIZE + 2 * 2 == std::mem::size_... type BlockQ5K (line 143) | pub struct BlockQ5K { constant _ (line 150) | const _: () = type BlockQ6K (line 155) | pub struct BlockQ6K { constant _ (line 161) | const _: () = assert!(3 * QK_K / 4 + QK_K / 16 + 2 == std::mem::size_of:... type BlockQ8K (line 165) | pub struct BlockQ8K { constant _ (line 170) | const _: () = assert!(4 + QK_K + QK_K / 16 * 2 == std::mem::size_of::( function matmul_f16 (line 2317) | pub fn matmul_f16( FILE: candle-core/src/quantized/metal.rs type QMetalStorage (line 7) | pub struct QMetalStorage { method zeros (line 14) | pub fn zeros(device: &MetalDevice, elem_count: usize, dtype: GgmlDType... method dtype (line 24) | pub fn dtype(&self) -> GgmlDType { method device (line 28) | pub fn device(&self) -> &MetalDevice { method buffer (line 32) | pub fn buffer(&self) -> &Buffer { method dequantize (line 36) | pub fn dequantize(&self, elem_count: usize) -> Result { method quantize (line 119) | pub fn quantize(&mut self, src: &MetalStorage) -> Result<()> { method quantize_imatrix (line 131) | pub fn quantize_imatrix( method quantize_imatrix_onto (line 148) | pub fn quantize_imatrix_onto( method quantize_onto (line 169) | pub fn quantize_onto(&mut self, src: &crate::CpuStorage) -> Result<()> { method storage_size_in_bytes (line 185) | pub fn storage_size_in_bytes(&self) -> usize { method fwd_mv (line 189) | fn fwd_mv( method fwd (line 246) | pub fn fwd( method data (line 338) | pub fn data(&self) -> Result> { function load_quantized (line 351) | pub fn load_quantized( function read_to_vec (line 364) | fn read_to_vec(buffer: &Buffer, n: usize) -> Vec { function from (line 372) | fn from(value: GgmlDType) -> Self { FILE: candle-core/src/quantized/mod.rs function as_t_slice (line 38) | fn as_t_slice(data: Cow<'_, [u8]>) -> &[T] { type QTensor (line 54) | pub struct QTensor { method fmt (line 457) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { method new (line 477) | pub fn new>(storage: QStorage, shape: S) -> Result { method quantize (line 483) | pub fn quantize(src: &Tensor, dtype: GgmlDType) -> Result { method quantize_imatrix (line 503) | pub fn quantize_imatrix( method quantize_imatrix_onto (line 539) | pub fn quantize_imatrix_onto( method quantize_onto (line 582) | pub fn quantize_onto(src: &Tensor, dtype: GgmlDType, dev: &Device) -> ... method dtype (line 609) | pub fn dtype(&self) -> GgmlDType { method device (line 613) | pub fn device(&self) -> Device { method rank (line 617) | pub fn rank(&self) -> usize { method shape (line 621) | pub fn shape(&self) -> &Shape { method dequantize (line 625) | pub fn dequantize(&self, device: &Device) -> Result { method dequantize_f16 (line 631) | pub fn dequantize_f16(&self, device: &Device) -> Result { method storage_size_in_bytes (line 648) | pub fn storage_size_in_bytes(&self) -> usize { method data (line 652) | pub fn data(&self) -> Result> { method indexed_moe_forward (line 656) | pub fn indexed_moe_forward(&self, x: &Tensor, ids: &Tensor) -> Result<... method device_ptr (line 684) | pub fn device_ptr(&self) -> Result<*const u8> { method name (line 775) | fn name(&self) -> &'static str { method cpu_fwd (line 779) | fn cpu_fwd( method metal_fwd (line 834) | fn metal_fwd( method cuda_fwd (line 846) | fn cuda_fwd( method qzeros (line 60) | fn qzeros(&self, elem_count: usize, dtype: GgmlDType) -> Result { type QStorage (line 78) | pub enum QStorage { method from_data (line 85) | pub fn from_data(data: Cow<'_, [u8]>, device: &Device, dtype: GgmlDTyp... method block_size (line 125) | fn block_size(&self) -> usize { method dtype (line 133) | fn dtype(&self) -> GgmlDType { method device (line 141) | fn device(&self) -> Device { method size_in_bytes (line 149) | fn size_in_bytes(&self) -> usize { method quantize (line 157) | fn quantize(&mut self, src: &Storage) -> Result<()> { method quantize_imatrix (line 169) | fn quantize_imatrix( method quantize_onto (line 190) | fn quantize_onto(&mut self, src: &Storage) -> Result<()> { method quantize_imatrix_onto (line 202) | fn quantize_imatrix_onto( method dequantize (line 223) | fn dequantize(&self, elem_count: usize) -> Result { method data (line 231) | fn data(&self) -> Result> { method device_ptr (line 244) | pub fn device_ptr(&self) -> Result<*const u8> { type GgmlDType (line 255) | pub enum GgmlDType { method from_u32 (line 274) | pub(crate) fn from_u32(u: u32) -> Result { method to_u32 (line 297) | pub(crate) fn to_u32(self) -> u32 { method cpu_zeros (line 319) | pub fn cpu_zeros(&self, elem_count: usize) -> Box { method from_data (line 339) | pub fn from_data(&self, data: Cow<'_, [u8]>) -> Box { method type_size (line 360) | pub fn type_size(&self) -> usize { method block_size (line 382) | pub fn block_size(&self) -> usize { type QuantizedType (line 398) | pub trait QuantizedType: Send + Sync { method dtype (line 399) | fn dtype(&self) -> GgmlDType; method matmul_t (line 400) | fn matmul_t(&self, mkn: (usize, usize, usize), lhs: &[f32], dst: &mut ... method matmul_t_f16 (line 401) | fn matmul_t_f16(&self, mkn: (usize, usize, usize), lhs: &[f16], dst: &... method dequantize (line 402) | fn dequantize(&self, elem_count: usize) -> Result; method storage_size_in_bytes (line 403) | fn storage_size_in_bytes(&self) -> usize; method as_ptr (line 404) | fn as_ptr(&self) -> *const u8; method block_size (line 405) | fn block_size(&self) -> usize; method from_float (line 407) | fn from_float(&mut self, xs: &[f32]); method from_float_imatrix (line 409) | fn from_float_imatrix(&mut self, xs: &[f32], imatrix_weights: &[f32], ... method size (line 410) | fn size(&self) -> usize; method matmul_t (line 414) | fn matmul_t(&self, mkn: (usize, usize, usize), lhs: &[f32], dst: &mut ... method matmul_t_f16 (line 417) | fn matmul_t_f16(&self, mkn: (usize, usize, usize), lhs: &[f16], dst: &... method size (line 421) | fn size(&self) -> usize { method from_float (line 425) | fn from_float(&mut self, xs: &[f32]) { method from_float_imatrix (line 429) | fn from_float_imatrix(&mut self, xs: &[f32], imatrix_weights: &[f32], ... method dtype (line 433) | fn dtype(&self) -> GgmlDType { method block_size (line 437) | fn block_size(&self) -> usize { method dequantize (line 441) | fn dequantize(&self, elem_count: usize) -> Result { method storage_size_in_bytes (line 447) | fn storage_size_in_bytes(&self) -> usize { method as_ptr (line 451) | fn as_ptr(&self) -> *const u8 { function check_shape (line 462) | fn check_shape(shape: &Shape, block_size: usize) -> Result<()> { type QMatMul (line 695) | pub enum QMatMul { method from_arc (line 724) | pub fn from_arc(qtensor: std::sync::Arc) -> Result { method from_qtensor (line 741) | pub fn from_qtensor(qtensor: QTensor) -> Result { method dequantize_f16 (line 745) | pub fn dequantize_f16(&self) -> Result { method forward_via_f16 (line 753) | pub fn forward_via_f16(&self, xs: &Tensor) -> Result { method indexed_moe_forward (line 764) | pub fn indexed_moe_forward(&self, x: &Tensor, ids: &Tensor) -> Result<... method forward (line 860) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-core/src/quantized/neon.rs function vdotq_s32 (line 15) | unsafe fn vdotq_s32(a: int8x16_t, b: int8x16_t) -> int32x4_t { function vec_dot_q4_0_q8_0 (line 23) | pub(crate) fn vec_dot_q4_0_q8_0(n: usize, xs: &[BlockQ4_0], ys: &[BlockQ... function vec_dot_q8_0_q8_0 (line 65) | pub(crate) fn vec_dot_q8_0_q8_0(n: usize, xs: &[BlockQ8_0], ys: &[BlockQ... function vec_dot_q8k_q8k (line 98) | pub(crate) fn vec_dot_q8k_q8k(n: usize, xs: &[BlockQ8K], ys: &[BlockQ8K]... function vec_dot_q6k_q8k (line 123) | pub(crate) fn vec_dot_q6k_q8k(n: usize, xs: &[BlockQ6K], ys: &[BlockQ8K]... function vec_dot_q5k_q8k (line 232) | pub(crate) fn vec_dot_q5k_q8k(n: usize, xs: &[BlockQ5K], ys: &[BlockQ8K]... function vec_dot_q4k_q8k (line 317) | pub(crate) fn vec_dot_q4k_q8k(n: usize, xs: &[BlockQ4K], ys: &[BlockQ8K]... function vec_dot_q3k_q8k (line 398) | pub(crate) fn vec_dot_q3k_q8k(n: usize, xs: &[BlockQ3K], ys: &[BlockQ8K]... function vec_dot_q2k_q8k (line 522) | pub(crate) fn vec_dot_q2k_q8k(n: usize, xs: &[BlockQ2K], ys: &[BlockQ8K]... function multiply_accum_with_scale (line 605) | unsafe fn multiply_accum_with_scale( FILE: candle-core/src/quantized/simd128.rs function vec_dot_q4_0_q8_0 (line 8) | pub(crate) fn vec_dot_q4_0_q8_0(n: usize, xs: &[BlockQ4_0], ys: &[BlockQ... function vec_dot_q8_0_q8_0 (line 54) | pub(crate) fn vec_dot_q8_0_q8_0(n: usize, xs: &[BlockQ8_0], ys: &[BlockQ... function vec_dot_q2k_q8k (line 94) | pub(crate) fn vec_dot_q2k_q8k(n: usize, xs: &[BlockQ2K], ys: &[BlockQ8K]... function vec_dot_q4k_q8k (line 179) | pub(crate) fn vec_dot_q4k_q8k(n: usize, xs: &[BlockQ4K], ys: &[BlockQ8K]... function vec_dot_q6k_q8k (line 269) | pub(crate) fn vec_dot_q6k_q8k(n: usize, xs: &[BlockQ6K], ys: &[BlockQ8K]... function vec_dot_q8k_q8k (line 392) | pub(crate) fn vec_dot_q8k_q8k(n: usize, xs: &[BlockQ8K], ys: &[BlockQ8K]... FILE: candle-core/src/quantized/tokenizer.rs type TokenizerFromGguf (line 20) | pub trait TokenizerFromGguf: Sized { method from_gguf (line 21) | fn from_gguf(ct: &gguf_file::Content) -> Result; method from_gguf (line 202) | fn from_gguf(ct: &gguf_file::Content) -> Result { function metadata_value (line 24) | fn metadata_value<'a>(ct: &'a gguf_file::Content, key: &str) -> Result<&... function gguf_value_to_u32 (line 30) | fn gguf_value_to_u32(v: &gguf_file::Value) -> Result { function value_to_string_array (line 45) | fn value_to_string_array(v: &gguf_file::Value, name: &str) -> Result Result Resu... function pipeline_from_pre (line 103) | fn pipeline_from_pre(pre: &str) -> Result { function template_processor (line 138) | fn template_processor( FILE: candle-core/src/quantized/utils.rs function nearest_int (line 1) | pub(super) fn nearest_int(v: f32) -> i32 { function group_for_quantization (line 8) | pub(super) fn group_for_quantization<'a, 'b, T: super::k_quants::GgmlType>( function group_for_dequantization (line 30) | pub(super) fn group_for_dequantization<'a, 'b, T: super::k_quants::GgmlT... function get_scale_min_k4 (line 50) | pub(super) fn get_scale_min_k4(j: usize, q: &[u8]) -> (u8, u8) { function make_qx_quants (line 62) | pub(super) unsafe fn make_qx_quants( function make_qkx1_quants (line 227) | pub(super) fn make_qkx1_quants(nmax: i32, ntry: usize, x: &[f32]) -> (f3... function make_q3_quants (line 287) | pub(super) fn make_q3_quants(x: &[f32], nmax: i32, do_rmse: bool) -> f32 { function make_qkx3_quants (line 356) | pub(super) fn make_qkx3_quants( function make_qp_quants (line 470) | pub(super) fn make_qp_quants( FILE: candle-core/src/safetensors.rs function from (line 23) | fn from(value: DType) -> Self { type Error (line 44) | type Error = Error; method try_from (line 45) | fn try_from(value: st::Dtype) -> Result { method dtype (line 67) | fn dtype(&self) -> st::Dtype { method shape (line 70) | fn shape(&self) -> &[usize] { method data (line 74) | fn data(&self) -> Cow<'_, [u8]> { method data_len (line 80) | fn data_len(&self) -> usize { function dtype (line 88) | fn dtype(&self) -> st::Dtype { function shape (line 91) | fn shape(&self) -> &[usize] { function data (line 95) | fn data(&self) -> Cow<'_, [u8]> { function data_len (line 101) | fn data_len(&self) -> usize { method save_safetensors (line 109) | pub fn save_safetensors>(&self, name: &str, filename: P) ... function convert_slice (line 115) | fn convert_slice(data: &[u8], shape: &[usize], device: &De... function convert_slice_with_cast (line 140) | fn convert_slice_with_cast Re... function convert_with_cast_ (line 172) | fn convert_with_cast_ Result<... function convert_ (line 180) | fn convert_(view: &st::TensorView<'_>, device: &Device) ->... function convert_back_ (line 184) | fn convert_back_(mut vs: Vec) -> Vec { type Load (line 198) | pub trait Load { method load (line 199) | fn load(&self, device: &Device) -> Result; method load (line 203) | fn load(&self, device: &Device) -> Result { method from_raw_buffer (line 209) | pub fn from_raw_buffer( function convert (line 286) | fn convert(view: &st::TensorView<'_>, device: &Device) -> Result { function convert_dummy (line 312) | fn convert_dummy(view: &st::TensorView<'_>, device: &Device) -> Result Result> { function load (line 400) | pub fn load>(filename: P, device: &Device) -> Result Result + Ord + std::fmt::Display, P: AsRef>( type SafeTensors_ (line 421) | struct SafeTensors_<'a>(SafeTensors<'a>); type MmapedSafetensors (line 423) | pub struct MmapedSafetensors { method new (line 434) | pub unsafe fn new>(p: P) -> Result { method multi (line 461) | pub unsafe fn multi>(paths: &[P]) -> Result { method load (line 489) | pub fn load(&self, name: &str, dev: &Device) -> Result { method tensors (line 493) | pub fn tensors(&self) -> Vec<(String, st::TensorView<'_>)> { method get (line 501) | pub fn get(&self, name: &str) -> Result> { type SliceSafetensors (line 518) | pub struct SliceSafetensors<'a> { function new (line 524) | pub fn new(buffer: &'a [u8]) -> Result { function load (line 529) | pub fn load(&self, name: &str, dev: &Device) -> Result { function tensors (line 533) | pub fn tensors(&self) -> Vec<(String, st::TensorView<'_>)> { function get (line 537) | pub fn get(&self, name: &str) -> Result> { type BufferedSafetensors (line 542) | pub struct BufferedSafetensors { method new (line 548) | pub fn new(buffer: Vec) -> Result { method load (line 559) | pub fn load(&self, name: &str, dev: &Device) -> Result { method tensors (line 563) | pub fn tensors(&self) -> Vec<(String, st::TensorView<'_>)> { method get (line 567) | pub fn get(&self, name: &str) -> Result> { type MmapedFile (line 572) | pub struct MmapedFile { method new (line 584) | pub unsafe fn new>(p: P) -> Result { method deserialize (line 596) | pub fn deserialize(&self) -> Result> { function save_single_tensor (line 609) | fn save_single_tensor() { function save_load_multiple_tensors (line 618) | fn save_load_multiple_tensors() { function load_u8 (line 633) | fn load_u8() { FILE: candle-core/src/scalar.rs type Scalar (line 8) | pub enum Scalar { method from (line 22) | fn from(value: T) -> Self { method zero (line 28) | pub fn zero(dtype: DType) -> Self { method one (line 46) | pub fn one(dtype: DType) -> Self { method dtype (line 64) | pub fn dtype(&self) -> DType { method to_f64 (line 79) | pub fn to_f64(&self) -> f64 { type TensorScalar (line 95) | pub enum TensorScalar { type TensorOrScalar (line 100) | pub trait TensorOrScalar { method to_tensor_scalar (line 101) | fn to_tensor_scalar(self) -> Result; method to_tensor_scalar (line 105) | fn to_tensor_scalar(self) -> Result { method to_tensor_scalar (line 111) | fn to_tensor_scalar(self) -> Result { FILE: candle-core/src/shape.rs type Shape (line 6) | pub struct Shape(Vec); method fmt (line 11) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method from (line 17) | fn from(dims: &[usize; C]) -> Self { method from (line 23) | fn from(dims: &[usize]) -> Self { method from (line 29) | fn from(shape: &Shape) -> Self { method from (line 35) | fn from(_: ()) -> Self { method from (line 41) | fn from(d1: usize) -> Self { method from (line 64) | fn from(dims: Vec) -> Self { method from_dims (line 106) | pub fn from_dims(dims: &[usize]) -> Self { method rank (line 111) | pub fn rank(&self) -> usize { method into_dims (line 115) | pub fn into_dims(self) -> Vec { method dims (line 120) | pub fn dims(&self) -> &[usize] { method dim (line 125) | pub fn dim(&self, dim: D) -> Result { method elem_count (line 131) | pub fn elem_count(&self) -> usize { method stride_contiguous (line 137) | pub(crate) fn stride_contiguous(&self) -> Vec { method is_contiguous (line 153) | pub fn is_contiguous(&self, stride: &[usize]) -> bool { method is_fortran_contiguous (line 168) | pub fn is_fortran_contiguous(&self, stride: &[usize]) -> bool { method extend (line 184) | pub fn extend(mut self, additional_dims: &[usize]) -> Self { method broadcast_shape_binary_op (line 191) | pub fn broadcast_shape_binary_op(&self, rhs: &Self, op: &'static str) ... method broadcast_shape_matmul (line 229) | pub(crate) fn broadcast_shape_matmul(&self, rhs: &Self) -> Result<(Sha... constant SCALAR (line 8) | pub const SCALAR: Shape = Shape(vec![]); type Dim (line 253) | pub trait Dim { method to_index (line 254) | fn to_index(&self, shape: &Shape, op: &'static str) -> Result; method to_index_plus_one (line 255) | fn to_index_plus_one(&self, shape: &Shape, op: &'static str) -> Result... method to_index (line 259) | fn to_index(&self, shape: &Shape, op: &'static str) -> Result { method to_index_plus_one (line 273) | fn to_index_plus_one(&self, shape: &Shape, op: &'static str) -> Result... method to_index (line 312) | fn to_index(&self, shape: &Shape, op: &'static str) -> Result { method to_index_plus_one (line 322) | fn to_index_plus_one(&self, shape: &Shape, op: &'static str) -> Result... type D (line 289) | pub enum D { method out_of_range (line 296) | fn out_of_range(&self, shape: &Shape, op: &'static str) -> Error { type Dims (line 333) | pub trait Dims: Sized { method to_indexes_internal (line 334) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes (line 336) | fn to_indexes(self, shape: &Shape, op: &'static str) -> Result Result Result Result Result Resul... method to_indexes_internal (line 392) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes_internal (line 399) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes_internal (line 407) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes_internal (line 416) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes_internal (line 426) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... method to_indexes_internal (line 437) | fn to_indexes_internal(self, shape: &Shape, op: &'static str) -> Resul... type ShapeWithOneHole (line 470) | pub trait ShapeWithOneHole { method into_shape (line 471) | fn into_shape(self, el_count: usize) -> Result; method into_shape (line 475) | fn into_shape(self, _el_count: usize) -> Result { method into_shape (line 481) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 497) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 504) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 511) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 518) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 525) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 532) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 540) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 548) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 556) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 564) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 572) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 580) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 588) | fn into_shape(self, el_count: usize) -> Result { method into_shape (line 596) | fn into_shape(self, el_count: usize) -> Result { function hole_size (line 486) | fn hole_size(el_count: usize, prod_d: usize, s: &dyn std::fmt::Debug) ->... function stride (line 608) | fn stride() { function test_from_tuple (line 620) | fn test_from_tuple() { FILE: candle-core/src/sort.rs type ArgSort (line 5) | struct ArgSort { method asort (line 11) | fn asort(&self, vs: &[T], layout: &crate::Layout)... method f (line 65) | fn f) ... method name (line 107) | fn name(&self) -> &'static str { method cpu_fwd (line 111) | fn cpu_fwd( method cuda_fwd (line 152) | fn cuda_fwd( method metal_fwd (line 169) | fn metal_fwd( function next_power_of_2 (line 246) | fn next_power_of_2(x: usize) -> usize { method arg_sort_last_dim (line 260) | pub fn arg_sort_last_dim(&self, asc: bool) -> Result { method sort_last_dim (line 280) | pub fn sort_last_dim(&self, asc: bool) -> Result<(Tensor, Tensor)> { FILE: candle-core/src/storage.rs type Storage (line 10) | pub enum Storage { method try_clone (line 17) | pub fn try_clone(&self, layout: &Layout) -> Result { method device (line 31) | pub fn device(&self) -> Device { method dtype (line 39) | pub fn dtype(&self) -> DType { method same_device (line 47) | pub(crate) fn same_device(&self, rhs: &Self, op: &'static str) -> Resu... method same_dtype (line 67) | pub(crate) fn same_dtype(&self, rhs: &Self, op: &'static str) -> Resul... method const_set (line 77) | pub(crate) fn const_set(&mut self, v: Scalar, l: &Layout) -> Result<()> { method affine (line 85) | pub(crate) fn affine(&self, layout: &Layout, mul: f64, add: f64) -> Re... method powf (line 102) | pub(crate) fn powf(&self, layout: &Layout, alpha: f64) -> Result { method elu (line 119) | pub(crate) fn elu(&self, layout: &Layout, alpha: f64) -> Result { method cmp (line 136) | pub(crate) fn cmp( method reduce_op (line 171) | pub(crate) fn reduce_op(&self, op: ReduceOp, layout: &Layout, s: &[usi... method to_dtype (line 188) | pub(crate) fn to_dtype(&self, layout: &Layout, dtype: DType) -> Result... method apply_op1 (line 205) | pub(crate) fn apply_op1(&self, l: &Layout, c: &dyn CustomOp1) -> Resul... method apply_op2 (line 222) | pub(crate) fn apply_op2( method apply_op3 (line 247) | pub(crate) fn apply_op3( method inplace_op1 (line 275) | pub(crate) fn inplace_op1(&mut self, l: &Layout, c: &dyn InplaceOp1) -... method inplace_op2 (line 283) | pub(crate) fn inplace_op2( method inplace_op3 (line 299) | pub(crate) fn inplace_op3( method unary_impl (line 320) | pub(crate) fn unary_impl(&self, layout: &Layout) -> R... method binary_impl (line 337) | pub(crate) fn binary_impl( method conv1d (line 371) | pub(crate) fn conv1d( method conv_transpose1d (line 402) | pub(crate) fn conv_transpose1d( method conv2d (line 433) | pub(crate) fn conv2d( method conv_transpose2d (line 464) | pub(crate) fn conv_transpose2d( method avg_pool2d (line 495) | pub(crate) fn avg_pool2d( method max_pool2d (line 517) | pub(crate) fn max_pool2d( method upsample_nearest1d (line 539) | pub(crate) fn upsample_nearest1d(&self, layout: &Layout, sz: usize) ->... method upsample_nearest2d (line 556) | pub(crate) fn upsample_nearest2d(&self, layout: &Layout, h: usize, w: ... method upsample_bilinear2d (line 573) | pub(crate) fn upsample_bilinear2d( method where_cond (line 601) | pub(crate) fn where_cond( method gather (line 634) | pub(crate) fn gather( method scatter_set (line 659) | pub(crate) fn scatter_set( method scatter_add (line 685) | pub(crate) fn scatter_add( method index_add (line 711) | pub(crate) fn index_add( method index_select (line 739) | pub(crate) fn index_select( method matmul (line 769) | pub(crate) fn matmul( method copy_strided_src (line 801) | pub(crate) fn copy_strided_src( method copy2d (line 823) | pub(crate) fn copy2d( FILE: candle-core/src/streaming.rs type Dim (line 5) | pub trait Dim: crate::shape::Dim + Copy {} type StreamTensor (line 11) | pub struct StreamTensor(Option); method fmt (line 14) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method from (line 23) | fn from(value: Option) -> Self { method from (line 29) | fn from(value: Tensor) -> Self { method from (line 35) | fn from(_value: ()) -> Self { method empty (line 41) | pub fn empty() -> Self { method from_tensor (line 45) | pub fn from_tensor(tensor: Tensor) -> Self { method shape (line 49) | pub fn shape(&self) -> Option<&Shape> { method cat2 (line 53) | pub fn cat2(&self, rhs: &Self, dim: D) -> Result { method seq_len (line 65) | pub fn seq_len(&self, dim: D) -> Result { method reset (line 72) | pub fn reset(&mut self) { method narrow (line 76) | pub fn narrow(&self, dim: D, offset: usize, len: usize) -> Res... method split (line 94) | pub fn split(&self, dim: D, lhs_len: usize) -> Result<(Self, S... method as_option (line 116) | pub fn as_option(&self) -> Option<&Tensor> { method apply (line 120) | pub fn apply(&self, m: &M) -> Result { type StreamingModule (line 131) | pub trait StreamingModule { method step (line 133) | fn step(&mut self, xs: &StreamTensor) -> Result; method reset_state (line 134) | fn reset_state(&mut self); method reset_state (line 203) | fn reset_state(&mut self) {} method step (line 205) | fn step(&mut self, xs: &StreamTensor) -> Result { type BinOp (line 138) | pub enum BinOp { type StreamingBinOp (line 146) | pub struct StreamingBinOp { method new (line 154) | pub fn new(op: BinOp, dim: crate::D) -> Self { method reset_state (line 163) | pub fn reset_state(&mut self) { method forward (line 168) | pub fn forward(&self, lhs: &Tensor, rhs: &Tensor) -> Result { method step (line 177) | pub fn step(&mut self, lhs: &StreamTensor, rhs: &StreamTensor) -> Resu... type Map (line 200) | pub struct Map(T); FILE: candle-core/src/strided_index.rs type StridedIndex (line 6) | pub struct StridedIndex<'a> { function new (line 15) | pub(crate) fn new(dims: &'a [usize], stride: &'a [usize], start_offset: ... function from_layout (line 32) | pub(crate) fn from_layout(l: &'a Layout) -> Self { type Item (line 38) | type Item = usize; method next (line 41) | fn next(&mut self) -> Option { method size_hint (line 73) | fn size_hint(&self) -> (usize, Option) { method len (line 79) | fn len(&self) -> usize { type StridedBlocks (line 85) | pub enum StridedBlocks<'a> { FILE: candle-core/src/tensor.rs type TensorId (line 12) | pub struct TensorId(usize); method new (line 15) | fn new() -> Self { type Tensor_ (line 23) | pub struct Tensor_ { type Tensor (line 68) | pub struct Tensor(Arc); method as_ref (line 46) | fn as_ref(&self) -> &Tensor { type Target (line 71) | type Target = Tensor_; method deref (line 73) | fn deref(&self) -> &Self::Target { method ones_impl (line 180) | pub(crate) fn ones_impl>( method ones (line 203) | pub fn ones>(shape: S, dtype: DType, device: &Device) -... method const_set (line 207) | pub fn const_set(&self, value: crate::scalar::Scalar) -> Result<()> { method zero_set (line 211) | pub fn zero_set(&self) -> Result<()> { method one_set (line 215) | pub fn one_set(&self) -> Result<()> { method ones_like (line 228) | pub fn ones_like(&self) -> Result { method zeros_impl (line 234) | pub(crate) fn zeros_impl>( method zeros (line 255) | pub fn zeros>(shape: S, dtype: DType, device: &Device) ... method zeros_like (line 269) | pub fn zeros_like(&self) -> Result { method empty_impl (line 275) | pub(crate) unsafe fn empty_impl>( method empty (line 298) | pub unsafe fn empty>(shape: S, dtype: DType, device: &D... method empty_like (line 314) | pub unsafe fn empty_like(&self) -> Result { method rand_impl (line 318) | pub(crate) fn rand_impl, T: crate::FloatDType>( method rand_f64_impl (line 331) | pub(crate) fn rand_f64_impl>( method rand (line 346) | pub fn rand, T: crate::FloatDType>( method rand_like (line 355) | pub fn rand_like(&self, lo: f64, up: f64) -> Result { method randn_impl (line 359) | pub(crate) fn randn_impl, T: crate::FloatDType>( method randn_f64_impl (line 372) | pub(crate) fn randn_f64_impl>( method randn_like (line 386) | pub fn randn_like(&self, mean: f64, stdev: f64) -> Result { method randn (line 399) | pub fn randn, T: crate::FloatDType>( method new_impl (line 408) | pub(crate) fn new_impl( method new (line 425) | pub fn new(array: A, device: &Device) -> Re... method full (line 440) | pub fn full>( method from_iter (line 461) | pub fn from_iter( method arange (line 479) | pub fn arange(start: D, end: D, device: &Device) ... method arange_step (line 492) | pub fn arange_step( method from_vec_impl (line 518) | pub(crate) fn from_vec_impl( method from_vec (line 543) | pub fn from_vec( method from_slice (line 564) | pub fn from_slice( method same_shape_binary_op (line 575) | pub(crate) fn same_shape_binary_op(&self, rhs: &Self, op: &'static str... method track_op (line 592) | pub fn track_op(&self) -> bool { method from_storage (line 601) | pub fn from_storage>( method round_to (line 655) | pub fn round_to(&self, decimals: i32) -> Result { method to_scalar (line 662) | pub fn to_scalar(&self) -> Result { method to_vec0 (line 683) | pub fn to_vec0(&self) -> Result { method repeat (line 688) | pub fn repeat>(&self, shape: S) -> Result { method meshgrid (line 742) | pub fn meshgrid>(args: &[A], xy_indexing: bool) -> Re... method affine (line 784) | pub fn affine(&self, mul: f64, add: f64) -> Result { method elu (line 794) | pub fn elu(&self, alpha: f64) -> Result { method powf (line 804) | pub fn powf(&self, e: f64) -> Result { method check_dim (line 813) | pub(crate) fn check_dim(&self, dim: usize, op: &'static str) -> Result... method chunk (line 828) | pub fn chunk(&self, chunks: usize, dim: D) -> Result> { method narrow (line 878) | pub fn narrow(&self, dim: D, start: usize, len: usize) -> Resu... method squeeze_dims (line 917) | fn squeeze_dims(self, dims: &[usize]) -> Result { method reduce_impl (line 939) | fn reduce_impl(&self, dim: D, keepdim: bool, op: ReduceOp) -> ... method sum_impl (line 958) | fn sum_impl(&self, sum_dims: D, keepdim: bool) -> Result { method roll (line 989) | pub fn roll(&self, shift: i32, dim: D) -> Result method sum_keepdim (line 1022) | pub fn sum_keepdim(&self, sum_dims: D) -> Result { method sum (line 1029) | pub fn sum(&self, sum_dims: D) -> Result { method mean_keepdim (line 1050) | pub fn mean_keepdim(&self, mean_dims: D) -> Result { method mean (line 1060) | pub fn mean(&self, mean_dims: D) -> Result { method var_keepdim (line 1068) | pub fn var_keepdim(&self, dim: D) -> Result { method var (line 1076) | pub fn var(&self, dim: D) -> Result { method max_keepdim (line 1083) | pub fn max_keepdim(&self, dim: D) -> Result { method max (line 1088) | pub fn max(&self, dim: D) -> Result { method min_keepdim (line 1094) | pub fn min_keepdim(&self, dim: D) -> Result { method min (line 1099) | pub fn min(&self, dim: D) -> Result { method argmax_keepdim (line 1103) | pub fn argmax_keepdim(&self, dim: D) -> Result { method argmax (line 1108) | pub fn argmax(&self, dim: D) -> Result { method argmin_keepdim (line 1112) | pub fn argmin_keepdim(&self, dim: D) -> Result { method argmin (line 1117) | pub fn argmin(&self, dim: D) -> Result { method cmp (line 1125) | pub fn cmp(&self, rhs: T, op: CmpOp) -> Result { method eq (line 1142) | pub fn eq(&self, rhs: T) -> Result { method ne (line 1147) | pub fn ne(&self, rhs: T) -> Result { method lt (line 1153) | pub fn lt(&self, rhs: T) -> Result { method gt (line 1159) | pub fn gt(&self, rhs: T) -> Result { method ge (line 1165) | pub fn ge(&self, rhs: T) -> Result { method le (line 1171) | pub fn le(&self, rhs: T) -> Result { method clamp (line 1176) | pub fn clamp(&self, min: T1, m... method interpolate1d (line 1184) | pub fn interpolate1d(&self, target_size: usize) -> Result { method upsample_nearest1d (line 1194) | pub fn upsample_nearest1d(&self, target_size: usize) -> Result { method interpolate2d (line 1203) | pub fn interpolate2d(&self, target_h: usize, target_w: usize) -> Resul... method upsample_nearest2d (line 1217) | pub fn upsample_nearest2d(&self, target_h: usize, target_w: usize) -> ... method upsample_bilinear2d (line 1244) | pub fn upsample_bilinear2d( method upsample_bilinear2d_with_scale (line 1292) | pub fn upsample_bilinear2d_with_scale( method avg_pool2d (line 1340) | pub fn avg_pool2d(&self, sz: T) -> Result { method avg_pool2d_with_stride (line 1347) | pub fn avg_pool2d_with_stride( method max_pool2d (line 1378) | pub fn max_pool2d(&self, sz: T) -> Result { method max_pool2d_with_stride (line 1385) | pub fn max_pool2d_with_stride( method dot (line 1425) | pub fn dot(&self, rhs: &Self) -> Result { method norm (line 1449) | pub fn norm(&self) -> Result { method mv (line 1471) | pub fn mv(&self, rhs: &Self) -> Result { method matmul (line 1495) | pub fn matmul(&self, rhs: &Self) -> Result { method broadcast_matmul (line 1545) | pub fn broadcast_matmul(&self, rhs: &Self) -> Result { method where_cond (line 1565) | pub fn where_cond(&self, on_true: &Self, on_false: &Self) -> Result Result { method scatter_checks (line 1610) | fn scatter_checks(&self, indexes: &Self, source: &Self, dim: usize) ->... method scatter (line 1644) | pub fn scatter(&self, indexes: &Self, source: &Self, dim: D) -... method scatter_set (line 1666) | pub fn scatter_set(&self, indexes: &Self, source: &Self, dim: ... method scatter_add (line 1683) | pub fn scatter_add(&self, indexes: &Self, source: &Self, dim: ... method scatter_add_set (line 1705) | pub fn scatter_add_set(&self, indexes: &Self, source: &Self, d... method slice_scatter (line 1723) | pub fn slice_scatter(&self, src: &Self, dim: D, start: usize) ... method slice_scatter0 (line 1736) | pub fn slice_scatter0(&self, src: &Self, start: usize) -> Result { method index_add (line 1792) | pub fn index_add(&self, indexes: &Self, source: &Self, dim: D)... method gather (line 1853) | pub fn gather(&self, indexes: &Self, dim: D) -> Result { method index_select (line 1892) | pub fn index_select(&self, indexes: &Self, dim: D) -> Result crate::StridedIndex<'_> { method strided_blocks (line 1925) | pub fn strided_blocks(&self) -> crate::StridedBlocks<'_> { method to_vec1 (line 1930) | pub fn to_vec1(&self) -> Result> { method to_vec2 (line 1955) | pub fn to_vec2(&self) -> Result>> { method to_vec3 (line 1986) | pub fn to_vec3(&self) -> Result>>> { method dtype (line 2027) | pub fn dtype(&self) -> DType { method device (line 2032) | pub fn device(&self) -> &Device { method shape (line 2037) | pub fn shape(&self) -> &Shape { method dims (line 2042) | pub fn dims(&self) -> &[usize] { method dim (line 2047) | pub fn dim(&self, dim: D) -> Result { method layout (line 2054) | pub fn layout(&self) -> &Layout { method stride (line 2058) | pub fn stride(&self) -> &[usize] { method rank (line 2063) | pub fn rank(&self) -> usize { method elem_count (line 2068) | pub fn elem_count(&self) -> usize { method id (line 2073) | pub fn id(&self) -> TensorId { method is_variable (line 2079) | pub fn is_variable(&self) -> bool { method op (line 2083) | pub(crate) fn op(&self) -> &Option { method max_all (line 2097) | pub fn max_all(&self) -> Result { method min_all (line 2115) | pub fn min_all(&self) -> Result { method sum_all (line 2133) | pub fn sum_all(&self) -> Result { method mean_all (line 2138) | pub fn mean_all(&self) -> Result { method flatten_ (line 2142) | fn flatten_( method flatten (line 2174) | pub fn flatten(&self, start_dim: D1, end_dim: D2) ->... method flatten_to (line 2179) | pub fn flatten_to(&self, end_dim: D) -> Result { method flatten_from (line 2185) | pub fn flatten_from(&self, start_dim: D) -> Result { method flatten_all (line 2198) | pub fn flatten_all(&self) -> Result { method get (line 2213) | pub fn get(&self, i: usize) -> Result { method get_on_dim (line 2235) | pub fn get_on_dim(&self, dim: D, index: usize) -> Result Result { method transpose (line 2265) | pub fn transpose(&self, dim1: D1, dim2: D2) -> Resul... method permute (line 2295) | pub fn permute(&self, dims: D) -> Result { method is_contiguous (line 2321) | pub fn is_contiguous(&self) -> bool { method is_fortran_contiguous (line 2326) | pub fn is_fortran_contiguous(&self) -> bool { method copy (line 2332) | pub fn copy(&self) -> Result { method detach (line 2350) | pub fn detach(&self) -> Tensor { method to_device (line 2368) | pub fn to_device(&self, device: &Device) -> Result { method broadcast_left (line 2411) | pub fn broadcast_left>(&self, left_shape: S) -> Result<... method broadcast_as (line 2425) | pub fn broadcast_as>(&self, shape: S) -> Result { method expand (line 2439) | pub fn expand>(&self, shape: S) -> Result { method to_dtype (line 2453) | pub fn to_dtype(&self, dtype: DType) -> Result { method contiguous (line 2466) | pub fn contiguous(&self) -> Result { method force_contiguous (line 2480) | pub fn force_contiguous(&self) -> Result { method make_var (line 2491) | pub(crate) fn make_var(&self) -> Result { method reshape (line 2523) | pub fn reshape(&self, s: S) -> Result { method squeeze (line 2566) | pub fn squeeze(&self, dim: D) -> Result { method unsqueeze (line 2604) | pub fn unsqueeze(&self, dim: D) -> Result { method stack (line 2642) | pub fn stack, D: Dim>(args: &[A], dim: D) -> Result(&self, dim: D, left: usize, right: usize... method pad_with_same (line 2684) | pub fn pad_with_same(&self, dim: D, left: usize, right: usize)... method apply (line 2723) | pub fn apply(&self, m: &M) -> Result { method apply_t (line 2728) | pub fn apply_t(&self, m: &M, train: bool) -> Result... method storage (line 2732) | pub(crate) fn storage(&self) -> std::sync::RwLockReadGuard<'_, Storage> { method storage_mut (line 2736) | pub(crate) fn storage_mut(&self) -> std::sync::RwLockWriteGuard<'_, St... method storage_mut_and_layout (line 2742) | pub(crate) fn storage_mut_and_layout( method storage_and_layout (line 2750) | pub fn storage_and_layout(&self) -> (std::sync::RwLockReadGuard<'_, St... method same_storage (line 2755) | pub(crate) fn same_storage(&self, rhs: &Self) -> bool { method normalize_axis (line 2763) | pub fn normalize_axis(&self, axis: i64) -> Result { method tril2 (line 2779) | pub fn tril2(n: usize, dtype: DType, device: &Device) -> Result { method triu2 (line 2787) | pub fn triu2(n: usize, dtype: DType, device: &Device) -> Result { method eye (line 2795) | pub fn eye(n: usize, dtype: DType, device: &Device) -> Result { method cumsum (line 2806) | pub fn cumsum(&self, dim: D) -> Result { method slice_assign (line 2826) | pub fn slice_assign>( method log_sum_exp (line 2881) | pub fn log_sum_exp(&self, sum_dims: D) -> Result { method pow (line 2898) | pub fn pow(&self, rhs: &Tensor) -> Result { method broadcast_pow (line 2903) | pub fn broadcast_pow(&self, rhs: &Tensor) -> Result { method flip (line 2918) | pub fn flip(&self, dims: &[usize]) -> Result { method unfold (line 2931) | pub fn unfold(&self, dim: D, size: usize, step: usize) -> Resu... method from (line 3113) | fn from((storage, shape): (Storage, S)) -> Self { function from_storage (line 159) | pub(crate) fn from_storage>( type Output (line 3047) | type Output = Result; function add (line 3049) | fn add(self, rhs: Tensor) -> Self::Output { type Output (line 3055) | type Output = Result; function add (line 3057) | fn add(self, rhs: &Tensor) -> Self::Output { type Output (line 3063) | type Output = Result; function mul (line 3065) | fn mul(self, rhs: Tensor) -> Self::Output { type Output (line 3071) | type Output = Result; function mul (line 3073) | fn mul(self, rhs: &Tensor) -> Self::Output { type Output (line 3079) | type Output = Result; function sub (line 3081) | fn sub(self, rhs: Tensor) -> Self::Output { type Output (line 3087) | type Output = Result; function sub (line 3089) | fn sub(self, rhs: &Tensor) -> Self::Output { type Output (line 3095) | type Output = Result; function div (line 3098) | fn div(self, rhs: Tensor) -> Self::Output { type Output (line 3104) | type Output = Result; function div (line 3107) | fn div(self, rhs: &Tensor) -> Self::Output { FILE: candle-core/src/tensor_cat.rs method cat (line 21) | pub fn cat, D: Dim>(args: &[A], dim: D) -> Result { method cat0 (line 76) | fn cat0>(args: &[A]) -> Result { method cat_contiguous (line 151) | fn cat_contiguous>(args: &[A], dim: usize) -> Result(&self, src: &Self, dim: D, offset: usize) -> Re... FILE: candle-core/src/test_utils.rs function assert_tensor_eq (line 27) | pub fn assert_tensor_eq(t1: &Tensor, t2: &Tensor) -> Result<()> { function to_vec0_round (line 36) | pub fn to_vec0_round(t: &Tensor, digits: i32) -> Result { function to_vec1_round (line 42) | pub fn to_vec1_round(t: &Tensor, digits: i32) -> Result> { function to_vec2_round (line 49) | pub fn to_vec2_round(t: &Tensor, digits: i32) -> Result>> { function to_vec3_round (line 59) | pub fn to_vec3_round(t: &Tensor, digits: i32) -> Result... FILE: candle-core/src/utils.rs function get_num_threads (line 4) | pub fn get_num_threads() -> usize { function has_accelerate (line 15) | pub fn has_accelerate() -> bool { function has_mkl (line 19) | pub fn has_mkl() -> bool { function cuda_is_available (line 23) | pub fn cuda_is_available() -> bool { function metal_is_available (line 27) | pub fn metal_is_available() -> bool { function with_avx (line 31) | pub fn with_avx() -> bool { function with_neon (line 35) | pub fn with_neon() -> bool { function with_simd128 (line 39) | pub fn with_simd128() -> bool { function with_f16c (line 43) | pub fn with_f16c() -> bool { FILE: candle-core/src/variable.rs type Var (line 10) | pub struct Var(Tensor); method fmt (line 13) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { type Target (line 19) | type Target = Tensor; method deref (line 21) | fn deref(&self) -> &Self::Target { method zeros (line 27) | pub fn zeros>(shape: S, dtype: DType, device: &Device) ... method ones (line 32) | pub fn ones>(shape: S, dtype: DType, device: &Device) -... method from_tensor (line 38) | pub fn from_tensor(t: &Tensor) -> Result { method rand_f64 (line 47) | pub fn rand_f64>( method randn_f64 (line 58) | pub fn randn_f64>( method rand (line 69) | pub fn rand, T: crate::FloatDType>( method randn (line 79) | pub fn randn, T: crate::FloatDType>( method new (line 91) | pub fn new(array: A, device: &Device) -> Re... method from_vec (line 97) | pub fn from_vec, D: crate::WithDType>( method from_slice (line 106) | pub fn from_slice, D: crate::WithDType>( method as_detached_tensor (line 115) | pub fn as_detached_tensor(&self) -> Tensor { method as_tensor (line 119) | pub fn as_tensor(&self) -> &Tensor { method into_inner (line 124) | pub fn into_inner(self) -> Tensor { method set (line 130) | pub fn set(&self, src: &Tensor) -> Result<()> { FILE: candle-core/tests/bilinear_tests.rs function bilinear_pytorch_2x_upscale (line 14) | fn bilinear_pytorch_2x_upscale(dev: &Device) -> Result<()> { function bilinear_pytorch_downscale (line 50) | fn bilinear_pytorch_downscale(dev: &Device) -> Result<()> { function bilinear_pytorch_multi_channel (line 82) | fn bilinear_pytorch_multi_channel(dev: &Device) -> Result<()> { function bilinear_pytorch_align_corners_true (line 159) | fn bilinear_pytorch_align_corners_true(dev: &Device) -> Result<()> { function bilinear_pytorch_scale_factor (line 210) | fn bilinear_pytorch_scale_factor(dev: &Device) -> Result<()> { function bilinear_pytorch_non_square_exact (line 237) | fn bilinear_pytorch_non_square_exact(dev: &Device) -> Result<()> { function bilinear_pytorch_tiny_1x1_to_3x3 (line 275) | fn bilinear_pytorch_tiny_1x1_to_3x3(dev: &Device) -> Result<()> { function bilinear_pytorch_tiny_1x2_to_3x6 (line 300) | fn bilinear_pytorch_tiny_1x2_to_3x6(dev: &Device) -> Result<()> { function bilinear_pytorch_large_64x64_to_128x128 (line 334) | fn bilinear_pytorch_large_64x64_to_128x128(dev: &Device) -> Result<()> { function bilinear_output_dimensions (line 373) | fn bilinear_output_dimensions(dev: &Device) -> Result<()> { function bilinear_identity (line 413) | fn bilinear_identity(dev: &Device) -> Result<()> { function bilinear_align_corners_difference (line 423) | fn bilinear_align_corners_difference(dev: &Device) -> Result<()> { FILE: candle-core/tests/conv_tests.rs function conv1d (line 25) | fn conv1d(dev: &Device) -> Result<()> { function conv1d_small (line 98) | fn conv1d_small(dev: &Device) -> Result<()> { function conv2d (line 140) | fn conv2d(dev: &Device) -> Result<()> { function conv2d_small (line 287) | fn conv2d_small(dev: &Device) -> Result<()> { function conv2d_smaller (line 336) | fn conv2d_smaller(dev: &Device) -> Result<()> { function conv2d_non_square (line 366) | fn conv2d_non_square(dev: &Device) -> Result<()> { function conv2d_grad (line 416) | fn conv2d_grad(dev: &Device) -> Result<()> { FILE: candle-core/tests/custom_op_tests.rs function fwd (line 6) | fn fwd(v: T, alpha: f64) -> T { type Elu (line 15) | struct Elu { method name (line 117) | fn name(&self) -> &'static str { method cpu_fwd (line 121) | fn cpu_fwd(&self, s: &mut CpuStorage, _l: &Layout) -> Result<()> { method name (line 20) | fn name(&self) -> &'static str { method cpu_fwd (line 24) | fn cpu_fwd(&self, s: &CpuStorage, l: &Layout) -> Result<(CpuStorage, Sha... function custom_op1_no_backward (line 36) | fn custom_op1_no_backward() -> Result<()> { function bwd (line 49) | fn bwd(v: T, alpha: f64) -> T { type EluBackward (line 58) | struct EluBackward { method name (line 63) | fn name(&self) -> &'static str { method cpu_fwd (line 67) | fn cpu_fwd(&self, s: &CpuStorage, l: &Layout) -> Result<(CpuStorage, Sha... type EluWithBackward (line 78) | struct EluWithBackward(Elu); method new (line 81) | fn new(alpha: f64) -> Self { method name (line 87) | fn name(&self) -> &'static str { method cpu_fwd (line 91) | fn cpu_fwd(&self, s: &CpuStorage, l: &Layout) -> Result<(CpuStorage, Sha... method bwd (line 95) | fn bwd(&self, arg: &Tensor, _res: &Tensor, grad_res: &Tensor) -> Result<... function custom_op1_with_backward (line 103) | fn custom_op1_with_backward() -> Result<()> { function inplace_op1 (line 136) | fn inplace_op1() -> Result<()> { function ug_op (line 151) | fn ug_op() -> Result<()> { FILE: candle-core/tests/display_tests.rs function display_scalar (line 5) | fn display_scalar() -> Result<()> { function display_vector (line 22) | fn display_vector() -> Result<()> { function display_multi_dim (line 51) | fn display_multi_dim() -> Result<()> { FILE: candle-core/tests/grad_tests.rs function simple_grad (line 5) | fn simple_grad(device: &Device) -> Result<()> { function sum_grad (line 19) | fn sum_grad(device: &Device) -> Result<()> { function matmul_grad (line 39) | fn matmul_grad(device: &Device) -> Result<()> { function grad_descent (line 68) | fn grad_descent(device: &Device) -> Result<()> { function unary_grad (line 82) | fn unary_grad(device: &Device) -> Result<()> { function binary_grad (line 466) | fn binary_grad(device: &Device) -> Result<()> { function test_flip_backprop (line 509) | fn test_flip_backprop() -> Result<()> { FILE: candle-core/tests/indexing_tests.rs function integer_index (line 5) | fn integer_index() -> Result<()> { function range_index (line 21) | fn range_index() -> Result<()> { function index_3d (line 76) | fn index_3d() -> Result<()> { function slice_assign (line 96) | fn slice_assign() -> Result<()> { FILE: candle-core/tests/layout_tests.rs function contiguous (line 4) | fn contiguous(device: &Device) -> Result<()> { function strided_blocks (line 55) | fn strided_blocks() -> Result<()> { FILE: candle-core/tests/matmul_tests.rs function matmul (line 3) | fn matmul(device: &Device) -> Result<()> { function matmul_bf16 (line 52) | fn matmul_bf16(device: &Device) -> Result<()> { function broadcast_matmul (line 66) | fn broadcast_matmul(device: &Device) -> Result<()> { function tensor_dot (line 86) | fn tensor_dot() -> Result<()> { function tensor_mv (line 96) | fn tensor_mv() -> Result<()> { function squeeze_mm (line 106) | fn squeeze_mm(device: &Device) -> Result<()> { function mm_layout (line 117) | fn mm_layout(device: &Device) -> Result<()> { FILE: candle-core/tests/pool_tests.rs function avg_pool2d (line 4) | fn avg_pool2d(dev: &Device) -> Result<()> { function max_pool2d (line 21) | fn max_pool2d(dev: &Device) -> Result<()> { function avg_pool2d_pytorch (line 45) | fn avg_pool2d_pytorch(dev: &Device) -> Result<()> { function upsample_nearest2d (line 85) | fn upsample_nearest2d(dev: &Device) -> Result<()> { FILE: candle-core/tests/pth_tests.rs function test_pth (line 3) | fn test_pth() { function test_pth_with_key (line 9) | fn test_pth_with_key() { function test_pth_fortran_contiguous (line 17) | fn test_pth_fortran_contiguous() { FILE: candle-core/tests/quantized_tests.rs constant GGML_TEST_SIZE (line 11) | const GGML_TEST_SIZE: usize = 32 * 128; constant GGML_MAX_QUANTIZATION_TOTAL_ERROR (line 13) | const GGML_MAX_QUANTIZATION_TOTAL_ERROR: f32 = 0.002; constant GGML_MAX_QUANTIZATION_TOTAL_ERROR_2BITS (line 14) | const GGML_MAX_QUANTIZATION_TOTAL_ERROR_2BITS: f32 = 0.0075; constant GGML_MAX_QUANTIZATION_TOTAL_ERROR_3BITS (line 15) | const GGML_MAX_QUANTIZATION_TOTAL_ERROR_3BITS: f32 = 0.0040; constant GGML_MAX_DOT_PRODUCT_ERROR (line 16) | const GGML_MAX_DOT_PRODUCT_ERROR: f32 = 0.02; function test_matmul (line 18) | fn test_matmul( function test_matmul_mm (line 57) | fn test_matmul_mm() -> Result<()> { function quantized_matmul (line 91) | fn quantized_matmul(device: &Device) -> Result<()> { function quantized_matmul_neg (line 151) | fn quantized_matmul_neg(device: &Device) -> Result<()> { function qmm_batch (line 223) | fn qmm_batch(dev: &Device) -> Result<()> { function quantize_q4_0 (line 264) | fn quantize_q4_0(device: &Device) -> Result<()> { function quantize_q4_1 (line 298) | fn quantize_q4_1(device: &Device) -> Result<()> { function quantize_q5_0 (line 331) | fn quantize_q5_0(device: &Device) -> Result<()> { function quantize_q5_1 (line 364) | fn quantize_q5_1(device: &Device) -> Result<()> { function get_test_vector2 (line 395) | fn get_test_vector2(bound: f32, size: usize, device: &Device) -> Result<... function round_vector (line 410) | fn round_vector(values: &[f32]) -> Vec { function compare_with_error (line 417) | fn compare_with_error(values: &[f32], expected: &[f32], tolerance: f32) { function create_ggml_like_vector (line 430) | fn create_ggml_like_vector(offset: f32) -> Vec { function calculate_rmse (line 437) | fn calculate_rmse(a: &[f32], b: &[f32]) -> f32 { function ggml_quantization_error_test (line 450) | fn ggml_quantization_error_test(dtype: GgmlDType, device: &Device, max_e... function imatrix_quantize_q6k (line 474) | fn imatrix_quantize_q6k() -> Result<()> { function imatrix_quantize_q5k (line 512) | fn imatrix_quantize_q5k() -> Result<()> { function imatrix_quantize_q4k (line 550) | fn imatrix_quantize_q4k() -> Result<()> { function imatrix_quantize_q3k (line 595) | fn imatrix_quantize_q3k() -> Result<()> { function imatrix_quantize_q2k (line 633) | fn imatrix_quantize_q2k() -> Result<()> { function quantize_q2k (line 670) | fn quantize_q2k(device: &Device) -> Result<()> { function quantize_q3k (line 718) | fn quantize_q3k(device: &Device) -> Result<()> { function quantize_q4k (line 765) | fn quantize_q4k(device: &Device) -> Result<()> { function quantize_q5k (line 812) | fn quantize_q5k(device: &Device) -> Result<()> { function quantize_q6k (line 859) | fn quantize_q6k(device: &Device) -> Result<()> { function quantize_q8k (line 906) | fn quantize_q8k(device: &Device) -> Result<()> { function vec_dot_reference (line 1015) | fn vec_dot_reference(a: &[f32], b: &[f32]) -> f32 { function ggml_reference_matmul_error (line 1020) | fn ggml_reference_matmul_error(dtype: GgmlDType) -> Result { function ggml_matmul_error_test (line 1045) | fn ggml_matmul_error_test() -> Result<()> { function ggml_matmul_error_test_ (line 1060) | fn ggml_matmul_error_test_(a: &[f32], b: &[f32], err_m: f32... function quantized_mm (line 1113) | fn quantized_mm() -> Result<()> { function get_random_tensors (line 1127) | fn get_random_tensors( function quantized_matmul_q2k (line 1250) | fn quantized_matmul_q2k() -> Result<()> { function quantized_matmul_q3k (line 1276) | fn quantized_matmul_q3k() -> Result<()> { function quantized_matmul_q4k (line 1302) | fn quantized_matmul_q4k() -> Result<()> { function quantized_matmul_q5k (line 1328) | fn quantized_matmul_q5k() -> Result<()> { function quantized_matmul_q6k (line 1355) | fn quantized_matmul_q6k() -> Result<()> { function quantized_matmul_q8k (line 1380) | fn quantized_matmul_q8k() -> Result<()> { FILE: candle-core/tests/serialization_tests.rs type TmpFile (line 3) | struct TmpFile(std::path::PathBuf); method create (line 6) | fn create(base: &str) -> TmpFile { method as_ref (line 18) | fn as_ref(&self) -> &std::path::Path { method drop (line 24) | fn drop(&mut self) { function npy (line 30) | fn npy() -> Result<()> { function npz (line 40) | fn npz() -> Result<()> { function safetensors (line 53) | fn safetensors() -> Result<()> { FILE: candle-core/tests/tensor_tests.rs function zeros (line 4) | fn zeros(device: &Device) -> Result<()> { function ones (line 12) | fn ones(device: &Device) -> Result<()> { function full (line 86) | fn full(device: &Device) -> Result<()> { function const_set (line 106) | fn const_set(device: &Device) -> Result<()> { function arange (line 114) | fn arange(device: &Device) -> Result<()> { function add_mul (line 152) | fn add_mul(device: &Device) -> Result<()> { function tensor_2d (line 167) | fn tensor_2d(device: &Device) -> Result<()> { function clamp (line 177) | fn clamp(device: &Device) -> Result<()> { function asort (line 188) | fn asort(device: &Device) -> Result<()> { function asort_big (line 223) | fn asort_big(device: &Device) -> Result<()> { function unary_op (line 242) | fn unary_op(device: &Device) -> Result<()> { function binary_op (line 321) | fn binary_op(device: &Device) -> Result<()> { function ternary_op (line 350) | fn ternary_op(device: &Device) -> Result<()> { function transpose (line 365) | fn transpose(device: &Device) -> Result<()> { function var (line 380) | fn var(device: &Device) -> Result<()> { function sum (line 396) | fn sum(device: &Device) -> Result<()> { function min (line 493) | fn min(device: &Device) -> Result<()> { function max (line 555) | fn max(device: &Device) -> Result<()> { function argmin (line 617) | fn argmin(device: &Device) -> Result<()> { function argmax (line 691) | fn argmax(device: &Device) -> Result<()> { function narrow (line 765) | fn narrow(device: &Device) -> Result<()> { function broadcast (line 795) | fn broadcast(device: &Device) -> Result<()> { function slice_set (line 805) | fn slice_set(device: &Device) -> Result<()> { function cat (line 831) | fn cat(device: &Device) -> Result<()> { function embeddings (line 911) | fn embeddings(device: &Device) -> Result<()> { function index_select_fail (line 927) | fn index_select_fail() -> Result<()> { function cmp (line 951) | fn cmp(device: &Device) -> Result<()> { function index_select (line 963) | fn index_select(device: &Device) -> Result<()> { function index_add (line 1020) | fn index_add(device: &Device) -> Result<()> { function slice_scatter (line 1063) | fn slice_scatter(device: &Device) -> Result<()> { function scatter (line 1105) | fn scatter(device: &Device) -> Result<()> { function gather (line 1206) | fn gather(device: &Device) -> Result<()> { function broadcasting (line 1529) | fn broadcasting(device: &Device) -> Result<()> { function randn (line 1630) | fn randn(device: &Device) -> Result<()> { function zero_dim (line 1663) | fn zero_dim(device: &Device) -> Result<()> { function tensor_send_sync (line 1734) | fn tensor_send_sync(device: &Device) -> Result<()> { function randn_hasneg (line 1773) | fn randn_hasneg() -> Result<()> { function pad_with_same (line 1782) | fn pad_with_same() -> Result<()> { function i64_abs (line 1798) | fn i64_abs() -> Result<()> { function tril_triu_eye (line 1806) | fn tril_triu_eye() -> Result<()> { function cumsum (line 1841) | fn cumsum() -> Result<()> { function assert_close (line 1869) | fn assert_close(a: &Tensor, b: &Tensor, epsilon: f64) -> Result<()> { function log_sum_exp (line 1881) | fn log_sum_exp() -> Result<()> { function pow (line 1909) | fn pow() -> Result<()> { function test_flip_1d (line 1921) | fn test_flip_1d() -> Result<()> { function test_flip_2d (line 1932) | fn test_flip_2d() -> Result<()> { function test_flip_3d_channels (line 1947) | fn test_flip_3d_channels() -> Result<()> { function tensor_new (line 1972) | fn tensor_new() -> Result<()> { function tensor_norm (line 1995) | fn tensor_norm() -> Result<()> { function transfers_cuda_to_device (line 2004) | fn transfers_cuda_to_device() -> Result<()> { function allocates_twice_when_transferring_to_same_device (line 2031) | fn allocates_twice_when_transferring_to_same_device() -> Result<()> { FILE: candle-datasets/src/batcher.rs type Batcher (line 3) | pub struct Batcher { function new (line 10) | fn new(inner: I) -> Self { function batch_size (line 18) | pub fn batch_size(mut self, batch_size: usize) -> Self { function return_last_incomplete_batch (line 23) | pub fn return_last_incomplete_batch(mut self, r: bool) -> Self { type Iter1 (line 29) | pub struct Iter1> { type Iter2 (line 33) | pub struct Iter2> { function new1 (line 38) | pub fn new1(inner: I) -> Self { function new2 (line 44) | pub fn new2(inner: I) -> Self { type IterResult1 (line 49) | pub struct IterResult1>> { type IterResult2 (line 53) | pub struct IterResult2>> { function new_r1 (line 58) | pub fn new_r1(inner: I) -> Self { function new_r2 (line 64) | pub fn new_r2(inner: I) -> Self { type Item (line 70) | type Item = Result; method next (line 72) | fn next(&mut self) -> Option { type Item (line 93) | type Item = Result<(Tensor, Tensor)>; method next (line 95) | fn next(&mut self) -> Option { type Item (line 119) | type Item = Result; method next (line 121) | fn next(&mut self) -> Option { type Item (line 143) | type Item = Result<(Tensor, Tensor)>; method next (line 145) | fn next(&mut self) -> Option { FILE: candle-datasets/src/hub.rs type Error (line 29) | pub enum Error { function sibling_to_parquet (line 40) | fn sibling_to_parquet( function from_hub (line 61) | pub fn from_hub(api: &Api, dataset_id: String) -> Result>(dir: P) -> Result { method train_tokens (line 43) | pub fn train_tokens(&self) -> usize { method valid_tokens (line 47) | pub fn valid_tokens(&self) -> usize { function mmap_file (line 10) | fn mmap_file(p: &std::path::PathBuf) -> Result { type DatasetRandomIter (line 52) | pub struct DatasetRandomIter<'a> { function new (line 62) | pub fn new(ds: &'a Dataset, valid: bool, seq_len: usize, device: Device)... type Item (line 91) | type Item = Result<(Tensor, Tensor)>; method next (line 93) | fn next(&mut self) -> Option { FILE: candle-datasets/src/vision/cifar.rs constant W (line 13) | const W: usize = 32; constant H (line 14) | const H: usize = 32; constant C (line 15) | const C: usize = 3; constant BYTES_PER_IMAGE (line 16) | const BYTES_PER_IMAGE: usize = W * H * C + 1; constant SAMPLES_PER_FILE (line 17) | const SAMPLES_PER_FILE: usize = 10000; function read_file (line 19) | fn read_file(filename: &std::path::Path) -> Result<(Tensor, Tensor)> { function load_dir (line 42) | pub fn load_dir>(dir: T) -> Result { function load_parquet (line 66) | fn load_parquet(parquet: SerializedFileReader) -> Result<... function load (line 95) | pub fn load() -> Result { FILE: candle-datasets/src/vision/fashion_mnist.rs function load (line 7) | pub fn load() -> Result { FILE: candle-datasets/src/vision/mnist.rs function read_u32 (line 11) | fn read_u32(reader: &mut T) -> std::io::Result { function check_magic_number (line 16) | fn check_magic_number(reader: &mut T, expected: u32) -> Result<... function read_labels (line 26) | fn read_labels(filename: &std::path::Path) -> Result { function read_images (line 36) | fn read_images(filename: &std::path::Path) -> Result { function load_dir (line 49) | pub fn load_dir>(dir: T) -> Result) -> Result<... function load_mnist_like (line 89) | pub(crate) fn load_mnist_like( function load (line 123) | pub fn load() -> Result { FILE: candle-datasets/src/vision/mod.rs type Dataset (line 3) | pub struct Dataset { FILE: candle-examples/build.rs type KernelDirectories (line 5) | struct KernelDirectories { constant KERNEL_DIRS (line 10) | const KERNEL_DIRS: [KernelDirectories; 1] = [KernelDirectories { function main (line 15) | fn main() { FILE: candle-examples/buildtime_downloader.rs function download_model (line 4) | pub fn download_model(model_and_revision: &str) -> Result<()> { FILE: candle-examples/examples/based/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 30) | fn new( method run (line 51) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 117) | enum Which { type Args (line 128) | struct Args { function main (line 183) | fn main() -> Result<()> { FILE: candle-examples/examples/beit/main.rs function load_image384_beit_norm (line 18) | pub fn load_image384_beit_norm>(p: P) -> Resul... type Args (line 34) | struct Args { function main (line 46) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/bert/main.rs type Args (line 17) | struct Args { method build_model_and_tokenizer (line 59) | fn build_model_and_tokenizer(&self) -> Result<(BertModel, Tokenizer)> { function main (line 100) | fn main() -> Result<()> { function normalize_l2 (line 227) | pub fn normalize_l2(v: &Tensor) -> Result { FILE: candle-examples/examples/bert_single_file_binary/main.rs type Args (line 16) | struct Args { function main (line 46) | fn main() -> Result<()> { function build_model_and_tokenizer_from_bytes (line 177) | pub fn build_model_and_tokenizer_from_bytes(device: &Device) -> Result<(... function init_model_and_tokenizer (line 190) | pub fn init_model_and_tokenizer( function normalize_l2 (line 210) | pub fn normalize_l2(v: &Tensor) -> Result { FILE: candle-examples/examples/bigcode/main.rs type TextGeneration (line 18) | struct TextGeneration { method new (line 26) | fn new( method run (line 43) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 86) | struct Args { function main (line 120) | fn main() -> Result<()> { FILE: candle-examples/examples/blip/main.rs type Model (line 18) | enum Model { method text_decoder_forward (line 24) | fn text_decoder_forward(&mut self, xs: &Tensor, img_xs: &Tensor) -> Re... type Args (line 34) | struct Args { constant SEP_TOKEN_ID (line 53) | const SEP_TOKEN_ID: u32 = 102; function load_image (line 57) | pub fn load_image>(p: P) -> Result { function main (line 74) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/chatglm/main.rs type TextGeneration (line 18) | struct TextGeneration { method new (line 30) | fn new( method run (line 53) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 113) | struct Args { function main (line 166) | fn main() -> Result<()> { FILE: candle-examples/examples/chinese_clip/main.rs type Args (line 14) | struct Args { function main (line 31) | fn main() -> anyhow::Result<()> { function load_weights (line 80) | pub fn load_weights(model: Option, device: &Device) -> anyhow::R... function load_tokenizer (line 98) | pub fn load_tokenizer() -> anyhow::Result { function tokenize_sequences (line 113) | pub fn tokenize_sequences( function load_images (line 178) | pub fn load_images( function load_image (line 201) | fn load_image>( FILE: candle-examples/examples/clip/main.rs type Args (line 17) | struct Args { function load_image (line 34) | fn load_image>(path: T, image_size: usize) -> ... function load_images (line 51) | fn load_images>( function main (line 64) | pub fn main() -> anyhow::Result<()> { function get_tokenizer (line 117) | pub fn get_tokenizer(tokenizer: Option) -> anyhow::Result anyhow::Result<(... type Args (line 124) | struct Args { function main (line 176) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/colpali/main.rs type PageRetriever (line 12) | struct PageRetriever { method new (line 24) | fn new( method get_images_from_pdf (line 47) | fn get_images_from_pdf(&self) -> Result> { method tokenize_batch (line 54) | fn tokenize_batch(&self, prompts: Vec<&str>) -> Result { method images_to_tensor (line 67) | fn images_to_tensor( method retrieve (line 91) | fn retrieve(&mut self, prompt: &str) -> Result> { type Args (line 140) | struct Args { function main (line 178) | fn main() -> Result<()> { FILE: candle-examples/examples/convmixer/main.rs type Args (line 14) | struct Args { function main (line 26) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/convnext/main.rs type Which (line 14) | enum Which { method model_filename (line 35) | fn model_filename(&self) -> String { method config (line 59) | fn config(&self) -> convnext::Config { type Args (line 76) | struct Args { function main (line 91) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/csm/main.rs type Which (line 18) | enum Which { type Args (line 25) | struct Args { function main (line 101) | fn main() -> Result<()> { FILE: candle-examples/examples/custom-ops/cuda_kernels.rs constant LAYERNORM_KERNELS (line 1) | pub const LAYERNORM_KERNELS: &str = include_str!(concat!(env!("OUT_DIR")... FILE: candle-examples/examples/custom-ops/main.rs type Args (line 21) | struct Args { type LayerNorm (line 27) | struct LayerNorm { method name (line 32) | fn name(&self) -> &'static str { method cpu_fwd (line 36) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(CpuS... method cuda_fwd (line 55) | fn cuda_fwd( function main (line 92) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/debertav2/main.rs type TaskType (line 22) | enum TaskType { type ArgsTask (line 28) | enum ArgsTask { method fmt (line 37) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Args (line 50) | struct Args { method build_model_and_tokenizer (line 94) | fn build_model_and_tokenizer( function get_device (line 190) | fn get_device(model_type: &TaskType) -> &Device { type ModelInput (line 197) | struct ModelInput { function main (line 204) | fn main() -> Result<()> { function create_benchmark (line 353) | fn create_benchmark( FILE: candle-examples/examples/deepseekv2/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 30) | fn new( method run (line 66) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 132) | enum Which { type Args (line 147) | struct Args { function main (line 201) | fn main() -> Result<()> { FILE: candle-examples/examples/depth_anything_v2/color_map.rs type SpectralRColormap (line 7) | pub struct SpectralRColormap { method new (line 12) | pub(crate) fn new() -> Self { method get_color (line 29) | fn get_color(&self, value: f32) -> LinSrgb { method gray2color (line 33) | pub fn gray2color(&self, gray: &Tensor) -> candle::Result { FILE: candle-examples/examples/depth_anything_v2/main.rs constant MAGIC_MEAN (line 24) | const MAGIC_MEAN: [f32; 3] = [0.485, 0.456, 0.406]; constant MAGIC_STD (line 25) | const MAGIC_STD: [f32; 3] = [0.229, 0.224, 0.225]; constant DINO_IMG_SIZE (line 27) | const DINO_IMG_SIZE: usize = 518; type Args (line 30) | struct Args { function main (line 50) | pub fn main() -> anyhow::Result<()> { function full_output_path (line 102) | fn full_output_path(image_path: &PathBuf, output_dir: &Option) ... function load_and_prep_image (line 115) | fn load_and_prep_image( function normalize_image (line 135) | fn normalize_image(image: &Tensor, mean: &[f32; 3], std: &[f32; 3]) -> R... function post_process_image (line 143) | fn post_process_image( function scale_image (line 168) | fn scale_image(depth: &Tensor) -> Result { FILE: candle-examples/examples/dinov2/main.rs type Args (line 17) | struct Args { function main (line 29) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/dinov2reg4/main.rs type Args (line 19) | struct Args { function main (line 31) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/distilbert/main.rs type ModelType (line 18) | enum ModelType { method device (line 24) | fn device(&self) -> &Device { method forward (line 31) | fn forward(&self, input_ids: &Tensor, attention_mask: &Tensor) -> Resu... type Which (line 40) | enum Which { type Args (line 50) | struct Args { method build_model_and_tokenizer (line 88) | fn build_model_and_tokenizer(&self) -> Result<(ModelType, Tokenizer)> { method resolve_model_and_revision (line 105) | fn resolve_model_and_revision(&self) -> (String, String) { method download_model_files (line 117) | fn download_model_files( method load_variables (line 137) | fn load_variables(&self, weights_path: &PathBuf, device: &Device) -> R... method create_model (line 145) | fn create_model(&self, config: &Config, vb: VarBuilder) -> Result Result<()> { function setup_tracing (line 172) | fn setup_tracing(args: &Args) -> Option { function prepare_inputs (line 186) | fn prepare_inputs(args: &Args, tokenizer: &Tokenizer, device: &Device) -... function process_output (line 211) | fn process_output( function process_masked_output (line 231) | fn process_masked_output( function get_top_k (line 270) | fn get_top_k(tensor: &Tensor, k: usize) -> Result<(Tensor, Tensor)> { function attention_mask (line 297) | fn attention_mask(size: usize, device: &Device) -> Result { function attention_mask_maskedlm (line 304) | fn attention_mask_maskedlm(tokenizer: &Tokenizer, input: &str, device: &... FILE: candle-examples/examples/efficientnet/main.rs type Which (line 17) | enum Which { type Args (line 29) | struct Args { function main (line 45) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/efficientvit/main.rs type Which (line 14) | enum Which { method model_filename (line 24) | fn model_filename(&self) -> String { method config (line 36) | fn config(&self) -> efficientvit::Config { type Args (line 49) | struct Args { function main (line 64) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/encodec/audio_io.rs constant SAMPLE_RATE (line 4) | pub const SAMPLE_RATE: usize = 24_000; type AudioOutputData_ (line 6) | pub(crate) struct AudioOutputData_ { method new (line 15) | pub(crate) fn new(input_sample_rate: usize, output_sample_rate: usize)... method reset (line 38) | pub fn reset(&mut self) { method take_all (line 46) | pub(crate) fn take_all(&mut self) -> Vec { method is_empty (line 54) | pub(crate) fn is_empty(&self) -> bool { method push_input_buffer (line 59) | fn push_input_buffer(&mut self, samples: &[f32]) { method push_samples (line 64) | pub(crate) fn push_samples(&mut self, samples: &[f32]) -> Result<()> { type AudioOutputData (line 90) | type AudioOutputData = Arc>; function setup_output_stream (line 92) | pub(crate) fn setup_output_stream() -> Result<(cpal::Stream, AudioOutput... function setup_input_stream (line 152) | pub(crate) fn setup_input_stream() -> Result<(cpal::Stream, AudioOutputD... function conv (line 194) | fn conv(samples: &mut Vec, data: std::borrow::Cow>(path: P) -> Result<(... function resample (line 248) | pub(crate) fn resample(pcm_in: &[f32], sr_in: usize, sr_out: usize) -> R... FILE: candle-examples/examples/encodec/main.rs type Action (line 17) | enum Action { type Args (line 25) | struct Args { function main (line 44) | fn main() -> Result<()> { FILE: candle-examples/examples/eva2/main.rs function load_image448_openai_norm (line 18) | pub fn load_image448_openai_norm>(p: P) -> Res... type Args (line 36) | struct Args { function main (line 48) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/falcon/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 36) | fn new( method run (line 57) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type GenerationOptions (line 28) | struct GenerationOptions { type Args (line 113) | struct Args { function main (line 156) | fn main() -> Result<()> { FILE: candle-examples/examples/fastvit/main.rs type Which (line 14) | enum Which { method model_filename (line 25) | fn model_filename(&self) -> String { method config (line 38) | fn config(&self) -> fastvit::Config { type Args (line 52) | struct Args { function main (line 67) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/flux/main.rs type Args (line 17) | struct Args { type Model (line 58) | enum Model { function run (line 63) | fn run(args: Args) -> Result<()> { function main (line 261) | fn main() -> Result<()> { FILE: candle-examples/examples/gemma/main.rs type Which (line 22) | enum Which { type Model (line 57) | enum Model { method forward (line 64) | fn forward(&mut self, input_ids: &Tensor, pos: usize) -> candle::Resul... type TextGeneration (line 73) | struct TextGeneration { method new (line 84) | fn new( method run (line 105) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 183) | struct Args { function main (line 242) | fn main() -> Result<()> { FILE: candle-examples/examples/gguf-tokenizer.rs type Args (line 15) | struct Args { function main (line 27) | fn main() -> Result<()> { function resolve_model_path (line 66) | fn resolve_model_path(model: &str, revision: Option) -> Result candle::Resul... type Which (line 26) | enum Which { type TextGeneration (line 33) | struct TextGeneration { method new (line 44) | fn new( method run (line 63) | fn run(&mut self) -> anyhow::Result<()> { type Args (line 141) | struct Args { function main (line 201) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/granite/main.rs constant EOS_TOKEN (line 23) | const EOS_TOKEN: &str = ""; constant DEFAULT_PROMPT (line 24) | const DEFAULT_PROMPT: &str = "How Fault Tolerant Quantum Computers will ... type GraniteModel (line 27) | enum GraniteModel { type Args (line 33) | struct Args { function main (line 95) | fn main() -> Result<()> { FILE: candle-examples/examples/granitemoehybrid/main.rs constant EOS_TOKEN_ID (line 25) | const EOS_TOKEN_ID: u32 = 100257; constant DEFAULT_PROMPT (line 26) | const DEFAULT_PROMPT: &str = "How Fault Tolerant Quantum Computers will ... constant DEFAULT_MODEL_ID (line 27) | const DEFAULT_MODEL_ID: &str = "ibm-granite/granite-4.0-micro"; function build_chat_prompt (line 29) | fn build_chat_prompt(user_prompt: &str) -> String { function init_tracing (line 35) | fn init_tracing(enable: bool) { type Args (line 45) | struct Args { function main (line 105) | fn main() -> Result<()> { function create_logits_processor (line 258) | fn create_logits_processor( FILE: candle-examples/examples/gte-qwen/main.rs constant EOS_TOKEN (line 21) | const EOS_TOKEN: &str = "<|endoftext|>"; constant EOS_TOKEN_ID (line 22) | const EOS_TOKEN_ID: u32 = 151643; type Args (line 26) | struct Args { type ConfigFiles (line 46) | struct ConfigFiles { function load_from_hub (line 53) | fn load_from_hub(model_id: &str, revision: &str) -> Result { function load_from_local (line 68) | fn load_from_local(local_path: &str) -> Result { function main (line 96) | fn main() -> Result<()> { FILE: candle-examples/examples/helium/main.rs type Model (line 23) | enum Model { method forward (line 29) | fn forward(&mut self, input: &Tensor, start_pos: usize) -> Result Option { method eos_token_id (line 52) | fn eos_token_id(&self) -> Option { type TextGeneration (line 60) | struct TextGeneration { method new (line 72) | fn new( method run (line 110) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 180) | enum Which { type Args (line 189) | struct Args { function main (line 249) | fn main() -> Result<()> { FILE: candle-examples/examples/hiera/main.rs type Which (line 14) | enum Which { method model_filename (line 24) | fn model_filename(&self) -> String { method config (line 36) | fn config(&self) -> hiera::Config { type Args (line 49) | struct Args { function main (line 64) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/jina-bert/main.rs type Args (line 16) | struct Args { method build_model_and_tokenizer (line 48) | fn build_model_and_tokenizer(&self) -> anyhow::Result<(BertModel, toke... function main (line 89) | fn main() -> anyhow::Result<()> { function normalize_l2 (line 199) | pub fn normalize_l2(v: &Tensor) -> candle::Result { FILE: candle-examples/examples/llama/main.rs constant EOS_TOKEN (line 27) | const EOS_TOKEN: &str = ""; constant DEFAULT_PROMPT (line 28) | const DEFAULT_PROMPT: &str = "My favorite theorem is "; type Which (line 31) | enum Which { type Args (line 62) | struct Args { function main (line 125) | fn main() -> Result<()> { FILE: candle-examples/examples/llama2-c/main.rs type InferenceCmd (line 27) | struct InferenceCmd { type EvaluationCmd (line 54) | struct EvaluationCmd { type TrainingCmd (line 78) | pub struct TrainingCmd { type Task (line 92) | enum Task { type Args (line 100) | pub struct Args { method tokenizer (line 123) | fn tokenizer(&self) -> Result { function main (line 136) | fn main() -> anyhow::Result<()> { type Model (line 157) | enum Model { method forward (line 163) | fn forward(&self, xs: &Tensor, pos: usize, cache: &mut Cache) -> anyho... function run_eval (line 171) | fn run_eval(args: &EvaluationCmd, common_args: &Args) -> Result<()> { function run_inference (line 245) | fn run_inference(args: &InferenceCmd, common_args: &Args) -> Result<()> { FILE: candle-examples/examples/llama2-c/training.rs function valid_loss (line 6) | fn valid_loss( function run (line 27) | pub fn run(args: &crate::TrainingCmd, common_args: &crate::Args) -> Resu... FILE: candle-examples/examples/llama_multiprocess/main.rs constant MAX_SEQ_LEN (line 27) | const MAX_SEQ_LEN: usize = 4096; constant DEFAULT_PROMPT (line 28) | const DEFAULT_PROMPT: &str = "My favorite theorem is "; type Which (line 31) | enum Which { type Args (line 40) | struct Args { function main (line 87) | fn main() -> Result<()> { FILE: candle-examples/examples/llama_multiprocess/model.rs type Config (line 11) | pub type Config = candle_transformers::models::llama::LlamaConfig; type TensorParallelColumnLinear (line 13) | struct TensorParallelColumnLinear { method new (line 18) | fn new(linear: Linear) -> Self { method forward (line 21) | fn forward(&self, x: &Tensor) -> Result { method load (line 111) | fn load(vb: VarBuilder, comm: Rc) -> Result { method load_multi (line 118) | fn load_multi(vb: VarBuilder, prefixes: &[&str], comm: Rc) -> Re... type TensorParallelRowLinear (line 26) | struct TensorParallelRowLinear { method new (line 93) | fn new(linear: Linear, comm: Rc) -> Self { method forward (line 97) | fn forward(&self, x: &Tensor) -> Result { method load (line 131) | fn load(vb: VarBuilder, comm: Rc) -> Result { type AllReduce (line 31) | struct AllReduce { method name (line 41) | fn name(&self) -> &'static str { method cpu_fwd (line 45) | fn cpu_fwd(&self, _s: &CpuStorage, _l: &Layout) -> Result<(CpuStorage, S... method cuda_fwd (line 50) | fn cuda_fwd( function shard (line 102) | fn shard(dim: usize, rank: usize, world_size: usize) -> candle_nn::var_b... type Cache (line 140) | pub struct Cache { method new (line 148) | pub fn new(dtype: DType, config: &Config, device: &Device) -> Result Result { function linear (line 176) | fn linear(size1: usize, size2: usize, vb: VarBuilder) -> Result { function embedding (line 181) | fn embedding(cfg: &Config, vb: VarBuilder) -> Result { type CausalSelfAttention (line 186) | struct CausalSelfAttention { method apply_rotary_emb (line 196) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize) -> Result R... method repeat_kv (line 271) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 276) | fn load(vb: VarBuilder, cache: &Cache, cfg: &Config, comm: Rc) -... type Mlp (line 294) | struct Mlp { method forward (line 301) | fn forward(&self, x: &Tensor) -> Result { method load (line 306) | fn load(vb: VarBuilder, _cfg: &Config, comm: Rc) -> Result { type Block (line 318) | struct Block { method new (line 331) | fn new(rms_1: RmsNorm, attn: CausalSelfAttention, rms_2: RmsNorm, mlp:... method forward (line 340) | fn forward(&self, x: &Tensor, index_pos: usize, block_idx: usize) -> R... method load (line 349) | fn load(vb: VarBuilder, cache: &Cache, cfg: &Config, comm: Rc) -... function rms_norm (line 325) | fn rms_norm(size: usize, eps: f64, vb: VarBuilder) -> Result { type Llama (line 364) | pub struct Llama { method new (line 372) | fn new(wte: Embedding, blocks: Vec, ln_f: RmsNorm, lm_head: Lin... method forward (line 381) | pub fn forward(&self, x: &Tensor, index_pos: usize) -> Result { method load (line 393) | pub fn load(vb: VarBuilder, cache: &Cache, cfg: &Config, comm: Rc Self { method conv_llava_v1 (line 53) | pub fn conv_llava_v1() -> Self { method append_message (line 68) | pub fn append_message(&mut self, role: String, message: Option<&str>) { method append_user_message (line 72) | pub fn append_user_message(&mut self, message: Option<&str>) { method append_assistant_message (line 76) | pub fn append_assistant_message(&mut self, message: Option<&str>) { method get_prompt (line 80) | pub fn get_prompt(&self) -> String { FILE: candle-examples/examples/llava/image_processor.rs type ImageProcessor (line 15) | pub struct ImageProcessor { method from_pretrained (line 75) | pub fn from_pretrained(clip_id: &str) -> Result { method from_hf_preprocessor_config (line 87) | pub fn from_hf_preprocessor_config(hf_preprocessor_config: &HFPreProce... method resize (line 102) | pub fn resize(&self, image: &DynamicImage) -> DynamicImage { method center_crop (line 127) | pub fn center_crop(&self, image: &DynamicImage) -> DynamicImage { method to_tensor (line 134) | pub fn to_tensor(&self, image: &DynamicImage) -> Result { method rescale (line 141) | pub fn rescale(&self, tensor: &Tensor) -> Result { method normalize (line 146) | pub fn normalize(&self, tensor: &Tensor) -> Result { method to_channel_dimension_format (line 154) | pub fn to_channel_dimension_format(&self, tensor: &Tensor) -> Result Result { function default_size (line 38) | fn default_size() -> u32 { function default_do_resize (line 42) | fn default_do_resize() -> bool { function default_do_center_crop (line 46) | fn default_do_center_crop() -> bool { function default_crop_size (line 50) | fn default_crop_size() -> u32 { function default_do_rescale (line 54) | fn default_do_rescale() -> bool { function default_rescale_factor (line 58) | fn default_rescale_factor() -> f32 { function default_do_normalize (line 62) | fn default_do_normalize() -> bool { function default_image_mean (line 66) | fn default_image_mean() -> Vec { function default_image_std (line 70) | fn default_image_std() -> Vec { function calculate_middle (line 184) | pub fn calculate_middle(image_size: (u32, u32), center_size: (u32, u32))... function process_image (line 200) | pub fn process_image( function process_pad_image (line 216) | fn process_pad_image(image: &DynamicImage, processor: &ImageProcessor) -... function process_anyres_image (line 227) | fn process_anyres_image( function expand2square (line 251) | fn expand2square(image: &DynamicImage, background_color: Rgb) -> Dyn... function resize_and_pad_image (line 270) | fn resize_and_pad_image(image: &DynamicImage, target_resolution: (u32, u... function divide_to_patches (line 307) | fn divide_to_patches(image: &DynamicImage, patch_size: u32) -> Vec>( function get_model_name_from_path (line 65) | fn get_model_name_from_path(model_path: &str) -> String { function duplicate_vec (line 82) | fn duplicate_vec(vec: &[T], n: usize) -> Vec function insert_separator (line 93) | fn insert_separator(x: Vec>, sep: Vec) -> Vec> function tokenizer_image_token (line 108) | fn tokenizer_image_token( function main (line 149) | fn main() -> Result<()> { FILE: candle-examples/examples/mamba-minimal/main.rs type TextGeneration (line 20) | struct TextGeneration { method new (line 31) | fn new( method run (line 52) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 115) | enum Which { method fmt (line 125) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method model_id (line 131) | fn model_id(&self) -> &'static str { method revision (line 142) | fn revision(&self) -> &'static str { type Args (line 156) | struct Args { function main (line 211) | fn main() -> Result<()> { FILE: candle-examples/examples/mamba-minimal/model.rs type Config (line 10) | pub struct Config { method vocab_size (line 18) | fn vocab_size(&self) -> usize { method dt_rank (line 23) | fn dt_rank(&self) -> usize { method d_conv (line 27) | fn d_conv(&self) -> usize { method d_state (line 31) | fn d_state(&self) -> usize { method d_inner (line 35) | fn d_inner(&self) -> usize { type MambaBlock (line 42) | pub struct MambaBlock { method new (line 54) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method ssm (line 83) | fn ssm(&self, xs: &Tensor) -> Result { function selective_scan (line 100) | fn selective_scan( method forward (line 128) | fn forward(&self, xs: &Tensor) -> Result { type ResidualBlock (line 145) | pub struct ResidualBlock { method new (line 151) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 159) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 166) | pub struct Model { method new (line 174) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 194) | fn forward(&self, input_ids: &Tensor) -> Result { FILE: candle-examples/examples/mamba/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 31) | fn new( method run (line 54) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 127) | enum Which { method fmt (line 137) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method model_id (line 143) | fn model_id(&self) -> &'static str { method revision (line 154) | fn revision(&self) -> &'static str { type Args (line 168) | struct Args { function main (line 226) | fn main() -> Result<()> { FILE: candle-examples/examples/mamba2/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 33) | fn new( method run (line 60) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 156) | enum Which { method fmt (line 165) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method model_id (line 171) | fn model_id(&self) -> &'static str { type Args (line 184) | struct Args { function main (line 247) | fn main() -> Result<()> { FILE: candle-examples/examples/marian-mt/main.rs type Which (line 18) | enum Which { type LanguagePair (line 24) | enum LanguagePair { type Args (line 41) | struct Args { function main (line 72) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/marian-mt/python/convert_slow_tokenizer.py class MarianConverter (line 7) | class MarianConverter(SpmConverter): method __init__ (line 8) | def __init__(self, *args, index: int = 0): method vocab (line 37) | def vocab(self, proto): FILE: candle-examples/examples/metavoice/main.rs constant ENCODEC_NTOKENS (line 21) | pub const ENCODEC_NTOKENS: u32 = 1024; type ArgDType (line 24) | enum ArgDType { type Transformer (line 30) | enum Transformer { type Args (line 37) | struct Args { function main (line 92) | fn main() -> Result<()> { FILE: candle-examples/examples/mimi/audio_io.rs constant SAMPLE_RATE (line 4) | pub const SAMPLE_RATE: usize = 24_000; type AudioOutputData_ (line 6) | pub(crate) struct AudioOutputData_ { method new (line 15) | pub(crate) fn new(input_sample_rate: usize, output_sample_rate: usize)... method reset (line 38) | pub fn reset(&mut self) { method take_all (line 46) | pub(crate) fn take_all(&mut self) -> Vec { method is_empty (line 54) | pub(crate) fn is_empty(&self) -> bool { method push_input_buffer (line 59) | fn push_input_buffer(&mut self, samples: &[f32]) { method push_samples (line 64) | pub(crate) fn push_samples(&mut self, samples: &[f32]) -> Result<()> { type AudioOutputData (line 90) | type AudioOutputData = Arc>; function setup_output_stream (line 92) | pub(crate) fn setup_output_stream() -> Result<(cpal::Stream, AudioOutput... function setup_input_stream (line 152) | pub(crate) fn setup_input_stream() -> Result<(cpal::Stream, AudioOutputD... function conv (line 194) | fn conv(samples: &mut Vec, data: std::borrow::Cow>(path: P) -> Result<(... function resample (line 248) | pub(crate) fn resample(pcm_in: &[f32], sr_in: usize, sr_out: usize) -> R... FILE: candle-examples/examples/mimi/main.rs type Action (line 17) | enum Action { type Args (line 25) | struct Args { function main (line 49) | fn main() -> Result<()> { FILE: candle-examples/examples/mistral/main.rs type Model (line 20) | enum Model { type TextGeneration (line 25) | struct TextGeneration { method new (line 36) | fn new( method run (line 72) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 141) | enum Which { type Args (line 160) | struct Args { function main (line 230) | fn main() -> Result<()> { FILE: candle-examples/examples/mixtral/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 30) | fn new( method run (line 51) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 118) | struct Args { function main (line 170) | fn main() -> Result<()> { FILE: candle-examples/examples/mnist-training/main.rs constant IMAGE_DIM (line 15) | const IMAGE_DIM: usize = 784; constant LABELS (line 16) | const LABELS: usize = 10; function linear_z (line 18) | fn linear_z(in_dim: usize, out_dim: usize, vs: VarBuilder) -> Result Result; method forward (line 26) | fn forward(&self, xs: &Tensor) -> Result; method new (line 34) | fn new(vs: VarBuilder) -> Result { method forward (line 39) | fn forward(&self, xs: &Tensor) -> Result { method new (line 50) | fn new(vs: VarBuilder) -> Result { method forward (line 56) | fn forward(&self, xs: &Tensor) -> Result { type LinearModel (line 29) | struct LinearModel { type Mlp (line 44) | struct Mlp { type ConvNet (line 64) | struct ConvNet { method new (line 73) | fn new(vs: VarBuilder) -> Result { method forward (line 88) | fn forward(&self, xs: &Tensor, train: bool) -> Result { type TrainingArgs (line 103) | struct TrainingArgs { function training_loop_cnn (line 110) | fn training_loop_cnn( function training_loop (line 175) | fn training_loop( type WhichModel (line 225) | enum WhichModel { type Args (line 232) | struct Args { function main (line 255) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/mobileclip/main.rs type Which (line 17) | enum Which { method model_name (line 23) | fn model_name(&self) -> String { method config (line 31) | fn config(&self) -> mobileclip::MobileClipConfig { type Args (line 40) | struct Args { function load_images (line 58) | fn load_images>( function main (line 76) | pub fn main() -> anyhow::Result<()> { function tokenize_sequences (line 137) | pub fn tokenize_sequences( FILE: candle-examples/examples/mobilenetv4/main.rs type Which (line 14) | enum Which { method model_filename (line 23) | fn model_filename(&self) -> String { method resolution (line 34) | fn resolution(&self) -> u32 { method config (line 43) | fn config(&self) -> mobilenetv4::Config { type Args (line 55) | struct Args { function main (line 70) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/mobileone/main.rs type Which (line 14) | enum Which { method model_filename (line 23) | fn model_filename(&self) -> String { method config (line 34) | fn config(&self) -> mobileone::Config { type Args (line 46) | struct Args { function main (line 61) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/modernbert/main.rs type Model (line 12) | enum Model { type Args (line 19) | struct Args { function main (line 54) | fn main() -> Result<()> { function tokenize_batch (line 147) | pub fn tokenize_batch( function get_attention_mask (line 165) | pub fn get_attention_mask( FILE: candle-examples/examples/moondream/main.rs type Model (line 18) | enum Model { type TextGeneration (line 23) | struct TextGeneration { method new (line 35) | fn new( method run (line 58) | fn run(&mut self, prompt: &str, image_embeds: &Tensor, sample_len: usi... type Args (line 146) | struct Args { function load_image (line 210) | pub fn load_image>(p: P) -> candle::Result anyhow::Result<()> { FILE: candle-examples/examples/musicgen/main.rs constant DTYPE (line 23) | const DTYPE: DType = DType::F32; type Args (line 27) | struct Args { function main (line 47) | fn main() -> Result<()> { FILE: candle-examples/examples/musicgen/musicgen_model.rs type Config (line 10) | pub struct Config { method musicgen_small (line 59) | fn musicgen_small() -> Self { method default (line 33) | fn default() -> Self { function get_embedding (line 84) | fn get_embedding(num_embeddings: usize, embedding_dim: usize) -> Result<... type MusicgenSinusoidalPositionalEmbedding (line 107) | struct MusicgenSinusoidalPositionalEmbedding { method load (line 114) | fn load(_vb: VarBuilder, cfg: &Config) -> Result { method forward (line 125) | fn forward(&mut self, input_ids: &Tensor) -> Result { type MusicgenAttention (line 135) | struct MusicgenAttention { method load (line 147) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 167) | fn forward( type MusicgenDecoderLayer (line 203) | struct MusicgenDecoderLayer { method load (line 215) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 236) | fn forward( type MusicgenDecoder (line 267) | struct MusicgenDecoder { method load (line 278) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method prepare_decoder_attention_mask (line 305) | fn prepare_decoder_attention_mask(&self, _b_sz: usize, _seq_len: usize... method forward (line 309) | fn forward(&mut self, input_ids: &Tensor) -> Result { type MusicgenForCausalLM (line 332) | pub struct MusicgenForCausalLM { method load (line 340) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 354) | pub fn forward(&mut self, input_ids: &Tensor) -> Result { type MusicgenForConditionalGeneration (line 372) | pub struct MusicgenForConditionalGeneration { method config (line 424) | pub fn config(&self) -> &GenConfig { method load (line 428) | pub fn load(vb: VarBuilder, cfg: GenConfig) -> Result { type GenConfig (line 380) | pub struct GenConfig { method small (line 387) | pub fn small() -> Self { FILE: candle-examples/examples/nomic-bert/main.rs type Args (line 18) | struct Args { function main (line 47) | fn main() -> Result<()> { FILE: candle-examples/examples/nvembed_v2/main.rs type Args (line 17) | struct Args { method build_model_and_tokenizer (line 46) | fn build_model_and_tokenizer(&self) -> anyhow::Result<(Model, tokenize... function encode (line 91) | fn encode( function div_l2_norm (line 164) | fn div_l2_norm(v: &Tensor) -> Result { function main (line 169) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/olmo/main.rs type Model (line 20) | enum Model { type TextGeneration (line 25) | struct TextGeneration { method new (line 36) | fn new( method run (line 57) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 126) | enum Which { type Args (line 141) | struct Args { function main (line 193) | fn main() -> Result<()> { FILE: candle-examples/examples/onnx-llm/main.rs type Config (line 17) | pub struct Config { type Which (line 25) | enum Which { type Args (line 30) | struct Args { function main (line 64) | pub fn main() -> Result<()> { FILE: candle-examples/examples/onnx/main.rs type Which (line 12) | enum Which { type Args (line 19) | struct Args { function main (line 31) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/onnx_basics.rs type Command (line 7) | enum Command { type Args (line 20) | pub struct Args { function main (line 25) | pub fn main() -> Result<()> { FILE: candle-examples/examples/orpheus/main.rs constant STOP_TOKEN_ID (line 17) | const STOP_TOKEN_ID: u32 = 128258; type Args (line 20) | struct Args { type Voice (line 82) | enum Voice { method as_str (line 102) | fn as_str(&self) -> &'static str { type Which (line 117) | enum Which { function main (line 122) | fn main() -> Result<()> { type Model (line 148) | struct Model { method load (line 173) | fn load(args: Args) -> Result { method run (line 249) | fn run(&mut self, prompt: &str) -> Result<()> { function load_snac (line 160) | fn load_snac(device: &Device) -> Result { FILE: candle-examples/examples/paddleocr-vl/main.rs constant DEFAULT_MODEL_ID (line 66) | const DEFAULT_MODEL_ID: &str = "PaddlePaddle/PaddleOCR-VL"; type Task (line 69) | enum Task { method prompt (line 83) | fn prompt(&self) -> &'static str { type Args (line 96) | struct Args { function levenshtein_distance (line 154) | fn levenshtein_distance(a: &str, b: &str) -> usize { function string_similarity (line 193) | fn string_similarity(a: &str, b: &str) -> f32 { type FrameOcrResult (line 207) | struct FrameOcrResult { function is_hallucination (line 220) | fn is_hallucination(text: &str) -> bool { function smart_resize (line 241) | fn smart_resize( function load_image (line 296) | fn load_image(path: &str, device: &Device, dtype: DType) -> Result<(Tens... function load_video_frames (line 376) | fn load_video_frames( function build_video_input_tokens (line 505) | fn build_video_input_tokens( function build_input_tokens (line 548) | fn build_input_tokens( function main (line 590) | fn main() -> Result<()> { FILE: candle-examples/examples/paligemma/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 31) | fn new( method run (line 54) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 125) | struct Args { function load_image (line 177) | fn load_image>(path: T, image_size: usize) -> ... function main (line 194) | fn main() -> Result<()> { FILE: candle-examples/examples/parler-tts/main.rs type Args (line 16) | struct Args { type Which (line 95) | enum Which { function main (line 102) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/phi/main.rs type Model (line 22) | enum Model { type TextGeneration (line 29) | struct TextGeneration { method new (line 41) | fn new( method run (line 64) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type WhichModel (line 139) | enum WhichModel { type Args (line 160) | struct Args { function main (line 226) | fn main() -> Result<()> { function mmlu (line 432) | fn mmlu>( FILE: candle-examples/examples/pixtral/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 31) | fn new( method run (line 54) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 163) | struct Args { function main (line 221) | fn main() -> Result<()> { FILE: candle-examples/examples/quantized-gemma/main.rs constant DEFAULT_PROMPT (line 18) | const DEFAULT_PROMPT: &str = "Write a function to calculate fibonacci num"; type Which (line 21) | enum Which { type Args (line 28) | struct Args { method tokenizer (line 89) | fn tokenizer(&self) -> anyhow::Result { method model (line 106) | fn model(&self) -> anyhow::Result { function format_size (line 129) | fn format_size(size_in_bytes: usize) -> String { type Prompt (line 142) | enum Prompt { function main (line 148) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/quantized-glm4/main.rs constant DEFAULT_PROMPT (line 18) | const DEFAULT_PROMPT: &str = "Write a Rust function to calculate the fac... type Which (line 21) | enum Which { type Args (line 34) | struct Args { method tokenizer (line 95) | fn tokenizer(&self) -> anyhow::Result { method model (line 113) | fn model(&self) -> anyhow::Result { function format_size (line 152) | fn format_size(size_in_bytes: usize) -> String { function main (line 164) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/quantized-lfm2/main.rs constant DEFAULT_PROMPT (line 20) | const DEFAULT_PROMPT: &str = "Explain how Rotary Position Embeddings wor... type Which (line 23) | enum Which { type Args (line 40) | struct Args { method model_path (line 103) | fn model_path(&self) -> Result { method tokenizer (line 123) | fn tokenizer(&self, model_path: &Path) -> Result { function format_size (line 151) | fn format_size(size_in_bytes: usize) -> String { function guess_eos_id (line 163) | fn guess_eos_id(tokenizer: &Tokenizer) -> Option { function main (line 178) | fn main() -> Result<()> { FILE: candle-examples/examples/quantized-phi/main.rs constant DEFAULT_PROMPT (line 20) | const DEFAULT_PROMPT: &str = "Write a function to count prime numbers up... type Which (line 23) | enum Which { type Args (line 37) | struct Args { method tokenizer (line 101) | fn tokenizer(&self) -> anyhow::Result { method model (line 118) | fn model(&self) -> anyhow::Result { function format_size (line 149) | fn format_size(size_in_bytes: usize) -> String { type Model (line 161) | enum Model { method forward (line 168) | fn forward(&mut self, xs: &Tensor, pos: usize) -> candle::Result anyhow::Result<()> { FILE: candle-examples/examples/quantized-qwen2-instruct/main.rs constant DEFAULT_PROMPT (line 18) | const DEFAULT_PROMPT: &str = "Write a function to count prime numbers up... type Which (line 21) | enum Which { type Args (line 36) | struct Args { method tokenizer (line 97) | fn tokenizer(&self) -> anyhow::Result { method model (line 116) | fn model(&self) -> anyhow::Result { function format_size (line 160) | fn format_size(size_in_bytes: usize) -> String { function main (line 172) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/quantized-qwen3-moe/main.rs constant DEFAULT_PROMPT (line 18) | const DEFAULT_PROMPT: &str = "Write a Rust function to calculate the fac... type Which (line 21) | enum Which { type Args (line 42) | struct Args { method tokenizer (line 106) | fn tokenizer(&self) -> anyhow::Result { method model (line 119) | fn model(&self) -> anyhow::Result { function format_size (line 179) | fn format_size(size_in_bytes: usize) -> String { function main (line 191) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/quantized-qwen3/main.rs constant DEFAULT_PROMPT (line 18) | const DEFAULT_PROMPT: &str = "Write a Rust function to calculate the fac... type Which (line 21) | enum Which { type Args (line 40) | struct Args { method tokenizer (line 101) | fn tokenizer(&self) -> anyhow::Result { method model (line 122) | fn model(&self) -> anyhow::Result { function format_size (line 150) | fn format_size(size_in_bytes: usize) -> String { function main (line 162) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/quantized-t5/main.rs type Which (line 19) | enum Which { type Args (line 30) | struct Args { type T5ModelBuilder (line 77) | struct T5ModelBuilder { method load (line 84) | pub fn load(args: &Args) -> Result<(Self, Tokenizer)> { method build_model (line 134) | pub fn build_model(&self) -> Result { method get_local_or_remote_file (line 140) | fn get_local_or_remote_file(filename: &str, api: &ApiRepo) -> Result Result<()> { FILE: candle-examples/examples/quantized/main.rs constant DEFAULT_PROMPT (line 19) | const DEFAULT_PROMPT: &str = "My favorite theorem is "; type Prompt (line 22) | enum Prompt { type Which (line 29) | enum Which { method is_mistral (line 83) | fn is_mistral(&self) -> bool { method is_zephyr (line 115) | fn is_zephyr(&self) -> bool { method is_open_chat (line 144) | fn is_open_chat(&self) -> bool { method is_deepseek (line 173) | fn is_deepseek(&self) -> bool { method tokenizer_repo (line 202) | fn tokenizer_repo(&self) -> &'static str { type Args (line 235) | struct Args { method tokenizer (line 308) | fn tokenizer(&self) -> anyhow::Result { method model (line 321) | fn model(&self) -> anyhow::Result { function format_size (line 424) | fn format_size(size_in_bytes: usize) -> String { function main (line 436) | fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/qwen/main.rs type Model (line 22) | enum Model { method forward (line 30) | fn forward(&mut self, xs: &Tensor, s: usize) -> candle::Result { type TextGeneration (line 40) | struct TextGeneration { method new (line 51) | fn new( method run (line 72) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type WhichModel (line 142) | enum WhichModel { type Args (line 179) | struct Args { method should_use_chat_template (line 243) | fn should_use_chat_template(&self) -> bool { function format_prompt (line 255) | fn format_prompt(prompt: &str, use_chat_template: bool, thinking: bool) ... function main (line 263) | fn main() -> Result<()> { FILE: candle-examples/examples/recurrent-gemma/main.rs type Model (line 20) | enum Model { method forward (line 26) | fn forward(&mut self, xs: &Tensor, pos: usize) -> candle::Result Result<()> { type Args (line 156) | struct Args { function main (line 218) | fn main() -> Result<()> { FILE: candle-examples/examples/reinforcement-learning/atari_wrappers.py class NoopResetEnv (line 8) | class NoopResetEnv(gym.Wrapper): method __init__ (line 9) | def __init__(self, env, noop_max=30): method reset (line 18) | def reset(self): class FireResetEnv (line 33) | class FireResetEnv(gym.Wrapper): method __init__ (line 34) | def __init__(self, env): method reset (line 40) | def reset(self): class ImageSaver (line 50) | class ImageSaver(gym.Wrapper): method __init__ (line 51) | def __init__(self, env, img_path, rank): method step (line 57) | def step(self, action): class EpisodicLifeEnv (line 65) | class EpisodicLifeEnv(gym.Wrapper): method __init__ (line 66) | def __init__(self, env): method step (line 74) | def step(self, action): method reset (line 88) | def reset(self): class MaxAndSkipEnv (line 101) | class MaxAndSkipEnv(gym.Wrapper): method __init__ (line 102) | def __init__(self, env, skip=4): method step (line 109) | def step(self, action): method reset (line 123) | def reset(self): class ClipRewardEnv (line 130) | class ClipRewardEnv(gym.RewardWrapper): method reward (line 131) | def reward(self, reward): class WarpFrame (line 135) | class WarpFrame(gym.ObservationWrapper): method __init__ (line 136) | def __init__(self, env): method observation (line 142) | def observation(self, obs): class FrameStack (line 148) | class FrameStack(gym.Wrapper): method __init__ (line 149) | def __init__(self, env, k): method reset (line 158) | def reset(self): method step (line 164) | def step(self, action): method observation (line 169) | def observation(self): function wrap_deepmind (line 173) | def wrap_deepmind(env, episode_life=True, clip_rewards=True): function make_env (line 190) | def make_env(env_id, img_dir, seed, rank): class WrapPyTorch (line 202) | class WrapPyTorch(gym.ObservationWrapper): method __init__ (line 203) | def __init__(self, env=None): method observation (line 207) | def observation(self, observation): class VecEnv (line 211) | class VecEnv(object): method step (line 215) | def step(self, vac): method reset (line 223) | def reset(self): method close (line 228) | def close(self): function worker (line 232) | def worker(remote, env_fn_wrapper): class CloudpickleWrapper (line 252) | class CloudpickleWrapper(object): method __init__ (line 256) | def __init__(self, x): method __getstate__ (line 258) | def __getstate__(self): method __setstate__ (line 261) | def __setstate__(self, ob): class SubprocVecEnv (line 265) | class SubprocVecEnv(VecEnv): method __init__ (line 266) | def __init__(self, env_fns): method step (line 281) | def step(self, actions): method reset (line 288) | def reset(self): method close (line 293) | def close(self): method num_envs (line 300) | def num_envs(self): function make (line 304) | def make(env_name, img_dir, num_processes): FILE: candle-examples/examples/reinforcement-learning/ddpg.rs type OuNoise (line 12) | pub struct OuNoise { method new (line 19) | pub fn new(mu: f64, theta: f64, sigma: f64, size_action: usize) -> Res... method sample (line 28) | pub fn sample(&mut self) -> Result { type Transition (line 37) | struct Transition { method new (line 46) | fn new( type ReplayBuffer (line 65) | pub struct ReplayBuffer { method new (line 71) | pub fn new(capacity: usize) -> Self { method push (line 79) | pub fn push( method random_batch (line 99) | pub fn random_batch( function track (line 143) | fn track( type Actor (line 170) | struct Actor<'a> { function new (line 181) | fn new(device: &Device, dtype: DType, size_state: usize, size_action: us... function forward (line 227) | fn forward(&self, state: &Tensor) -> Result { function target_forward (line 231) | fn target_forward(&self, state: &Tensor) -> Result { function track (line 235) | fn track(&mut self, tau: f64) -> Result<()> { type Critic (line 248) | struct Critic<'a> { function new (line 259) | fn new(device: &Device, dtype: DType, size_state: usize, size_action: us... function forward (line 304) | fn forward(&self, state: &Tensor, action: &Tensor) -> Result { function target_forward (line 309) | fn target_forward(&self, state: &Tensor, action: &Tensor) -> Result Result<()> { type DDPG (line 328) | pub struct DDPG<'a> { function new (line 345) | pub fn new( function remember (line 400) | pub fn remember( function actions (line 413) | pub fn actions(&mut self, state: &Tensor) -> Result { function train (line 426) | pub fn train(&mut self, batch_size: usize) -> Result<()> { constant GAMMA (line 458) | const GAMMA: f64 = 0.99; constant TAU (line 460) | const TAU: f64 = 0.005; constant REPLAY_BUFFER_CAPACITY (line 462) | const REPLAY_BUFFER_CAPACITY: usize = 100_000; constant TRAINING_BATCH_SIZE (line 464) | const TRAINING_BATCH_SIZE: usize = 100; constant MAX_EPISODES (line 466) | const MAX_EPISODES: usize = 100; constant EPISODE_LENGTH (line 468) | const EPISODE_LENGTH: usize = 200; constant TRAINING_ITERATIONS (line 470) | const TRAINING_ITERATIONS: usize = 200; constant MU (line 473) | const MU: f64 = 0.0; constant THETA (line 474) | const THETA: f64 = 0.15; constant SIGMA (line 475) | const SIGMA: f64 = 0.1; constant ACTOR_LEARNING_RATE (line 477) | const ACTOR_LEARNING_RATE: f64 = 1e-4; constant CRITIC_LEARNING_RATE (line 478) | const CRITIC_LEARNING_RATE: f64 = 1e-3; function run (line 480) | pub fn run() -> Result<()> { FILE: candle-examples/examples/reinforcement-learning/dqn.rs constant DEVICE (line 11) | const DEVICE: Device = Device::Cpu; constant EPISODES (line 12) | const EPISODES: usize = 200; constant BATCH_SIZE (line 13) | const BATCH_SIZE: usize = 64; constant GAMMA (line 14) | const GAMMA: f64 = 0.99; constant LEARNING_RATE (line 15) | const LEARNING_RATE: f64 = 0.01; function run (line 17) | pub fn run() -> Result<()> { FILE: candle-examples/examples/reinforcement-learning/gym_env.rs type Step (line 8) | pub struct Step { function copy_with_obs (line 18) | pub fn copy_with_obs(&self, state: &Tensor) -> Step { type GymEnv (line 30) | pub struct GymEnv { method new (line 42) | pub fn new(name: &str) -> Result { method reset (line 66) | pub fn reset(&self, seed: u64) -> Result { method step (line 78) | pub fn step> + Clone>( method action_space (line 105) | pub fn action_space(&self) -> usize { method observation_space (line 110) | pub fn observation_space(&self) -> &[usize] { function w (line 36) | fn w(res: PyErr) -> candle::Error { FILE: candle-examples/examples/reinforcement-learning/main.rs type Args (line 18) | struct Args { type Command (line 24) | enum Command { function main (line 30) | fn main() -> Result<()> { FILE: candle-examples/examples/reinforcement-learning/policy_gradient.rs function new_model (line 9) | fn new_model( function accumulate_rewards (line 28) | fn accumulate_rewards(steps: &[Step]) -> Vec { function weighted_sample (line 41) | fn weighted_sample(probs: Vec, rng: &mut ThreadRng) -> Result { function run (line 47) | pub fn run() -> Result<()> { FILE: candle-examples/examples/reinforcement-learning/vec_gym_env.rs type Step (line 7) | pub struct Step { type VecGymEnv (line 14) | pub struct VecGymEnv { method new (line 26) | pub fn new(name: &str, img_dir: Option<&str>, nprocesses: usize) -> Re... method reset (line 52) | pub fn reset(&self) -> Result { method step (line 62) | pub fn step(&self, action: Vec) -> Result { method action_space (line 85) | pub fn action_space(&self) -> usize { method observation_space (line 89) | pub fn observation_space(&self) -> &[usize] { function w (line 20) | fn w(res: PyErr) -> candle::Error { FILE: candle-examples/examples/replit-code/main.rs type Model (line 19) | enum Model { method forward (line 25) | fn forward(&mut self, xs: &Tensor) -> candle::Result { type TextGeneration (line 33) | struct TextGeneration { method new (line 45) | fn new( method run (line 68) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 128) | struct Args { function main (line 184) | fn main() -> Result<()> { FILE: candle-examples/examples/repvgg/main.rs type Which (line 14) | enum Which { method model_filename (line 28) | fn model_filename(&self) -> String { method config (line 44) | fn config(&self) -> repvgg::Config { type Args (line 61) | struct Args { function main (line 76) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/resnet/main.rs type Which (line 13) | enum Which { type Args (line 27) | struct Args { function main (line 43) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/rwkv/main.rs constant EOS_TOKEN_ID (line 23) | const EOS_TOKEN_ID: u32 = 261; type Model (line 25) | enum Model { method forward (line 33) | fn forward(&self, xs: &Tensor, state: &mut State) -> candle::Result Result<()> { type TextGenerationV7 (line 132) | struct TextGenerationV7 { method new (line 147) | fn new( method run (line 176) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 308) | enum Which { method fmt (line 337) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method is_v7 (line 343) | fn is_v7(&self) -> bool { method model_id (line 357) | fn model_id(&self) -> &'static str { method revision (line 374) | fn revision(&self) -> &'static str { method v7_version (line 390) | fn v7_version(&self) -> Option { method v7_config (line 404) | fn v7_config(&self) -> Option { type Preset (line 428) | enum Preset { type PromptTemplate (line 436) | enum PromptTemplate { function apply_template (line 450) | fn apply_template( type Args (line 498) | struct Args { function main (line 592) | fn main() -> Result<()> { FILE: candle-examples/examples/segformer/main.rs type CliArgs (line 15) | struct CliArgs { type SegmentationArgs (line 22) | struct SegmentationArgs { type ClassificationArgs (line 42) | struct ClassificationArgs { type Commands (line 54) | enum Commands { function get_vb_and_config (line 59) | fn get_vb_and_config( type LabelItem (line 77) | struct LabelItem { function segmentation_task (line 82) | fn segmentation_task(args: SegmentationArgs, device: &Device) -> anyhow:... function classification_task (line 129) | fn classification_task(args: ClassificationArgs, device: &Device) -> any... function main (line 149) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/segment-anything/main.rs type Args (line 16) | struct Args { function main (line 54) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/siglip/main.rs type Which (line 17) | enum Which { type Args (line 37) | struct Args { function load_image (line 66) | fn load_image>(path: T, image_size: usize) -> ... function load_images (line 83) | fn load_images>( function main (line 96) | pub fn main() -> anyhow::Result<()> { function get_tokenizer (line 168) | pub fn get_tokenizer(hf_repo: &str, tokenizer: Option) -> anyhow... function tokenize_sequences (line 181) | pub fn tokenize_sequences( FILE: candle-examples/examples/silero-vad/main.rs type Which (line 13) | enum Which { type SampleRate (line 19) | enum SampleRate { type Args (line 28) | struct Args { type I16Frames (line 55) | struct I16Frames { function new (line 62) | fn new(rdr: R, frame_size: usize) -> Self { type Item (line 72) | type Item = std::io::Result>; method next (line 74) | fn next(&mut self) -> Option { function main (line 103) | fn main() -> Result<()> { FILE: candle-examples/examples/smollm3/main.rs constant DEFAULT_PROMPT (line 24) | const DEFAULT_PROMPT: &str = "Write a Rust function to calculate the fac... type SmolLM3Model (line 28) | enum SmolLM3Model { method forward (line 34) | fn forward(&mut self, input: &Tensor, pos: usize) -> Result { method config (line 41) | fn config(&self) -> ModelConfig { type ModelConfig (line 78) | struct ModelConfig { method head_dim (line 91) | fn head_dim(&self) -> usize { type ModelType (line 99) | enum ModelType { type Quantization (line 109) | enum Quantization { method filename_unsloth (line 119) | fn filename_unsloth(&self) -> &'static str { method size_gb (line 127) | fn size_gb(&self) -> f32 { type WhichModel (line 137) | enum WhichModel { type Args (line 146) | struct Args { method get_tokenizer (line 222) | fn get_tokenizer(&self) -> Result { method should_use_chat_template (line 234) | fn should_use_chat_template(&self) -> bool { function load_quantized_model (line 241) | fn load_quantized_model(args: &Args, device: &Device) -> Result Result { function format_prompt (line 314) | fn format_prompt(prompt: &str, use_chat_template: bool, enable_thinking:... function get_eos_token (line 351) | fn get_eos_token(tokenizer: &Tokenizer, config: &ModelConfig) -> u32 { function run_generation (line 367) | fn run_generation( function print_model_info (line 523) | fn print_model_info(config: &ModelConfig) { function main (line 566) | fn main() -> Result<()> { FILE: candle-examples/examples/snac/audio_io.rs constant SAMPLE_RATE (line 4) | pub const SAMPLE_RATE: usize = 24_000; type AudioOutputData_ (line 6) | pub(crate) struct AudioOutputData_ { method new (line 15) | pub(crate) fn new(input_sample_rate: usize, output_sample_rate: usize)... method reset (line 38) | pub fn reset(&mut self) { method take_all (line 46) | pub(crate) fn take_all(&mut self) -> Vec { method is_empty (line 54) | pub(crate) fn is_empty(&self) -> bool { method push_input_buffer (line 59) | fn push_input_buffer(&mut self, samples: &[f32]) { method push_samples (line 64) | pub(crate) fn push_samples(&mut self, samples: &[f32]) -> Result<()> { type AudioOutputData (line 90) | type AudioOutputData = Arc>; function setup_output_stream (line 92) | pub(crate) fn setup_output_stream() -> Result<(cpal::Stream, AudioOutput... function setup_input_stream (line 152) | pub(crate) fn setup_input_stream() -> Result<(cpal::Stream, AudioOutputD... function conv (line 194) | fn conv(samples: &mut Vec, data: std::borrow::Cow>(path: P) -> Result<(... FILE: candle-examples/examples/snac/main.rs type Action (line 17) | enum Action { type Which (line 24) | enum Which { method sample_rate (line 34) | fn sample_rate(&self) -> u32 { method config_repo (line 42) | fn config_repo(&self) -> &'static str { method model_file (line 50) | fn model_file(&self) -> &'static str { type Args (line 61) | struct Args { function main (line 88) | fn main() -> Result<()> { FILE: candle-examples/examples/splade/main.rs type Args (line 13) | struct Args { function main (line 46) | fn main() -> Result<()> { function normalize_l2 (line 208) | pub fn normalize_l2(v: &Tensor) -> Result { FILE: candle-examples/examples/stable-diffusion-3/clip.rs type ClipWithTokenizer (line 7) | struct ClipWithTokenizer { method new (line 15) | fn new( method encode_text_to_embedding (line 37) | fn encode_text_to_embedding( type T5WithTokenizer (line 77) | struct T5WithTokenizer { method new (line 84) | fn new(vb: candle_nn::VarBuilder, max_position_embeddings: usize) -> R... method encode_text_to_embedding (line 108) | fn encode_text_to_embedding( type StableDiffusion3TripleClipWithTokenizer (line 126) | pub struct StableDiffusion3TripleClipWithTokenizer { method new_split (line 134) | pub fn new_split( method new (line 176) | pub fn new(vb: candle_nn::VarBuilder) -> Result { method encode_text_to_embedding (line 204) | pub fn encode_text_to_embedding( FILE: candle-examples/examples/stable-diffusion-3/main.rs type Which (line 15) | enum Which { method is_3_5 (line 27) | fn is_3_5(&self) -> bool { type Args (line 37) | struct Args { function main (line 96) | fn main() -> Result<()> { FILE: candle-examples/examples/stable-diffusion-3/sampling.rs type SkipLayerGuidanceConfig (line 7) | pub struct SkipLayerGuidanceConfig { function euler_sample (line 15) | pub fn euler_sample( function time_snr_shift (line 76) | fn time_snr_shift(alpha: f64, t: f64) -> f64 { function apply_cfg (line 80) | fn apply_cfg(cfg_scale: f64, noise_pred: &Tensor) -> Result { FILE: candle-examples/examples/stable-diffusion-3/vae.rs function build_sd3_vae_autoencoder (line 4) | pub fn build_sd3_vae_autoencoder(vb: candle_nn::VarBuilder) -> Result String { FILE: candle-examples/examples/stable-diffusion/main.rs type Args (line 19) | struct Args { type StableDiffusionVersion (line 126) | enum StableDiffusionVersion { method repo (line 147) | fn repo(&self) -> &'static str { method unet_file (line 159) | fn unet_file(&self, use_f16: bool) -> &'static str { method vae_file (line 177) | fn vae_file(&self, use_f16: bool) -> &'static str { method clip_file (line 195) | fn clip_file(&self, use_f16: bool) -> &'static str { method clip2_file (line 213) | fn clip2_file(&self, use_f16: bool) -> &'static str { type ModelFile (line 137) | enum ModelFile { method get (line 233) | fn get( function output_filename (line 290) | fn output_filename( function save_image (line 318) | fn save_image( function text_embeddings (line 345) | fn text_embeddings( function image_preprocess (line 435) | fn image_preprocess>(path: T) -> anyhow::Resul... function mask_preprocess (line 456) | fn mask_preprocess>(path: T) -> anyhow::Result... function inpainting_tensors (line 480) | fn inpainting_tensors( function run (line 531) | fn run(args: Args) -> Result<()> { function main (line 822) | fn main() -> Result<()> { FILE: candle-examples/examples/stable-lm/main.rs type Model (line 20) | enum Model { type TextGeneration (line 25) | struct TextGeneration { method new (line 36) | fn new( method run (line 57) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Which (line 126) | enum Which { type Args (line 137) | struct Args { function main (line 195) | fn main() -> Result<()> { FILE: candle-examples/examples/starcoder2/main.rs type TextGeneration (line 19) | struct TextGeneration { method new (line 30) | fn new( method run (line 51) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 118) | struct Args { function main (line 173) | fn main() -> Result<()> { FILE: candle-examples/examples/stella-en-v5/main.rs type Embedding (line 21) | struct Embedding { method new (line 28) | fn new(model: EmbeddingModel, tokenizer: Tokenizer, device: &Device) -... method encode (line 36) | fn encode(&mut self, task: EncodeTask, text: Option) -> Result... type EmbedDim (line 142) | enum EmbedDim { method embed_dim_default_dir (line 161) | pub fn embed_dim_default_dir(&self) -> &'static str { method embed_dim (line 174) | pub fn embed_dim(&self) -> StellaEmbedDim { type EncodeTask (line 188) | pub enum EncodeTask { method query_preproc (line 201) | pub fn query_preproc(&self, txt: &[String]) -> Vec { type Which (line 216) | enum Which { type Args (line 225) | struct Args { function create_tokenizer (line 264) | fn create_tokenizer(tokenizer_file: &Path, which: Which) -> Result Result<()> { FILE: candle-examples/examples/t5/main.rs constant DTYPE (line 19) | const DTYPE: DType = DType::F32; type Which (line 22) | enum Which { type Args (line 34) | struct Args { type T5ModelBuilder (line 100) | struct T5ModelBuilder { method load (line 107) | pub fn load(args: &Args) -> Result<(Self, Tokenizer)> { method build_encoder (line 173) | pub fn build_encoder(&self) -> Result { method build_conditional_generation (line 180) | pub fn build_conditional_generation(&self) -> Result Result<()> { function normalize_l2 (line 351) | pub fn normalize_l2(v: &Tensor) -> Result { FILE: candle-examples/examples/trocr/image_processor.rs type ProcessorConfig (line 8) | pub struct ProcessorConfig { method default (line 19) | fn default() -> Self { type ViTImageProcessor (line 32) | pub struct ViTImageProcessor { method new (line 42) | pub fn new(config: &ProcessorConfig) -> Self { method preprocess (line 53) | pub fn preprocess(&self, images: Vec<&str>) -> Result { method resize (line 95) | fn resize( method normalize (line 111) | fn normalize( method load_images (line 145) | pub fn load_images(&self, image_path: Vec<&str>) -> Result (&str, &str) { type Config (line 40) | struct Config { type Args (line 46) | struct Args { function main (line 67) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/vgg/main.rs type Which (line 13) | enum Which { type Args (line 20) | struct Args { function main (line 33) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/vit/main.rs type Args (line 14) | struct Args { function main (line 26) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/voxtral/download.rs function model_files (line 13) | pub fn model_files(model_id: &str) -> Result<((PathBuf, Vec), P... FILE: candle-examples/examples/voxtral/main.rs type Args (line 11) | struct Args { function use_cpu (line 27) | fn use_cpu() -> bool { function use_cpu (line 32) | fn use_cpu() -> bool { function main (line 36) | fn main() -> Result<()> { FILE: candle-examples/examples/voxtral/model.rs constant SAMPLE_RATE (line 19) | const SAMPLE_RATE: u32 = 16000; type TranscriptionResult (line 22) | pub struct TranscriptionResult { type VoxtralModel (line 27) | pub struct VoxtralModel { method new (line 39) | pub fn new(model_id: &str, use_cpu: bool) -> Result { method transcribe_audio (line 80) | pub fn transcribe_audio( method device (line 130) | pub fn device(&self) -> &Device { function transcribe_with_voxtral (line 135) | fn transcribe_with_voxtral( function load_model_weights (line 225) | fn load_model_weights<'a>(model_files: &'a [PathBuf], device: &Device) -... function load_model_config (line 245) | fn load_model_config(config_file: &PathBuf) -> Result { function parse_audio_config (line 280) | fn parse_audio_config(json: &serde_json::Value) -> Result Result { FILE: candle-examples/examples/whisper-microphone/main.rs type Model (line 21) | pub enum Model { method config (line 28) | pub fn config(&self) -> &Config { method encoder_forward (line 35) | pub fn encoder_forward(&mut self, x: &Tensor, flush: bool) -> candle::... method decoder_forward (line 42) | pub fn decoder_forward( method decoder_final_linear (line 54) | pub fn decoder_final_linear(&self, x: &Tensor) -> candle::Result Result { method decode_with_fallback (line 240) | fn decode_with_fallback(&mut self, segment: &Tensor) -> Result) -> Result) { method reset_kv_cache (line 350) | fn reset_kv_cache(&mut self) { method model (line 357) | fn model(&mut self) -> &mut Model { function token_id (line 362) | pub fn token_id(tokenizer: &Tokenizer, token: &str) -> candle::Result bool { method model_and_revision (line 417) | fn model_and_revision(&self) -> (&'static str, &'static str) { type Args (line 439) | struct Args { function main (line 489) | pub fn main() -> Result<()> { FILE: candle-examples/examples/whisper-microphone/multilingual.rs constant LANGUAGES (line 6) | const LANGUAGES: [(&str, &str); 99] = [ function detect_language (line 109) | pub fn detect_language(model: &mut Model, tokenizer: &Tokenizer, mel: &T... FILE: candle-examples/examples/whisper/main.rs type Model (line 29) | pub enum Model { method config (line 36) | pub fn config(&self) -> &Config { method encoder_forward (line 43) | pub fn encoder_forward(&mut self, x: &Tensor, flush: bool) -> candle::... method decoder_forward (line 50) | pub fn decoder_forward( method decoder_final_linear (line 62) | pub fn decoder_final_linear(&self, x: &Tensor) -> candle::Result Result { method decode_with_fallback (line 256) | fn decode_with_fallback(&mut self, segment: &Tensor) -> Result Result> { function token_id (line 513) | pub fn token_id(tokenizer: &Tokenizer, token: &str) -> candle::Result bool { method model_and_revision (line 571) | fn model_and_revision(&self) -> (&'static str, &'static str) { type Args (line 594) | struct Args { function main (line 650) | fn main() -> Result<()> { FILE: candle-examples/examples/whisper/multilingual.rs constant LANGUAGES (line 4) | const LANGUAGES: [(&str, &str); 99] = [ function detect_language (line 107) | pub fn detect_language( FILE: candle-examples/examples/wuerstchen/main.rs constant PRIOR_GUIDANCE_SCALE (line 15) | const PRIOR_GUIDANCE_SCALE: f64 = 4.0; constant RESOLUTION_MULTIPLE (line 16) | const RESOLUTION_MULTIPLE: f64 = 42.67; constant LATENT_DIM_SCALE (line 17) | const LATENT_DIM_SCALE: f64 = 10.67; constant PRIOR_CIN (line 18) | const PRIOR_CIN: usize = 16; constant DECODER_CIN (line 19) | const DECODER_CIN: usize = 4; type Args (line 23) | struct Args { type ModelFile (line 91) | enum ModelFile { method get (line 102) | fn get(&self, filename: Option) -> Result { function output_filename (line 125) | fn output_filename( function encode_prompt (line 152) | fn encode_prompt( function run (line 203) | fn run(args: Args) -> Result<()> { function main (line 382) | fn main() -> Result<()> { FILE: candle-examples/examples/xlm-roberta/main.rs type Model (line 15) | enum Model { type Task (line 25) | enum Task { type Args (line 33) | struct Args { function main (line 72) | fn main() -> Result<()> { type TokenizeInput (line 264) | pub enum TokenizeInput<'a> { function tokenize_batch (line 269) | pub fn tokenize_batch( function get_attention_mask (line 294) | pub fn get_attention_mask( FILE: candle-examples/examples/yi/main.rs type Which (line 20) | enum Which { type TextGeneration (line 27) | struct TextGeneration { method new (line 38) | fn new( method run (line 59) | fn run(&mut self, prompt: &str, sample_len: usize) -> Result<()> { type Args (line 127) | struct Args { function main (line 180) | fn main() -> Result<()> { FILE: candle-examples/examples/yolo-v3/darknet.rs type Block (line 9) | struct Block { method get (line 15) | fn get(&self, key: &str) -> Result<&str> { type Darknet (line 24) | pub struct Darknet { method get (line 30) | fn get(&self, key: &str) -> Result<&str> { method height (line 261) | pub fn height(&self) -> Result { method width (line 266) | pub fn width(&self) -> Result { method build_model (line 271) | pub fn build_model(&self, vb: VarBuilder) -> Result> { type Accumulator (line 38) | struct Accumulator { method new (line 45) | fn new() -> Accumulator { method finish_block (line 56) | fn finish_block(&mut self) { function parse_config (line 76) | pub fn parse_config>(path: T) -> Result { type Bl (line 110) | enum Bl { function conv (line 117) | fn conv(vb: VarBuilder, index: usize, p: usize, b: &Block) -> Result<(us... function upsample (line 164) | fn upsample(prev_channels: usize) -> Result<(usize, Bl)> { function int_list_of_string (line 172) | fn int_list_of_string(s: &str) -> Result> { function usize_of_index (line 178) | fn usize_of_index(index: usize, i: i64) -> usize { function route (line 186) | fn route(index: usize, p: &[(usize, Bl)], block: &Block) -> Result<(usiz... function shortcut (line 196) | fn shortcut(index: usize, p: usize, block: &Block) -> Result<(usize, Bl)> { function yolo (line 201) | fn yolo(p: usize, block: &Block) -> Result<(usize, Bl)> { function detect (line 216) | fn detect( FILE: candle-examples/examples/yolo-v3/extract-weights.py function remove_prefix (line 1) | def remove_prefix(text, prefix): FILE: candle-examples/examples/yolo-v3/main.rs function draw_rect (line 17) | pub fn draw_rect( function report (line 38) | pub fn report( type Args (line 100) | struct Args { method config (line 120) | fn config(&self) -> anyhow::Result { method model (line 132) | fn model(&self) -> anyhow::Result { function main (line 145) | pub fn main() -> Result<()> { FILE: candle-examples/examples/yolo-v8/main.rs constant KP_CONNECTIONS (line 34) | const KP_CONNECTIONS: [(usize, usize); 16] = [ function report_detect (line 55) | pub fn report_detect( function report_pose (line 150) | pub fn report_pose( type Which (line 242) | enum Which { type YoloTask (line 251) | enum YoloTask { type Args (line 258) | pub struct Args { method model (line 295) | fn model(&self) -> anyhow::Result { type Task (line 319) | pub trait Task: Module + Sized { method load (line 320) | fn load(vb: VarBuilder, multiples: Multiples) -> Result; method report (line 321) | fn report( method load (line 333) | fn load(vb: VarBuilder, multiples: Multiples) -> Result { method report (line 337) | fn report( method load (line 359) | fn load(vb: VarBuilder, multiples: Multiples) -> Result { method report (line 363) | fn report( function run (line 376) | pub fn run(args: Args) -> anyhow::Result<()> { function main (line 442) | pub fn main() -> anyhow::Result<()> { FILE: candle-examples/examples/yolo-v8/model.rs type Multiples (line 5) | pub struct Multiples { method n (line 12) | pub fn n() -> Self { method s (line 19) | pub fn s() -> Self { method m (line 26) | pub fn m() -> Self { method l (line 33) | pub fn l() -> Self { method x (line 40) | pub fn x() -> Self { method filters (line 48) | fn filters(&self) -> (usize, usize, usize) { type Upsample (line 57) | struct Upsample { method new (line 62) | fn new(scale_factor: usize) -> Result { method forward (line 68) | fn forward(&self, xs: &Tensor) -> candle::Result { type ConvBlock (line 75) | struct ConvBlock { method load (line 81) | fn load( method forward (line 107) | fn forward(&self, xs: &Tensor) -> Result { type Bottleneck (line 115) | struct Bottleneck { method load (line 123) | fn load(vb: VarBuilder, c1: usize, c2: usize, shortcut: bool) -> Resul... method forward (line 139) | fn forward(&self, xs: &Tensor) -> Result { type C2f (line 151) | struct C2f { method load (line 159) | fn load(vb: VarBuilder, c1: usize, c2: usize, n: usize, shortcut: bool... method forward (line 178) | fn forward(&self, xs: &Tensor) -> Result { type Sppf (line 191) | struct Sppf { method load (line 199) | fn load(vb: VarBuilder, c1: usize, c2: usize, k: usize) -> Result { method forward (line 213) | fn forward(&self, xs: &Tensor) -> Result { type Dfl (line 234) | struct Dfl { method load (line 241) | fn load(vb: VarBuilder, num_classes: usize) -> Result { method forward (line 252) | fn forward(&self, xs: &Tensor) -> Result { type DarkNet (line 264) | struct DarkNet { method load (line 279) | fn load(vb: VarBuilder, m: Multiples) -> Result { method forward (line 363) | fn forward(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> { type YoloV8Neck (line 377) | struct YoloV8Neck { method load (line 389) | fn load(vb: VarBuilder, m: Multiples) -> Result { method forward (line 449) | fn forward(&self, p3: &Tensor, p4: &Tensor, p5: &Tensor) -> Result<(Te... type DetectionHead (line 468) | struct DetectionHead { method load (line 533) | fn load(vb: VarBuilder, nc: usize, filters: (usize, usize, usize)) -> ... method load_cv3 (line 559) | fn load_cv3( method load_cv2 (line 571) | fn load_cv2( method forward (line 583) | fn forward(&self, xs0: &Tensor, xs1: &Tensor, xs2: &Tensor) -> Result<... type PoseHead (line 478) | struct PoseHead { method load (line 630) | fn load( method load_cv4 (line 652) | fn load_cv4( method forward (line 664) | fn forward(&self, xs0: &Tensor, xs1: &Tensor, xs2: &Tensor) -> Result<... function make_anchors (line 485) | fn make_anchors( function dist2bbox (line 515) | fn dist2bbox(distance: &Tensor, anchor_points: &Tensor) -> Result { type DetectionHeadOut (line 526) | struct DetectionHeadOut { type YoloV8 (line 690) | pub struct YoloV8 { method load (line 698) | pub fn load(vb: VarBuilder, m: Multiples, num_classes: usize) -> Resul... method forward (line 712) | fn forward(&self, xs: &Tensor) -> Result { type YoloV8Pose (line 721) | pub struct YoloV8Pose { method load (line 729) | pub fn load( method forward (line 748) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-examples/examples/z_image/main.rs constant BASE_IMAGE_SEQ_LEN (line 48) | const BASE_IMAGE_SEQ_LEN: usize = 256; constant MAX_IMAGE_SEQ_LEN (line 49) | const MAX_IMAGE_SEQ_LEN: usize = 4096; constant BASE_SHIFT (line 50) | const BASE_SHIFT: f64 = 0.5; constant MAX_SHIFT (line 51) | const MAX_SHIFT: f64 = 1.15; type Model (line 54) | enum Model { method repo (line 60) | fn repo(&self) -> &'static str { method default_steps (line 66) | fn default_steps(&self) -> usize { type Args (line 75) | struct Args { function format_prompt_for_qwen3 (line 131) | fn format_prompt_for_qwen3(prompt: &str) -> String { function run (line 138) | fn run(args: Args) -> Result<()> { function main (line 471) | fn main() -> Result<()> { FILE: candle-examples/src/audio.rs function normalize_loudness (line 4) | pub fn normalize_loudness( function pcm_decode (line 32) | pub fn pcm_decode>(path: P) -> Result<(Vec Result Filter { method high_pass (line 98) | pub fn high_pass(sample_rate_hz: f32) -> Filter { method apply (line 123) | pub fn apply(&mut self, x0: f32) -> f32 { type Sum (line 140) | struct Sum { method zero (line 147) | fn zero() -> Sum { method add (line 155) | fn add(&mut self, x: f32) { type Power (line 189) | pub struct Power(pub f32); method from_lkfs (line 195) | pub fn from_lkfs(lkfs: f32) -> Power { method loudness_lkfs (line 203) | pub fn loudness_lkfs(&self) -> f32 { type Windows100ms (line 219) | pub struct Windows100ms { function new (line 225) | pub fn new() -> Windows100ms> { function as_ref (line 230) | pub fn as_ref(&self) -> Windows100ms<&[Power]> function as_mut (line 240) | pub fn as_mut(&mut self) -> Windows100ms<&mut [Power]> function len (line 251) | pub fn len(&self) -> usize type ChannelLoudnessMeter (line 308) | pub struct ChannelLoudnessMeter { method new (line 330) | pub fn new(sample_rate_hz: u32) -> ChannelLoudnessMeter { method push (line 377) | pub fn push>(&mut self, samples: I) { method as_100ms_windows (line 403) | pub fn as_100ms_windows(&self) -> Windows100ms<&[Power]> { method into_100ms_windows (line 408) | pub fn into_100ms_windows(self) -> Windows100ms> { function reduce_stereo (line 420) | pub fn reduce_stereo( function reduce_stereo_in_place (line 437) | pub fn reduce_stereo_in_place(left: Windows100ms<&mut [Power]>, right: W... function gated_mean (line 461) | pub fn gated_mean(windows_100ms: Windows100ms<&[Power]>) -> Option { FILE: candle-examples/src/chat_template.rs type Message (line 41) | pub struct Message { method new (line 47) | pub fn new(role: impl Into, content: impl Into) -> Self { method system (line 54) | pub fn system(content: impl Into) -> Self { method user (line 58) | pub fn user(content: impl Into) -> Self { method assistant (line 62) | pub fn assistant(content: impl Into) -> Self { type ChatTemplateOptions (line 69) | pub struct ChatTemplateOptions { method for_generation (line 81) | pub fn for_generation() -> Self { method for_training (line 88) | pub fn for_training() -> Self { method with_thinking (line 95) | pub fn with_thinking(mut self) -> Self { type TokenConfig (line 103) | pub struct TokenConfig { type StringOrToken (line 119) | pub enum StringOrToken { method as_str (line 125) | pub fn as_str(&self) -> &str { method default (line 134) | fn default() -> Self { type ChatTemplateConfig (line 142) | pub enum ChatTemplateConfig { type NamedTemplate (line 148) | pub struct NamedTemplate { type ChatTemplate (line 154) | pub struct ChatTemplate { method new (line 162) | pub fn new( method from_tokenizer_config (line 187) | pub fn from_tokenizer_config(path: impl AsRef) -> Result Result Self { method chatml_with_thinking (line 239) | pub fn chatml_with_thinking() -> Self { method llama2 (line 256) | pub fn llama2() -> Self { method llama3 (line 281) | pub fn llama3() -> Self { method mistral (line 300) | pub fn mistral() -> Self { method gemma (line 315) | pub fn gemma() -> Self { method apply (line 332) | pub fn apply( method apply_for_generation (line 357) | pub fn apply_for_generation(&self, messages: &[Message]) -> Result) -... method without_system (line 380) | pub fn without_system(template: ChatTemplate) -> Self { method with_options (line 389) | pub fn with_options(mut self, options: ChatTemplateOptions) -> Self { method user_turn (line 395) | pub fn user_turn(&mut self, content: impl Into) -> Result) { method add_message (line 406) | pub fn add_message(&mut self, message: Message) { method messages (line 411) | pub fn messages(&self) -> &[Message] { method clear (line 416) | pub fn clear(&mut self) { method format_history (line 429) | pub fn format_history(&self) -> Result { type ChatTemplateError (line 437) | pub enum ChatTemplateError { method fmt (line 446) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { function test_chatml_basic (line 464) | fn test_chatml_basic() { function test_multi_turn_conversation (line 476) | fn test_multi_turn_conversation() { function test_thinking_mode (line 491) | fn test_thinking_mode() { function test_llama3_format (line 506) | fn test_llama3_format() { function test_from_json_config (line 519) | fn test_from_json_config() { FILE: candle-examples/src/coco_classes.rs constant NAMES (line 1) | pub const NAMES: [&str; 80] = [ FILE: candle-examples/src/imagenet.rs constant IMAGENET_MEAN (line 3) | pub const IMAGENET_MEAN: [f32; 3] = [0.485f32, 0.456, 0.406]; constant IMAGENET_STD (line 4) | pub const IMAGENET_STD: [f32; 3] = [0.229f32, 0.224, 0.225]; function load_image_with_std_mean (line 9) | pub fn load_image_with_std_mean>( function load_image (line 35) | pub fn load_image>(p: P, res: usize) -> Result... function load_image224 (line 41) | pub fn load_image224>(p: P) -> Result { function load_image518 (line 48) | pub fn load_image518>(p: P) -> Result { constant CLASS_COUNT (line 52) | pub const CLASS_COUNT: i64 = 1000; constant CLASSES (line 54) | pub const CLASSES: [&str; 1000] = [ FILE: candle-examples/src/lib.rs function device (line 11) | pub fn device(cpu: bool) -> Result { function load_image (line 33) | pub fn load_image>( function load_image_and_resize (line 63) | pub fn load_image_and_resize>( function save_image (line 83) | pub fn save_image>(img: &Tensor, p: P) -> Resu... function save_image_resize (line 100) | pub fn save_image_resize>( function hub_load_safetensors (line 125) | pub fn hub_load_safetensors( function hub_load_local_safetensors (line 151) | pub fn hub_load_local_safetensors>( FILE: candle-examples/src/token_output_stream.rs type TokenOutputStream (line 5) | pub struct TokenOutputStream { method new (line 13) | pub fn new(tokenizer: tokenizers::Tokenizer) -> Self { method into_inner (line 22) | pub fn into_inner(self) -> tokenizers::Tokenizer { method decode (line 26) | fn decode(&self, tokens: &[u32]) -> Result { method next_token (line 34) | pub fn next_token(&mut self, token: u32) -> Result> { method decode_rest (line 53) | pub fn decode_rest(&self) -> Result> { method decode_all (line 69) | pub fn decode_all(&self) -> Result { method get_token (line 73) | pub fn get_token(&self, token_s: &str) -> Option { method tokenizer (line 77) | pub fn tokenizer(&self) -> &tokenizers::Tokenizer { method clear (line 81) | pub fn clear(&mut self) { FILE: candle-examples/src/wav.rs type Sample (line 3) | pub trait Sample { method to_i16 (line 4) | fn to_i16(&self) -> i16; method to_i16 (line 8) | fn to_i16(&self) -> i16 { method to_i16 (line 14) | fn to_i16(&self) -> i16 { method to_i16 (line 20) | fn to_i16(&self) -> i16 { function write_pcm_as_wav (line 25) | pub fn write_pcm_as_wav( FILE: candle-flash-attn-v3/build.rs constant CUDA_NVCC_FLAGS (line 17) | const CUDA_NVCC_FLAGS: Option<&'static str> = option_env!("CUDA_NVCC_FLA... constant KERNEL_FILES (line 19) | const KERNEL_FILES: &[&str] = &[ constant CUTLASS_COMMIT (line 84) | const CUTLASS_COMMIT: &str = "4c42f73fdab5787e3bb57717f35a8cb1b3c0dc6d"; function main (line 86) | fn main() -> Result<()> { FILE: candle-flash-attn-v3/hkernel/combine.h function namespace (line 14) | namespace flash { FILE: candle-flash-attn-v3/hkernel/copy_paged_sm90_tma_cutlass35.hpp type PagedCopyArgs (line 11) | struct PagedCopyArgs { type cute (line 26) | namespace cute { type SM90_TMA_LOAD_PAGED (line 28) | struct SM90_TMA_LOAD_PAGED method CUTE_HOST_DEVICE (line 32) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 39) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 47) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 59) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 93) | CUTE_HOST_DEVICE static void type SM90_TMA_LOAD_MULTICAST_PAGED (line 103) | struct SM90_TMA_LOAD_MULTICAST_PAGED method CUTE_HOST_DEVICE (line 105) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 112) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 120) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 133) | CUTE_HOST_DEVICE static void type SM90_TMA_LOAD_PAGED_OP (line 172) | struct SM90_TMA_LOAD_PAGED_OP : SM90_TMA_LOAD_PAGED {} type Copy_Traits (line 177) | struct Copy_Traits method CUTE_HOST_DEVICE (line 193) | CUTE_HOST_DEVICE constexpr method with (line 202) | with(uint64_t& tma_mbar, [[maybe_unused]] uint16_t const& multicast_... method with (line 210) | with(TmaDescriptor const* new_tma_desc, uint64_t& tma_mbar, [[maybe_... method with (line 217) | with(uint64_t& tma_mbar, [[maybe_unused]] uint16_t const& multicast_... method with (line 225) | with(TmaDescriptor const* new_tma_desc, uint64_t& tma_mbar, [[maybe_... method CUTE_HOST_DEVICE (line 232) | CUTE_HOST_DEVICE constexpr type Copy_Traits (line 250) | struct Copy_Traits type SM90_TMA_LOAD_MULTICAST_PAGED_OP (line 274) | struct SM90_TMA_LOAD_MULTICAST_PAGED_OP : SM90_TMA_LOAD_MULTICAST_PAGE... type Copy_Traits (line 279) | struct Copy_Traits (line 349) | struct Copy_Traits function make_virtualized_tma_copy (line 377) | CUTE_HOST_RTC FILE: candle-flash-attn-v3/hkernel/copy_paged_sm90_tma_cutlass36.hpp type PagedCopyArgs (line 10) | struct PagedCopyArgs { type cute (line 25) | namespace cute { type SM90_TMA_LOAD_PAGED (line 27) | struct SM90_TMA_LOAD_PAGED method CUTE_HOST_DEVICE (line 31) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 38) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 46) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 58) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 92) | CUTE_HOST_DEVICE static void type SM90_TMA_LOAD_MULTICAST_PAGED (line 102) | struct SM90_TMA_LOAD_MULTICAST_PAGED method CUTE_HOST_DEVICE (line 104) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 111) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 119) | CUTE_HOST_DEVICE static void method CUTE_HOST_DEVICE (line 132) | CUTE_HOST_DEVICE static void type SM90_TMA_LOAD_PAGED_OP (line 171) | struct SM90_TMA_LOAD_PAGED_OP : SM90_TMA_LOAD_PAGED {} type Copy_Traits (line 176) | struct Copy_Traits method CUTE_HOST_DEVICE (line 192) | CUTE_HOST_DEVICE constexpr method with (line 201) | with(uint64_t& tma_mbar, [[maybe_unused]] uint16_t const& multicast_... method with (line 209) | with(TmaDescriptor const* new_tma_desc, uint64_t& tma_mbar, [[maybe_... method with (line 216) | with(uint64_t& tma_mbar, [[maybe_unused]] uint16_t const& multicast_... method with (line 224) | with(TmaDescriptor const* new_tma_desc, uint64_t& tma_mbar, [[maybe_... method CUTE_HOST_DEVICE (line 231) | CUTE_HOST_DEVICE constexpr type Copy_Traits (line 249) | struct Copy_Traits type SM90_TMA_LOAD_MULTICAST_PAGED_OP (line 273) | struct SM90_TMA_LOAD_MULTICAST_PAGED_OP : SM90_TMA_LOAD_MULTICAST_PAGE... type Copy_Traits (line 278) | struct Copy_Traits (line 348) | struct Copy_Traits function make_virtualized_tma_copy (line 376) | CUTE_HOST_RTC FILE: candle-flash-attn-v3/hkernel/epilogue_fwd_sm90_tma.hpp type flash (line 15) | namespace flash { type CollectiveEpilogueFwd (line 21) | struct CollectiveEpilogueFwd { type Arguments (line 121) | struct Arguments { type Params (line 129) | struct Params { method Params (line 137) | static Params method CUTLASS_DEVICE (line 150) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 158) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 290) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 297) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 343) | CUTLASS_DEVICE void FILE: candle-flash-attn-v3/hkernel/flash.h type Qkv_params (line 14) | struct Qkv_params { function Qkv_params (line 41) | struct Flash_fwd_params : public Qkv_params { FILE: candle-flash-attn-v3/hkernel/flash_api.cpp function read_and_print_fp16 (line 26) | void read_and_print_fp16(const void* dev_ptr, size_t num_elements, const... function read_and_print_int32 (line 45) | void read_and_print_int32(const int32_t* dev_ptr, size_t num_elements, c... function print_params (line 60) | void print_params(const Flash_fwd_params &p) { function set_params_fprop (line 176) | void set_params_fprop(Flash_fwd_params ¶ms, function set_params_dgrad (line 316) | void set_params_dgrad(Flash_bwd_params ¶ms, function num_splits_heuristic (line 404) | inline int num_splits_heuristic(int batch_nheads_mblocks, int batch_nhea... function set_params_splitkv (line 521) | std::tuple set_params_splitkv(Flash_fwd_params &... function run_mha_fwd (line 570) | void run_mha_fwd(Flash_fwd_params ¶ms, cudaStream_t stream, bool for... function mha_fwd (line 618) | std::vector function mha_varlen_fwd (line 785) | std::vector function run_mha_bwd (line 973) | void run_mha_bwd(Flash_bwd_params ¶ms, cudaStream_t stream) { function mha_bwd (line 998) | std::vector function mha_varlen_bwd (line 1186) | std::vector function mha_fwd_kvcache (line 1404) | std::vector function PYBIND11_MODULE (line 1738) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: candle-flash-attn-v3/hkernel/flash_fwd_kernel.h function namespace (line 23) | namespace flash { function __launch_bounds__ (line 214) | void __launch_bounds__(Ktraits::kNWarps * cutlass::NumThreadsPerWarp, 1) FILE: candle-flash-attn-v3/hkernel/flash_fwd_launch_template.h function typename (line 87) | typename CollectiveEpilogue::Params epilogue_params = [&] { FILE: candle-flash-attn-v3/hkernel/mainloop_fwd_sm90_tma_gmma_ws.hpp type flash (line 21) | namespace flash { type SmemTransposeFp8_64x64 (line 26) | struct SmemTransposeFp8_64x64 { method CUTLASS_DEVICE (line 55) | CUTLASS_DEVICE void operator()(SmemTensor &&s_in, SmemTensorOut &&s_... type CollectiveMainloopFwd (line 84) | struct CollectiveMainloopFwd { type Arguments (line 165) | struct Arguments { type Params (line 190) | struct Params { method Params (line 211) | static Params method CUTLASS_DEVICE (line 249) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 256) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 294) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 315) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 432) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 593) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 610) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 626) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 633) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 648) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 668) | CUTLASS_DEVICE void method CUTLASS_DEVICE (line 868) | CUTLASS_DEVICE void FILE: candle-flash-attn-v3/hkernel/named_barrier.hpp type flash (line 9) | namespace flash { type FwdNamedBarriers (line 14) | enum class FwdNamedBarriers { FILE: candle-flash-attn-v3/hkernel/seq_len.h function namespace (line 13) | namespace flash { function CUTLASS_DEVICE (line 111) | CUTLASS_DEVICE void init_no_guard(int bidb) { function CUTLASS_HOST_DEVICE (line 131) | CUTLASS_HOST_DEVICE VirtualShapeT get_virtual_shape( FILE: candle-flash-attn-v3/hkernel/softmax.h function namespace (line 17) | namespace flash { function __half2 (line 66) | __half2 half_exp(__half2 x) { FILE: candle-flash-attn-v3/hkernel/tile_scheduler.hpp type SingleTileScheduler (line 16) | struct SingleTileScheduler { type Arguments (line 21) | struct Arguments { type Params (line 27) | struct Params {} method Params (line 29) | static Params method dim3 (line 34) | static dim3 type WorkTileInfo (line 39) | struct WorkTileInfo { method CUTLASS_DEVICE (line 45) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 59) | CUTLASS_DEVICE method get_initial_work (line 64) | get_initial_work() const { method CUTLASS_DEVICE (line 68) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 72) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 76) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 81) | CUTLASS_DEVICE class StaticPersistentTileScheduler (line 92) | class StaticPersistentTileScheduler { type Arguments (line 97) | struct Arguments { type Params (line 103) | struct Params { method Params (line 108) | static Params method dim3 (line 118) | static dim3 type WorkTileInfo (line 123) | struct WorkTileInfo { method CUTLASS_DEVICE (line 126) | CUTLASS_DEVICE method if (line 136) | if constexpr(!Is_split) { method else (line 140) | else { method get_initial_work (line 155) | get_initial_work() const { method CUTLASS_DEVICE (line 159) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 163) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 167) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 172) | CUTLASS_DEVICE class DynamicPersistentTileScheduler (line 183) | class DynamicPersistentTileScheduler { type Arguments (line 191) | struct Arguments { type Params (line 197) | struct Params { method Params (line 203) | static Params method dim3 (line 215) | static dim3 type WorkTileInfo (line 220) | struct WorkTileInfo { method CUTLASS_DEVICE (line 223) | CUTLASS_DEVICE method if (line 233) | if constexpr(!Is_split) { method else (line 237) | else { method get_initial_work (line 252) | get_initial_work() const { method CUTLASS_DEVICE (line 256) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 262) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 270) | CUTLASS_DEVICE method CUTLASS_DEVICE (line 281) | CUTLASS_DEVICE FILE: candle-flash-attn-v3/hkernel/utils.h function T (line 45) | T operator()(T const & x, T const & y) { return x > y ? x : y; } function float (line 49) | struct MaxOp { function T (line 58) | T operator()(T const & x, T const & y) { return x + y; } function T (line 67) | T run(T x, Operator &op) { type Allreduce (line 77) | struct Allreduce function T (line 79) | T run(T x, Operator &op) { function __device__ (line 90) | __device__ auto convert_layout_acc_rowcol(Layout acc_layout) { function __device__ (line 109) | __device__ auto convert_layout_acc_transposed_rowcol(Layout acc_layout) { function __device__ (line 123) | __device__ auto convert_layout_acc_Aregs(Layout acc_layout) { function __device__ (line 148) | __device__ auto convert_layout_acc_Aregs_fp8(Layout acc_layout) { function __device__ (line 181) | __device__ auto convert_type(Tensor const &tensor) { function Tensor (line 299) | Tensor gO = [&] { function predicate_fn (line 416) | auto predicate_fn = [&](auto coords) { FILE: candle-flash-attn-v3/src/ffi.rs function run_mha (line 13) | pub(crate) fn run_mha( FILE: candle-flash-attn-v3/src/lib.rs function round_multiple (line 17) | fn round_multiple(x: usize, m: usize) -> usize { type FlashAttn (line 21) | pub struct FlashAttn { method cuda_fwd_t (line 30) | fn cuda_fwd_t< method name (line 234) | fn name(&self) -> &'static str { method cpu_fwd (line 238) | fn cpu_fwd( method cuda_fwd (line 250) | fn cuda_fwd( function flash_attn (line 281) | pub fn flash_attn( function flash_attn_windowed (line 323) | pub fn flash_attn_windowed( function flash_attn_alibi (line 357) | pub fn flash_attn_alibi( function flash_attn_alibi_windowed (line 401) | pub fn flash_attn_alibi_windowed( type FlashAttnVarLen (line 421) | struct FlashAttnVarLen { method cuda_fwd_t (line 434) | fn cuda_fwd_t< method name (line 676) | fn name(&self) -> &'static str { method cpu_fwd (line 680) | fn cpu_fwd( method cuda_fwd (line 692) | fn cuda_fwd( function flash_attn_varlen (line 731) | pub fn flash_attn_varlen( function flash_attn_varlen_windowed (line 789) | pub fn flash_attn_varlen_windowed( function flash_attn_varlen_alibi (line 839) | pub fn flash_attn_varlen_alibi( function flash_attn_varlen_alibi_windowed (line 899) | pub fn flash_attn_varlen_alibi_windowed( FILE: candle-flash-attn-v3/tests/flash_attn_tests.rs function to_vec3_round (line 6) | fn to_vec3_round(t: Tensor, digits: i32) -> Result>>> { function fa_acausal (line 20) | fn fa_acausal(q: &Tensor, k: &Tensor, v: &Tensor, softmax_scale: f32) ->... function flash_attn_acausal (line 33) | fn flash_attn_acausal() -> Result<()> { function flash_attn_acausal_gqa (line 124) | fn flash_attn_acausal_gqa() -> Result<()> { function flash_attn_varlen (line 247) | fn flash_attn_varlen() -> Result<()> { function flash_attn_varlen_param (line 344) | fn flash_attn_varlen_param(head_dim: usize, seq_len: usize, use_gqa_pack... FILE: candle-flash-attn/build.rs constant CUTLASS_COMMIT (line 6) | const CUTLASS_COMMIT: &str = "7d49e6c7e2f8896c47f586706e67e1fb215529dc"; constant KERNEL_FILES (line 8) | const KERNEL_FILES: [&str; 33] = [ function main (line 44) | fn main() -> Result<()> { FILE: candle-flash-attn/kernels/alibi.h function namespace (line 10) | namespace flash { FILE: candle-flash-attn/kernels/block_info.h function namespace (line 7) | namespace flash { FILE: candle-flash-attn/kernels/dropout.h function namespace (line 10) | namespace flash { FILE: candle-flash-attn/kernels/flash.h type Qkv_params (line 18) | struct Qkv_params { function Qkv_params (line 45) | struct Flash_fwd_params : public Qkv_params { function Flash_fwd_params (line 144) | struct Flash_bwd_params : public Flash_fwd_params { FILE: candle-flash-attn/kernels/flash_fwd_kernel.h function namespace (line 23) | namespace flash { FILE: candle-flash-attn/kernels/hardware_info.h function get_current_device (line 25) | inline int get_current_device() { function get_num_sm (line 38) | inline int get_num_sm(int device) { FILE: candle-flash-attn/kernels/kernel_helpers.h function namespace (line 17) | namespace gpu_ops { function string (line 35) | string PackDescriptorAsString(const T &descriptor) { function T (line 40) | T *UnpackDescriptor(const char *opaque, std::size_t opaque_len) { FILE: candle-flash-attn/kernels/kernels.h function namespace (line 12) | namespace gpu_ops { FILE: candle-flash-attn/kernels/mask.h function namespace (line 9) | namespace flash { function apply_mask_local (line 38) | void apply_mask_local(Tensor &tensor, const int col_idx_... FILE: candle-flash-attn/kernels/rotary.h function namespace (line 13) | namespace flash { FILE: candle-flash-attn/kernels/softmax.h function namespace (line 16) | namespace flash { function __forceinline__ (line 133) | __forceinline__ __device__ Softmax() {} FILE: candle-flash-attn/kernels/utils.h function namespace (line 26) | namespace flash { FILE: candle-flash-attn/src/ffi.rs function run_mha (line 4) | pub(crate) fn run_mha( FILE: candle-flash-attn/src/lib.rs type FlashAttn (line 8) | pub struct FlashAttn { method cuda_fwd_t (line 21) | fn cuda_fwd_t< method name (line 216) | fn name(&self) -> &'static str { method cpu_fwd (line 220) | fn cpu_fwd( method cuda_fwd (line 232) | fn cuda_fwd( function round_multiple (line 16) | fn round_multiple(x: usize, m: usize) -> usize { function flash_attn (line 262) | pub fn flash_attn( function flash_attn_windowed (line 302) | pub fn flash_attn_windowed( function flash_attn_alibi (line 334) | pub fn flash_attn_alibi( function flash_attn_alibi_windowed (line 376) | pub fn flash_attn_alibi_windowed( function flash_attn_alibi_windowed_softcap (line 420) | pub fn flash_attn_alibi_windowed_softcap( type FlashAttnVarLen (line 440) | struct FlashAttnVarLen { method cuda_fwd_t (line 453) | fn cuda_fwd_t< method name (line 681) | fn name(&self) -> &'static str { method cpu_fwd (line 685) | fn cpu_fwd( method cuda_fwd (line 697) | fn cuda_fwd( function flash_attn_varlen (line 735) | pub fn flash_attn_varlen( function flash_attn_varlen_windowed (line 791) | pub fn flash_attn_varlen_windowed( function flash_attn_varlen_alibi (line 839) | pub fn flash_attn_varlen_alibi( function flash_attn_varlen_alibi_windowed (line 897) | pub fn flash_attn_varlen_alibi_windowed( function flash_attn_varlen_alibi_windowed_softcap (line 954) | pub fn flash_attn_varlen_alibi_windowed_softcap( FILE: candle-flash-attn/tests/flash_attn_tests.rs function to_vec3_round (line 4) | fn to_vec3_round(t: Tensor, digits: i32) -> Result>>> { function fa_acausal (line 18) | fn fa_acausal(q: &Tensor, k: &Tensor, v: &Tensor, softmax_scale: f32) ->... function fa_acausal_softcap (line 30) | fn fa_acausal_softcap(q: &Tensor, k: &Tensor, v: &Tensor, softcap: f32) ... function flash_attn_acausal (line 45) | fn flash_attn_acausal() -> Result<()> { function flash_attn_acausal_softcap (line 107) | fn flash_attn_acausal_softcap() -> Result<()> { function flash_attn_varlen (line 145) | fn flash_attn_varlen() -> Result<()> { FILE: candle-kernels/build.rs function main (line 5) | fn main() -> Result<()> { FILE: candle-kernels/src/ffi.rs function moe_gemm_wmma (line 5) | pub fn moe_gemm_wmma( function moe_gemm_gguf (line 24) | pub fn moe_gemm_gguf( function moe_gemm_gguf_prefill (line 40) | pub fn moe_gemm_gguf_prefill( FILE: candle-kernels/src/lib.rs type Id (line 7) | pub enum Id { constant ALL_IDS (line 21) | pub const ALL_IDS: [Id; 11] = [ type Module (line 35) | pub struct Module { method index (line 41) | pub fn index(&self) -> usize { method ptx (line 45) | pub fn ptx(&self) -> &'static str { function module_index (line 50) | const fn module_index(id: Id) -> usize { FILE: candle-kernels/src/ptx.rs constant AFFINE (line 1) | pub const AFFINE: &str = include_str!(concat!(env!("OUT_DIR"), "/affine.... constant BINARY (line 2) | pub const BINARY: &str = include_str!(concat!(env!("OUT_DIR"), "/binary.... constant CAST (line 3) | pub const CAST: &str = include_str!(concat!(env!("OUT_DIR"), "/cast.ptx")); constant CONV (line 4) | pub const CONV: &str = include_str!(concat!(env!("OUT_DIR"), "/conv.ptx")); constant FILL (line 5) | pub const FILL: &str = include_str!(concat!(env!("OUT_DIR"), "/fill.ptx")); constant INDEXING (line 6) | pub const INDEXING: &str = include_str!(concat!(env!("OUT_DIR"), "/index... constant QUANTIZED (line 7) | pub const QUANTIZED: &str = include_str!(concat!(env!("OUT_DIR"), "/quan... constant REDUCE (line 8) | pub const REDUCE: &str = include_str!(concat!(env!("OUT_DIR"), "/reduce.... constant SORT (line 9) | pub const SORT: &str = include_str!(concat!(env!("OUT_DIR"), "/sort.ptx")); constant TERNARY (line 10) | pub const TERNARY: &str = include_str!(concat!(env!("OUT_DIR"), "/ternar... constant UNARY (line 11) | pub const UNARY: &str = include_str!(concat!(env!("OUT_DIR"), "/unary.pt... FILE: candle-metal-kernels/examples/metal_benchmarks.rs function run_gemm (line 11) | fn run_gemm(f32: bool, n: usize) -> Result<()> { type Task (line 105) | enum Task { type Args (line 111) | pub struct Args { function main (line 117) | fn main() -> Result<()> { FILE: candle-metal-kernels/src/err.rs type MetalKernelError (line 4) | pub enum MetalKernelError { method bt (line 46) | pub fn bt(self) -> Self { method from (line 60) | fn from(e: std::sync::PoisonError) -> Self { FILE: candle-metal-kernels/src/kernel.rs type KernelName (line 16) | pub enum KernelName { method as_ref (line 22) | fn as_ref(&self) -> &str { method hash (line 31) | fn hash(&self, state: &mut H) { method from (line 50) | fn from(value: &'static str) -> Self { method from (line 56) | fn from(value: String) -> Self { method eq (line 40) | fn eq(&self, other: &Self) -> bool { type Libraries (line 61) | type Libraries = HashMap; type Pipelines (line 62) | type Pipelines = HashMap<(KernelName, Option), ComputePi... type Kernels (line 65) | pub struct Kernels { method new (line 77) | pub fn new() -> Self { method get_library_source (line 86) | fn get_library_source(&self, source: Source) -> &'static str { method load_library (line 108) | pub fn load_library( method load_function (line 129) | fn load_function( method load_pipeline_with_constants (line 145) | pub fn load_pipeline_with_constants( method load_pipeline (line 171) | pub fn load_pipeline( method default (line 71) | fn default() -> Self { function get_compile_options (line 181) | fn get_compile_options() -> Retained { FILE: candle-metal-kernels/src/kernels/affine.rs function call_affine (line 7) | pub fn call_affine( function call_affine_strided (line 37) | pub fn call_affine_strided( function call_powf (line 78) | pub fn call_powf( function call_powf_strided (line 107) | pub fn call_powf_strided( function call_elu (line 138) | pub fn call_elu( function call_elu_strided (line 167) | pub fn call_elu_strided( FILE: candle-metal-kernels/src/kernels/binary.rs function call_binary_contiguous (line 10) | pub fn call_binary_contiguous( function call_binary_strided (line 41) | pub fn call_binary_strided( FILE: candle-metal-kernels/src/kernels/cast.rs function call_cast_contiguous (line 7) | pub fn call_cast_contiguous( function call_cast_strided (line 35) | pub fn call_cast_strided( FILE: candle-metal-kernels/src/kernels/convolution.rs function call_im2col1d_strided (line 7) | pub fn call_im2col1d_strided( function call_col2im1d (line 37) | pub fn call_col2im1d( function call_im2col_strided (line 69) | pub fn call_im2col_strided( function call_upsample_nearest_2d (line 107) | pub fn call_upsample_nearest_2d( function call_upsample_bilinear_2d (line 138) | pub fn call_upsample_bilinear_2d( function call_pool2d (line 185) | pub fn call_pool2d( function call_conv_transpose1d (line 218) | pub fn call_conv_transpose1d( type CallConvTranspose2dCfg (line 270) | pub struct CallConvTranspose2dCfg<'a> { function call_conv_transpose2d (line 288) | pub fn call_conv_transpose2d( FILE: candle-metal-kernels/src/kernels/fill.rs function call_const_fill (line 8) | pub fn call_const_fill( FILE: candle-metal-kernels/src/kernels/indexing.rs function call_index_select (line 7) | pub fn call_index_select( function call_gather (line 61) | pub fn call_gather( function call_scatter (line 109) | pub fn call_scatter( function call_index_add (line 158) | pub fn call_index_add( FILE: candle-metal-kernels/src/kernels/mlx_gemm.rs type GemmDType (line 7) | pub enum GemmDType { type TileConfig (line 20) | struct TileConfig { method new (line 29) | const fn new(bm: usize, bn: usize, bk: usize, wm: usize, wn: usize) ->... constant TILE_32_32_16_2_2 (line 38) | const TILE_32_32_16_2_2: TileConfig = TileConfig::new(32, 32, 16, 2, 2); constant TILE_64_64_16_2_2 (line 39) | const TILE_64_64_16_2_2: TileConfig = TileConfig::new(64, 64, 16, 2, 2); constant TILE_64_64_16_1_2 (line 40) | const TILE_64_64_16_1_2: TileConfig = TileConfig::new(64, 64, 16, 1, 2); constant TILE_64_32_32_2_2 (line 41) | const TILE_64_32_32_2_2: TileConfig = TileConfig::new(64, 32, 32, 2, 2); constant TILE_32_64_16_1_2 (line 42) | const TILE_32_64_16_1_2: TileConfig = TileConfig::new(32, 64, 16, 1, 2); function select_tile_config (line 56) | fn select_tile_config( function check_batch_collapse (line 191) | fn check_batch_collapse( function should_use_split_k (line 245) | fn should_use_split_k(b: usize, m: usize, n: usize, k: usize) -> bool { function call_mlx_gemm (line 256) | pub fn call_mlx_gemm( FILE: candle-metal-kernels/src/kernels/quantized.rs type GgmlDType (line 6) | pub enum GgmlDType { function call_quantized_matmul_mv_t (line 25) | pub fn call_quantized_matmul_mv_t( function call_quantized_matmul_mm_t (line 181) | pub fn call_quantized_matmul_mm_t( function divide (line 286) | fn divide(m: usize, b: usize) -> usize { FILE: candle-metal-kernels/src/kernels/random.rs function call_random_uniform (line 7) | pub fn call_random_uniform( function call_random_normal (line 41) | pub fn call_random_normal( FILE: candle-metal-kernels/src/kernels/reduce.rs function call_reduce_contiguous (line 7) | pub fn call_reduce_contiguous( function call_reduce_strided (line 62) | pub fn call_reduce_strided( function call_last_softmax (line 120) | pub fn call_last_softmax( function call_rms_norm (line 168) | pub fn call_rms_norm( function call_layer_norm (line 226) | pub fn call_layer_norm( function call_rope_i (line 289) | pub fn call_rope_i( function call_rope_thd (line 332) | pub fn call_rope_thd( function call_rope (line 379) | pub fn call_rope( FILE: candle-metal-kernels/src/kernels/sdpa.rs type SdpaDType (line 9) | pub enum SdpaDType { function call_sdpa_full (line 22) | pub fn call_sdpa_full( function call_sdpa_vector (line 244) | pub fn call_sdpa_vector( constant SDPA_2PASS_BLOCKS (line 349) | pub const SDPA_2PASS_BLOCKS: usize = 32; function call_sdpa_vector_2pass (line 356) | pub fn call_sdpa_vector_2pass( FILE: candle-metal-kernels/src/kernels/sort.rs function call_arg_sort (line 7) | pub fn call_arg_sort( function mlx_dtype_str (line 43) | fn mlx_dtype_str(dtype: DType) -> &'static str { function multi_block_sort (line 55) | fn multi_block_sort( function block_sort (line 219) | fn block_sort( function call_mlx_arg_sort (line 266) | pub fn call_mlx_arg_sort( FILE: candle-metal-kernels/src/kernels/ternary.rs function call_where_cond (line 10) | pub fn call_where_cond( FILE: candle-metal-kernels/src/kernels/unary.rs function call_unary_contiguous (line 16) | pub fn call_unary_contiguous( function call_unary_strided (line 44) | pub fn call_unary_strided( function call_const_set_contiguous (line 71) | pub fn call_const_set_contiguous( function call_const_set_strided (line 97) | pub fn call_const_set_strided( type Kernel (line 123) | pub struct Kernel(pub &'static str); constant FLOAT (line 124) | pub const FLOAT: Kernel = Kernel("copy2d_f32"); constant HALF (line 125) | pub const HALF: Kernel = Kernel("copy2d_f16"); constant BFLOAT (line 126) | pub const BFLOAT: Kernel = Kernel("copy2d_bf16"); constant I64 (line 127) | pub const I64: Kernel = Kernel("copy2d_i64"); constant U32 (line 128) | pub const U32: Kernel = Kernel("copy2d_u32"); constant U8 (line 129) | pub const U8: Kernel = Kernel("copy2d_u8"); function call_copy2d (line 133) | pub fn call_copy2d( FILE: candle-metal-kernels/src/lib.rs constant RESOURCE_OPTIONS (line 24) | pub const RESOURCE_OPTIONS: MTLResourceOptions = type DType (line 30) | pub enum DType { method size_in_bytes (line 40) | fn size_in_bytes(&self) -> usize { FILE: candle-metal-kernels/src/metal/buffer.rs type MetalResource (line 6) | pub type MetalResource = ProtocolObject; type MTLResourceOptions (line 7) | pub type MTLResourceOptions = objc2_metal::MTLResourceOptions; type Buffer (line 10) | pub struct Buffer { method new (line 18) | pub fn new(raw: Retained>) -> Buffer { method contents (line 22) | pub fn contents(&self) -> *mut u8 { method data (line 26) | pub fn data(&self) -> *mut u8 { method length (line 31) | pub fn length(&self) -> usize { method did_modify_range (line 35) | pub fn did_modify_range(&self, range: NSRange) { method as_ref (line 41) | fn as_ref(&self) -> &ProtocolObject { function from (line 47) | fn from(val: &'a Buffer) -> Self { type BufferMap (line 52) | pub type BufferMap = HashMap>>; FILE: candle-metal-kernels/src/metal/command_buffer.rs type CommandStatus (line 9) | pub enum CommandStatus { type CommandSemaphore (line 16) | pub struct CommandSemaphore { method new (line 22) | pub fn new() -> CommandSemaphore { method wait_until (line 29) | pub fn wait_until bool>( method set_status (line 38) | pub fn set_status(&self, status: CommandStatus) { method when (line 44) | pub fn when bool, F: FnMut() -> T>( type CommandBuffer (line 61) | pub struct CommandBuffer { method new (line 70) | pub fn new( method compute_command_encoder (line 77) | pub fn compute_command_encoder(&self) -> ComputeCommandEncoder { method blit_command_encoder (line 84) | pub fn blit_command_encoder(&self) -> BlitCommandEncoder { method commit (line 91) | pub fn commit(&self) { method enqueue (line 95) | pub fn enqueue(&self) { method set_label (line 99) | pub fn set_label(&self, label: &str) { method status (line 103) | pub fn status(&self) -> MTLCommandBufferStatus { method error (line 107) | pub fn error(&self) -> Option> { method wait_until_completed (line 117) | pub fn wait_until_completed(&self) { method as_ref (line 123) | fn as_ref(&self) -> &ProtocolObject { FILE: candle-metal-kernels/src/metal/commands.rs type CommandQueue (line 12) | pub type CommandQueue = Retained>; constant DEFAULT_CANDLE_METAL_COMPUTE_PER_BUFFER (line 14) | const DEFAULT_CANDLE_METAL_COMPUTE_PER_BUFFER: usize = 50; constant DEFAULT_CANDLE_METAL_COMMAND_POOL_SIZE (line 15) | const DEFAULT_CANDLE_METAL_COMMAND_POOL_SIZE: usize = 5; function create_command_buffer (line 18) | pub fn create_command_buffer( type EntryState (line 30) | struct EntryState { type CommandBufferEntry (line 38) | pub struct CommandBufferEntry { type Commands (line 44) | pub struct Commands { method new (line 59) | pub fn new(command_queue: CommandQueue) -> Result Result<(bool, ComputeCommandEncoder),... method blit_command_encoder (line 106) | pub fn blit_command_encoder(&self) -> Result<(bool, BlitCommandEncoder... method wait_until_completed (line 111) | pub fn wait_until_completed(&self) -> Result<(), MetalKernelError> { method select_entry (line 118) | fn select_entry(&self) -> Result, MetalKernelE... method finalize_entry (line 151) | fn finalize_entry( method flush_and_wait (line 176) | pub fn flush_and_wait(&self) -> Result<(), MetalKernelError> { method flush (line 206) | pub fn flush(&self) -> Result<(), MetalKernelError> { method commit_swap_locked (line 224) | fn commit_swap_locked( method ensure_completed (line 239) | fn ensure_completed(cb: &CommandBuffer) -> Result<(), MetalKernelError> { method drop (line 264) | fn drop(&mut self) { FILE: candle-metal-kernels/src/metal/compute_pipeline.rs type ComputePipeline (line 5) | pub struct ComputePipeline { method new (line 13) | pub fn new(raw: Retained>)... method max_total_threads_per_threadgroup (line 17) | pub fn max_total_threads_per_threadgroup(&self) -> usize { method as_ref (line 23) | fn as_ref(&self) -> &ProtocolObject { FILE: candle-metal-kernels/src/metal/device.rs type MetalDeviceType (line 19) | pub enum MetalDeviceType { type Device (line 33) | pub struct Device { method as_ref (line 40) | fn as_ref(&self) -> &ProtocolObject { method registry_id (line 46) | pub fn registry_id(&self) -> u64 { method all (line 50) | pub fn all() -> Vec { method system_default (line 57) | pub fn system_default() -> Option { method new_buffer (line 61) | pub fn new_buffer( method new_buffer_with_data (line 74) | pub fn new_buffer_with_data( method new_library_with_source (line 91) | pub fn new_library_with_source( method new_compute_pipeline_state_with_function (line 104) | pub fn new_compute_pipeline_state_with_function( method new_command_queue (line 115) | pub fn new_command_queue(&self) -> Result usize { method current_allocated_size (line 124) | pub fn current_allocated_size(&self) -> usize { method architecture_name (line 136) | pub fn architecture_name(&self) -> String { method device_type (line 145) | pub fn device_type(&self) -> MetalDeviceType { FILE: candle-metal-kernels/src/metal/encoder.rs type ComputeCommandEncoder (line 9) | pub struct ComputeCommandEncoder { method as_ref (line 15) | fn as_ref(&self) -> &ComputeCommandEncoder { method new (line 20) | pub fn new( method signal_encoding_ended (line 27) | pub(crate) fn signal_encoding_ended(&self) { method set_threadgroup_memory_length (line 31) | pub fn set_threadgroup_memory_length(&self, index: usize, length: usiz... method dispatch_threads (line 35) | pub fn dispatch_threads(&self, threads_per_grid: MTLSize, threads_per_... method dispatch_thread_groups (line 40) | pub fn dispatch_thread_groups( method set_buffer (line 51) | pub fn set_buffer(&self, index: usize, buffer: Option<&Buffer>, offset... method set_bytes_directly (line 58) | pub fn set_bytes_directly(&self, index: usize, length: usize, bytes: *... method set_bytes (line 63) | pub fn set_bytes(&self, index: usize, data: &T) { method set_compute_pipeline_state (line 69) | pub fn set_compute_pipeline_state(&self, pipeline: &ComputePipeline) { method use_resource (line 73) | pub fn use_resource<'a>( method end_encoding (line 81) | pub fn end_encoding(&self) { method encode_pipeline (line 87) | pub fn encode_pipeline(&mut self, pipeline: &ComputePipeline) { method set_label (line 92) | pub fn set_label(&self, label: &str) { method drop (line 98) | fn drop(&mut self) { type BlitCommandEncoder (line 103) | pub struct BlitCommandEncoder { method as_ref (line 109) | fn as_ref(&self) -> &BlitCommandEncoder { method new (line 115) | pub fn new( method signal_encoding_ended (line 122) | pub(crate) fn signal_encoding_ended(&self) { method end_encoding (line 126) | pub fn end_encoding(&self) { method set_label (line 132) | pub fn set_label(&self, label: &str) { method copy_from_buffer (line 137) | pub fn copy_from_buffer( method fill_buffer (line 157) | pub fn fill_buffer(&self, buffer: &Buffer, range: (usize, usize), valu... FILE: candle-metal-kernels/src/metal/library.rs type Library (line 8) | pub struct Library { method new (line 15) | pub fn new(raw: Retained>) -> Library { method get_function (line 19) | pub fn get_function( type Function (line 42) | pub struct Function { method as_ref (line 47) | fn as_ref(&self) -> &ProtocolObject { type FunctionConstantValues (line 52) | pub struct FunctionConstantValues { method new (line 57) | pub fn new() -> FunctionConstantValues { method set_constant_value_at_index (line 63) | pub fn set_constant_value_at_index(&self, value: &T, dtype: MTLData... method default (line 70) | fn default() -> Self { type Value (line 76) | pub enum Value { method hash (line 84) | fn hash(&self, state: &mut H) { method data_type (line 95) | fn data_type(&self) -> MTLDataType { type ConstantValues (line 111) | pub struct ConstantValues(Vec<(usize, Value)>); method new (line 114) | pub fn new(values: Vec<(usize, Value)>) -> Self { method function_constant_values (line 118) | fn function_constant_values(&self) -> FunctionConstantValues { FILE: candle-metal-kernels/src/source.rs constant AFFINE (line 1) | pub const AFFINE: &str = include_str!("metal_src/affine.metal"); constant BINARY (line 2) | pub const BINARY: &str = include_str!("metal_src/binary.metal"); constant CAST (line 3) | pub const CAST: &str = include_str!("metal_src/cast.metal"); constant CONV (line 4) | pub const CONV: &str = include_str!("metal_src/conv.metal"); constant FILL (line 5) | pub const FILL: &str = include_str!("metal_src/fill.metal"); constant INDEXING (line 6) | pub const INDEXING: &str = include_str!("metal_src/indexing.metal"); constant MLX_GEMM (line 7) | pub const MLX_GEMM: &str = include_str!("metal_src/mlx_gemm.metal"); constant MLX_SORT (line 8) | pub const MLX_SORT: &str = include_str!("metal_src/mlx_sort.metal"); constant QUANTIZED (line 9) | pub const QUANTIZED: &str = include_str!("metal_src/quantized.metal"); constant RANDOM (line 10) | pub const RANDOM: &str = include_str!("metal_src/random.metal"); constant REDUCE (line 11) | pub const REDUCE: &str = include_str!("metal_src/reduce.metal"); constant SORT (line 12) | pub const SORT: &str = include_str!("metal_src/sort.metal"); constant TERNARY (line 13) | pub const TERNARY: &str = include_str!("metal_src/ternary.metal"); constant UNARY (line 14) | pub const UNARY: &str = include_str!("metal_src/unary.metal"); constant SDPA (line 15) | pub const SDPA: &str = include_str!("metal_src/scaled_dot_product_attent... type Source (line 18) | pub enum Source { FILE: candle-metal-kernels/src/tests.rs function read_to_vec (line 10) | fn read_to_vec(buffer: &Buffer, n: usize) -> Vec { function new_buffer (line 17) | fn new_buffer(device: &Device, data: &[T]) -> Buffer { function device (line 24) | fn device() -> Device { function approx (line 28) | fn approx(v: Vec, digits: i32) -> Vec { function approx_f16 (line 33) | fn approx_f16(v: Vec, digits: i32) -> Vec { function approx_bf16 (line 38) | fn approx_bf16(v: Vec, digits: i32) -> Vec { function run (line 43) | fn run(v: &[T], name: unary::contiguous::Kernel) -> Vec { function run_binary (line 71) | fn run_binary(x: &[T], y: &[T], name: S) -> Vec { function run_strided (line 100) | fn run_strided( function cos_f32 (line 139) | fn cos_f32() { function cos_f32_strided (line 154) | fn cos_f32_strided() { function cos_strided_random (line 214) | fn cos_strided_random() { function gelu_f16 (line 238) | fn gelu_f16() { function gelu_f32 (line 249) | fn gelu_f32() { function silu_f16 (line 257) | fn silu_f16() { function silu_f32 (line 268) | fn silu_f32() { function binary_add_f32 (line 276) | fn binary_add_f32() { function binary_ops_bf16 (line 290) | fn binary_ops_bf16() { function run_cast (line 320) | fn run_cast(v: &[T], name: &'static str) -> Vec { function cast_f32 (line 348) | fn cast_f32() { function cast_f16 (line 379) | fn cast_f16() { function cast_bf16 (line 410) | fn cast_bf16() { function cast_u32 (line 441) | fn cast_u32() { function cast_u8 (line 472) | fn cast_u8() { function cast_i64 (line 503) | fn cast_i64() { function run_affine (line 533) | fn run_affine(v: &[T], mul: f64, add: f64) -> Vec { function run_affine_strided (line 564) | fn run_affine_strided( function affine (line 601) | fn affine() { function affine_strided (line 616) | fn affine_strided() { function run_mlx_sort (line 627) | fn run_mlx_sort(v: &[T], ncols: usize) -> Vec { function mlx_sort (line 656) | fn mlx_sort() { function index_select (line 692) | fn index_select() { function index_select_strided (line 714) | fn index_select_strided() { function index_select_f16 (line 725) | fn index_select_f16() { function index_select_is_u32_bf16 (line 742) | fn index_select_is_u32_bf16() { function index_select_is_u8_bf16 (line 756) | fn index_select_is_u8_bf16() { function index_select_is_u32_i64 (line 770) | fn index_select_is_u32_i64() { function index_select_is_u8_i64 (line 781) | fn index_select_is_u8_i64() { function index_select_is_i64_i64 (line 792) | fn index_select_is_i64_i64() { function index_select_dim1 (line 803) | fn index_select_dim1() { function run_index_select (line 816) | fn run_index_select( function run_index_select_strided (line 861) | fn run_index_select_strided( function cos_f16 (line 907) | fn cos_f16() { function run_reduce (line 918) | fn run_reduce( function run_softmax (line 958) | fn run_softmax(v: &[T], last_dim: usize, nam... function create_array (line 984) | const fn create_array() -> [f32; N] { function correct_sum (line 994) | const fn correct_sum() -> [f32; D] { function correct_max (line 1011) | const fn correct_max() -> [f32; D] { function correct_argmax (line 1025) | fn correct_argmax(arr: [f32; N]) -> [u32... function reduce_sum_case (line 1050) | fn reduce_sum_case() { function reduce_max_case (line 1060) | fn reduce_max_case() { function reduce_argmax_case (line 1070) | fn reduce_argmax_case() { function reduce_sum1 (line 1081) | fn reduce_sum1() { function reduce_sum2 (line 1095) | fn reduce_sum2() { function reduce_max (line 1108) | fn reduce_max() { function reduce_argmax (line 1142) | fn reduce_argmax() { function reduce_argmax2 (line 1155) | fn reduce_argmax2() { function softmax (line 1168) | fn softmax() { function run_where_cond (line 1234) | fn run_where_cond( function where_cond (line 1315) | fn where_cond() { function where_cond_u32_f32 (line 1336) | fn where_cond_u32_f32() { function run_mlx_gemm (line 1358) | fn run_mlx_gemm( function mlx_gemm (line 1415) | fn mlx_gemm() { function run_random (line 1518) | fn run_random(name: &'static str, seed: u64, length: usize, a:... function random (line 1572) | fn random() { function run_scatter_add (line 1644) | fn run_scatter_add( function scatter_add (line 1681) | fn scatter_add() { function run_index_add (line 1749) | fn run_index_add( function index_add (line 1785) | fn index_add() { function run_pool2d (line 1864) | fn run_pool2d( function max_pool2d_f32 (line 1906) | fn max_pool2d_f32() { function max_pool2d_f16 (line 1943) | fn max_pool2d_f16() { function max_pool2d_bf16 (line 1986) | fn max_pool2d_bf16() { function max_pool2d_u8 (line 2029) | fn max_pool2d_u8() { function max_pool2d_u32 (line 2066) | fn max_pool2d_u32() { function avg_pool2d_f32 (line 2103) | fn avg_pool2d_f32() { function avg_pool2d_f16 (line 2125) | fn avg_pool2d_f16() { function avg_pool2d_bf16 (line 2150) | fn avg_pool2d_bf16() { function avg_pool2d_u8 (line 2175) | fn avg_pool2d_u8() { function avg_pool2d_u32 (line 2195) | fn avg_pool2d_u32() { function run_conv_transpose1d (line 2215) | fn run_conv_transpose1d( function conv_transpose1d_f32 (line 2275) | fn conv_transpose1d_f32() { function conv_transpose1d_f16 (line 2303) | fn conv_transpose1d_f16() { function conv_transpose1d_bf16 (line 2340) | fn conv_transpose1d_bf16() { function conv_transpose1d_u8 (line 2377) | fn conv_transpose1d_u8() { function conv_transpose1d_u32 (line 2405) | fn conv_transpose1d_u32() { function const_fill (line 2433) | fn const_fill() { function commands_creation_and_encoder (line 2467) | fn commands_creation_and_encoder() { function commands_rotation_threshold (line 2477) | fn commands_rotation_threshold() { function commands_concurrent_acquisition (line 2499) | fn commands_concurrent_acquisition() { FILE: candle-metal-kernels/src/utils.rs function linear_split (line 11) | pub(crate) fn linear_split(pipeline: &ComputePipeline, length: usize) ->... function get_block_dims (line 30) | pub fn get_block_dims(dim0: usize, dim1: usize, dim2: usize) -> MTLSize { function get_tile_size (line 70) | pub fn get_tile_size(dtype_size: usize) -> usize { function set_param (line 74) | pub fn set_param(encoder: &ComputeCommandEncoder, posit... type EncoderParam (line 81) | pub trait EncoderParam { method set_param (line 82) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 120) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 126) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 132) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 138) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 144) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 150) | fn set_param(encoder: &ComputeCommandEncoder, position: usize, data: S... method set_param (line 156) | fn set_param(_: &ComputeCommandEncoder, _: usize, _: Self) {} type BufferOffset (line 105) | pub struct BufferOffset<'a> { function zero_offset (line 111) | pub fn zero_offset(buffer: &'a Buffer) -> Self { type EncoderProvider (line 170) | pub trait EncoderProvider { method encoder (line 175) | fn encoder(&self) -> Self::Encoder<'_>; type Encoder (line 198) | type Encoder<'a> method encoder (line 202) | fn encoder(&self) -> Self::Encoder<'_> { type Encoder (line 208) | type Encoder<'a> method encoder (line 212) | fn encoder(&self) -> Self::Encoder<'_> { type WrappedEncoder (line 178) | pub struct WrappedEncoder<'a> { method drop (line 184) | fn drop(&mut self) { function as_ref (line 192) | fn as_ref(&self) -> &ComputeCommandEncoder { type RwLockGuard (line 220) | pub enum RwLockGuard<'a, T> { type Target (line 226) | type Target = T; method deref (line 228) | fn deref(&self) -> &Self::Target { function from (line 237) | fn from(g: RwLockReadGuard<'a, T>) -> Self { function from (line 243) | fn from(g: RwLockWriteGuard<'a, T>) -> Self { function is_truthy (line 248) | fn is_truthy(s: String) -> bool { function get_env_bool (line 255) | pub(crate) fn get_env_bool>(key: K, default: bool) -> bo... FILE: candle-nn/benches/benchmarks/conv.rs constant B (line 8) | const B: usize = 1; constant C (line 9) | const C: usize = 1; function run (line 11) | fn run(input: Tensor, weight: Tensor, bias: Option, config: Conv... function run_conv2d_benchmark (line 15) | fn run_conv2d_benchmark( function criterion_benchmark (line 57) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-nn/benches/benchmarks/mod.rs type BenchDevice (line 7) | pub(crate) trait BenchDevice { method sync (line 8) | fn sync(&self) -> Result<()>; method bench_name (line 10) | fn bench_name>(&self, name: S) -> String; method sync (line 14) | fn sync(&self) -> Result<()> { method bench_name (line 35) | fn bench_name>(&self, name: S) -> String { type BenchDeviceHandler (line 53) | struct BenchDeviceHandler { method new (line 58) | pub fn new() -> Result { FILE: candle-nn/benches/benchmarks/norm.rs function run_layer_norm (line 8) | fn run_layer_norm(input: &Tensor, weight: &Tensor, bias: &Tensor) { function run_rms_norm (line 12) | fn run_rms_norm(input: &Tensor, weight: &Tensor) { constant B (line 16) | const B: usize = 1; constant M (line 17) | const M: usize = 1024; constant K (line 18) | const K: usize = 1024; function run_layer_norm_benchmark (line 20) | fn run_layer_norm_benchmark(c: &mut Criterion, device: &Device, dtype: D... function run_rms_norm_benchmark (line 46) | fn run_rms_norm_benchmark(c: &mut Criterion, device: &Device, dtype: DTy... function criterion_benchmark (line 71) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-nn/benches/benchmarks/softmax.rs function run (line 9) | fn run(input: &Tensor) { constant B (line 13) | const B: usize = 1; constant M (line 14) | const M: usize = 1024; constant K (line 15) | const K: usize = 1024; function run_softmax_benchmark (line 17) | fn run_softmax_benchmark(c: &mut Criterion, device: &Device, dtype: DTyp... function criterion_benchmark (line 41) | fn criterion_benchmark(c: &mut Criterion) { FILE: candle-nn/examples/basic_optimizer.rs function gen_data (line 10) | fn gen_data() -> Result<(Tensor, Tensor)> { function main (line 20) | fn main() -> Result<()> { FILE: candle-nn/examples/cpu_benchmarks.rs constant CHECK_CONV2D (line 12) | const CHECK_CONV2D: bool = false; type Benchmark (line 14) | trait Benchmark { method preprocess (line 18) | fn preprocess() -> Result; method run_one (line 19) | fn run_one(_: &Self::PreProcessData) -> Result; constant ITERS (line 21) | const ITERS: usize; type PreProcessData (line 108) | type PreProcessData = (Tensor, Tensor); type RunResult (line 109) | type RunResult = Tensor; method preprocess (line 110) | fn preprocess() -> Result { method run_one (line 116) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 120) | const ITERS: usize = 5; type PreProcessData (line 126) | type PreProcessData = (Tensor, Tensor); type RunResult (line 127) | type RunResult = Tensor; method preprocess (line 129) | fn preprocess() -> Result { method run_one (line 135) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 139) | const ITERS: usize = 5; type PreProcessData (line 145) | type PreProcessData = (Tensor, Tensor); type RunResult (line 146) | type RunResult = Tensor; method preprocess (line 148) | fn preprocess() -> Result { method run_one (line 154) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 180) | const ITERS: usize = 5; type PreProcessData (line 185) | type PreProcessData = (Tensor, Tensor); type RunResult (line 186) | type RunResult = Tensor; method preprocess (line 187) | fn preprocess() -> Result { method run_one (line 193) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 197) | const ITERS: usize = 100; type PreProcessData (line 202) | type PreProcessData = (Tensor, Tensor); type RunResult (line 203) | type RunResult = Tensor; method preprocess (line 204) | fn preprocess() -> Result { method run_one (line 210) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 214) | const ITERS: usize = 100; type PreProcessData (line 221) | type PreProcessData = (candle::quantized::QMatMul, Tensor); type RunResult (line 222) | type RunResult = Tensor; method preprocess (line 223) | fn preprocess() -> Result { method run_one (line 234) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 238) | const ITERS: usize = 100; type PreProcessData (line 243) | type PreProcessData = (Tensor, Tensor); type RunResult (line 244) | type RunResult = Tensor; method preprocess (line 245) | fn preprocess() -> Result { method run_one (line 251) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 255) | const ITERS: usize = 1000; type PreProcessData (line 260) | type PreProcessData = Tensor; type RunResult (line 261) | type RunResult = Tensor; method preprocess (line 262) | fn preprocess() -> Result { method run_one (line 268) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 272) | const ITERS: usize = 100; type PreProcessData (line 277) | type PreProcessData = Tensor; type RunResult (line 278) | type RunResult = Tensor; method preprocess (line 279) | fn preprocess() -> Result { method run_one (line 285) | fn run_one(d: &Self::PreProcessData) -> Result { constant ITERS (line 289) | const ITERS: usize = 100; type Im2Col (line 24) | struct Im2Col { method hw_out (line 33) | fn hw_out(&self, h: usize, w: usize) -> (usize, usize) { method name (line 41) | fn name(&self) -> &'static str { method cpu_fwd (line 45) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(Cp... type Conv1d (line 106) | struct Conv1d; type Conv2d (line 124) | struct Conv2d; type Conv2dIm2Col (line 143) | struct Conv2dIm2Col; type MatMul (line 183) | struct MatMul; type MatVec (line 200) | struct MatVec; type QMatMul (line 219) | struct QMatMul; type Cat (line 241) | struct Cat; type Softmax (line 258) | struct Softmax; type SoftmaxLastDim (line 275) | struct SoftmaxLastDim; function run (line 292) | fn run(iters: Option) -> Result<()> { type Task (line 306) | enum Task { type Args (line 320) | pub struct Args { function main (line 329) | fn main() -> Result<()> { FILE: candle-nn/src/activation.rs type Activation (line 7) | pub enum Activation { method forward (line 30) | fn forward(&self, xs: &Tensor) -> Result { type PReLU (line 53) | pub struct PReLU { method new (line 59) | pub fn new(weight: Tensor, is_scalar: bool) -> Self { method weight (line 63) | pub fn weight(&self) -> &Tensor { method is_scalar (line 67) | pub fn is_scalar(&self) -> bool { method forward (line 73) | fn forward(&self, xs: &Tensor) -> Result { function prelu (line 104) | pub fn prelu(num_channels: Option, vs: crate::VarBuilder) -> Resu... FILE: candle-nn/src/batch_norm.rs type BatchNormConfig (line 13) | pub struct BatchNormConfig { method from (line 39) | fn from(eps: f64) -> Self { method default (line 28) | fn default() -> Self { type BatchNorm (line 48) | pub struct BatchNorm { method check_validity (line 58) | fn check_validity(&self, num_features: usize) -> Result<()> { method new (line 97) | pub fn new( method new_no_bias (line 117) | pub fn new_no_bias( method new_with_momentum (line 135) | pub fn new_with_momentum( method new_no_bias_with_momentum (line 156) | pub fn new_no_bias_with_momentum( method running_mean (line 175) | pub fn running_mean(&self) -> &Tensor { method running_var (line 179) | pub fn running_var(&self) -> &Tensor { method eps (line 183) | pub fn eps(&self) -> f64 { method weight_and_bias (line 187) | pub fn weight_and_bias(&self) -> Option<(&Tensor, &Tensor)> { method momentum (line 191) | pub fn momentum(&self) -> f64 { method forward_train (line 195) | pub fn forward_train(&self, x: &Tensor) -> Result { method forward_eval (line 255) | fn forward_eval(&self, x: &Tensor) -> Result { method forward_t (line 292) | fn forward_t(&self, x: &Tensor, train: bool) -> Result { function batch_norm (line 301) | pub fn batch_norm>( FILE: candle-nn/src/conv.rs type Conv1dConfig (line 6) | pub struct Conv1dConfig { method default (line 15) | fn default() -> Self { type Conv1d (line 27) | pub struct Conv1d { method new (line 34) | pub fn new(weight: Tensor, bias: Option, config: Conv1dConfig)... method config (line 42) | pub fn config(&self) -> &Conv1dConfig { method weight (line 46) | pub fn weight(&self) -> &Tensor { method bias (line 50) | pub fn bias(&self) -> Option<&Tensor> { method forward (line 56) | fn forward(&self, x: &Tensor) -> Result { type ConvTranspose1dConfig (line 77) | pub struct ConvTranspose1dConfig { method default (line 86) | fn default() -> Self { type ConvTranspose1d (line 98) | pub struct ConvTranspose1d { method new (line 105) | pub fn new(weight: Tensor, bias: Option, config: ConvTranspose... method config (line 113) | pub fn config(&self) -> &ConvTranspose1dConfig { method weight (line 117) | pub fn weight(&self) -> &Tensor { method bias (line 121) | pub fn bias(&self) -> Option<&Tensor> { method forward (line 127) | fn forward(&self, x: &Tensor) -> Result { type Conv2dConfig (line 148) | pub struct Conv2dConfig { method default (line 157) | fn default() -> Self { type Conv2d (line 169) | pub struct Conv2d { method new (line 176) | pub fn new(weight: Tensor, bias: Option, config: Conv2dConfig)... method config (line 184) | pub fn config(&self) -> &Conv2dConfig { method weight (line 188) | pub fn weight(&self) -> &Tensor { method bias (line 192) | pub fn bias(&self) -> Option<&Tensor> { method absorb_bn (line 196) | pub fn absorb_bn(&self, bn: &BatchNorm) -> Result { method forward (line 218) | fn forward(&self, x: &Tensor) -> Result { type ConvTranspose2dConfig (line 239) | pub struct ConvTranspose2dConfig { method default (line 248) | fn default() -> Self { type ConvTranspose2d (line 259) | pub struct ConvTranspose2d { method new (line 266) | pub fn new(weight: Tensor, bias: Option, config: ConvTranspose... method config (line 274) | pub fn config(&self) -> &ConvTranspose2dConfig { method weight (line 278) | pub fn weight(&self) -> &Tensor { method bias (line 282) | pub fn bias(&self) -> Option<&Tensor> { method forward (line 288) | fn forward(&self, x: &Tensor) -> Result { function conv1d (line 307) | pub fn conv1d( function conv1d_no_bias (line 329) | pub fn conv1d_no_bias( function conv_transpose1d (line 345) | pub fn conv_transpose1d( function conv_transpose1d_no_bias (line 366) | pub fn conv_transpose1d_no_bias( function conv2d (line 386) | pub fn conv2d( function conv2d_no_bias (line 413) | pub fn conv2d_no_bias( function conv_transpose2d (line 434) | pub fn conv_transpose2d( function conv_transpose2d_no_bias (line 455) | pub fn conv_transpose2d_no_bias( FILE: candle-nn/src/cpu_flash_attention.rs function set_thread_affinity (line 12) | unsafe fn set_thread_affinity() { function set_thread_affinity (line 22) | unsafe fn set_thread_affinity() { constant DOT_CHUNK (line 37) | const DOT_CHUNK: usize = 4; constant TILE_KV (line 40) | const TILE_KV: usize = 16; function vec_dot (line 43) | fn vec_dot>(a: &[T... function run_flash_attn_cpu (line 75) | pub fn run_flash_attn_cpu( function flash_attn_cpu_single_q (line 167) | fn flash_attn_cpu_single_q( function flash_attn_cpu (line 341) | fn flash_attn_cpu( FILE: candle-nn/src/embedding.rs type Embedding (line 5) | pub struct Embedding { method new (line 11) | pub fn new(embeddings: Tensor, hidden_size: usize) -> Self { method embeddings (line 18) | pub fn embeddings(&self) -> &Tensor { method hidden_size (line 23) | pub fn hidden_size(&self) -> usize { method forward (line 29) | fn forward(&self, indexes: &Tensor) -> Result { function embedding (line 39) | pub fn embedding(in_size: usize, out_size: usize, vb: crate::VarBuilder)... FILE: candle-nn/src/encoding.rs function one_hot (line 87) | pub fn one_hot( function set_at_index (line 123) | fn set_at_index>( FILE: candle-nn/src/func.rs type Func (line 7) | pub struct Func<'a> { function fmt (line 13) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { function func (line 18) | pub fn func<'a, F>(f: F) -> Func<'a> function forward (line 26) | fn forward(&self, xs: &Tensor) -> Result { function new (line 32) | pub fn new(f: F) -> Self type FuncT (line 42) | pub struct FuncT<'a> { function fmt (line 48) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { function func_t (line 53) | pub fn func_t<'a, F>(f: F) -> FuncT<'a> function forward_t (line 61) | fn forward_t(&self, xs: &Tensor, train: bool) -> Result { function new (line 67) | pub fn new(f: F) -> Self FILE: candle-nn/src/group_norm.rs type GroupNorm (line 8) | pub struct GroupNorm { method new (line 17) | pub fn new( method forward (line 40) | fn forward(&self, x: &Tensor) -> Result { function group_norm (line 76) | pub fn group_norm( FILE: candle-nn/src/init.rs type FanInOut (line 12) | pub enum FanInOut { method for_shape (line 21) | pub fn for_shape(&self, shape: &Shape) -> usize { type NormalOrUniform (line 44) | pub enum NormalOrUniform { type NonLinearity (line 52) | pub enum NonLinearity { method gain (line 63) | pub fn gain(&self) -> f64 { type Init (line 76) | pub enum Init { method var (line 113) | pub fn var>(&self, s: S, dtype: DType, device: &Device)... constant ZERO (line 96) | pub const ZERO: Init = Init::Const(0.); constant ONE (line 97) | pub const ONE: Init = Init::Const(1.); constant DEFAULT_KAIMING_UNIFORM (line 99) | pub const DEFAULT_KAIMING_UNIFORM: Init = Init::Kaiming { constant DEFAULT_KAIMING_NORMAL (line 105) | pub const DEFAULT_KAIMING_NORMAL: Init = Init::Kaiming { method default (line 144) | fn default() -> Self { FILE: candle-nn/src/kv_cache.rs type Cache (line 6) | pub struct Cache { method new (line 19) | pub fn new(dim: usize, max_seq_len: usize) -> Self { method dim (line 29) | pub fn dim(&self) -> usize { method current_seq_len (line 33) | pub fn current_seq_len(&self) -> usize { method max_seq_len (line 37) | pub fn max_seq_len(&self) -> usize { method all_data (line 41) | pub fn all_data(&self) -> &Option { method current_data (line 45) | pub fn current_data(&self) -> Result> { method reset (line 53) | pub fn reset(&mut self) { method append (line 58) | pub fn append(&mut self, src: &Tensor) -> Result<()> { type KvCache (line 83) | pub struct KvCache { method new (line 89) | pub fn new(dim: usize, max_seq_len: usize) -> Self { method k_cache (line 95) | pub fn k_cache(&self) -> &Cache { method v_cache (line 99) | pub fn v_cache(&self) -> &Cache { method k_cache_mut (line 103) | pub fn k_cache_mut(&mut self) -> &mut Cache { method v_cache_mut (line 107) | pub fn v_cache_mut(&mut self) -> &mut Cache { method k (line 111) | pub fn k(&self) -> Result> { method v (line 115) | pub fn v(&self) -> Result> { method append (line 119) | pub fn append(&mut self, k: &Tensor, v: &Tensor) -> Result<(Tensor, Te... method current_seq_len (line 143) | pub fn current_seq_len(&self) -> usize { method reset (line 147) | pub fn reset(&mut self) { type RotatingCache (line 154) | pub struct RotatingCache { method new (line 167) | pub fn new(dim: usize, max_seq_len: usize) -> Self { method offset (line 177) | pub fn offset(&self) -> usize { method dim (line 181) | pub fn dim(&self) -> usize { method current_seq_len (line 185) | pub fn current_seq_len(&self) -> usize { method max_seq_len (line 189) | pub fn max_seq_len(&self) -> usize { method all_data (line 193) | pub fn all_data(&self) -> &Option { method current_data (line 197) | pub fn current_data(&self) -> Result> { method reset (line 211) | pub fn reset(&mut self) { method append (line 217) | pub fn append(&mut self, src: &Tensor) -> Result { method get_mask_abs (line 263) | fn get_mask_abs(&self, size1: usize, size2: usize, device: &Device) ->... method get_mask_rel (line 275) | fn get_mask_rel(&self, size1: usize, size2: usize, device: &Device) ->... method positions (line 299) | pub fn positions(&self, seq_len: usize) -> Vec { method attn_mask (line 319) | pub fn attn_mask(&self, seq_len: usize, device: &Device) -> Result Self { method k_cache (line 348) | pub fn k_cache(&self) -> &RotatingCache { method v_cache (line 352) | pub fn v_cache(&self) -> &RotatingCache { method k_cache_mut (line 356) | pub fn k_cache_mut(&mut self) -> &mut RotatingCache { method v_cache_mut (line 360) | pub fn v_cache_mut(&mut self) -> &mut RotatingCache { method k (line 364) | pub fn k(&self) -> Result> { method v (line 368) | pub fn v(&self) -> Result> { method append (line 372) | pub fn append(&mut self, k: &Tensor, v: &Tensor) -> Result<(Tensor, Te... method offset (line 378) | pub fn offset(&self) -> usize { method current_seq_len (line 382) | pub fn current_seq_len(&self) -> usize { method attn_mask (line 387) | pub fn attn_mask(&self, seq_len: usize, device: &Device) -> Result Vec { method reset (line 397) | pub fn reset(&mut self) { type IndicesAndMask (line 404) | pub struct IndicesAndMask { method mask (line 410) | pub fn mask(&self) -> &Tensor { type ScatteredKvCache (line 416) | pub struct ScatteredKvCache { method append (line 423) | pub fn append( method k (line 439) | pub fn k(&self) -> &Tensor { method v (line 443) | pub fn v(&self) -> &Tensor { type ScatteredCacheBuilder (line 449) | pub struct ScatteredCacheBuilder { method new (line 460) | pub fn new(batch_size: usize, context: usize, dtype: DType, device: &D... method make_cache (line 472) | pub fn make_cache(&self, num_heads: usize, head_dim: usize) -> Result<... method positions (line 484) | pub fn positions(&self) -> &[usize] { method reset (line 488) | pub fn reset(&mut self) { method batch_size (line 493) | pub fn batch_size(&self) -> usize { method reset_batch_index (line 497) | pub fn reset_batch_index(&mut self, batch_index: usize) { method indices_and_mask (line 503) | pub fn indices_and_mask( method device (line 583) | pub fn device(&self) -> &Device { method indices_and_mask_abs (line 588) | fn indices_and_mask_abs( method get_mask_abs (line 617) | fn get_mask_abs(&self, size1: usize, size2: usize) -> Result { type ConcatKvCache (line 667) | pub struct ConcatKvCache { method new (line 686) | pub fn new(dim: usize) -> Self { method current_seq_len (line 697) | pub fn current_seq_len(&self) -> usize { method is_empty (line 705) | pub fn is_empty(&self) -> bool { method dim (line 710) | pub fn dim(&self) -> usize { method append (line 725) | pub fn append(&mut self, k: &Tensor, v: &Tensor) -> Result<(Tensor, Te... method reset (line 758) | pub fn reset(&mut self) { method k (line 766) | pub fn k(&self) -> Option<&Tensor> { method v (line 773) | pub fn v(&self) -> Option<&Tensor> { method k_mut (line 780) | pub fn k_mut(&mut self) -> Option<&mut Tensor> { method v_mut (line 787) | pub fn v_mut(&mut self) -> Option<&mut Tensor> { method into_inner (line 794) | pub fn into_inner(self) -> Option<(Tensor, Tensor)> { function test_scattered_kv_cache (line 808) | fn test_scattered_kv_cache() -> Result<()> { function test_concat_cache_basic (line 890) | fn test_concat_cache_basic() -> Result<()> { function test_concat_cache_reset (line 920) | fn test_concat_cache_reset() -> Result<()> { function test_concat_cache_multiple_appends (line 941) | fn test_concat_cache_multiple_appends() -> Result<()> { function test_concat_cache_different_dim (line 967) | fn test_concat_cache_different_dim() -> Result<()> { FILE: candle-nn/src/layer_norm.rs type LayerNormConfig (line 34) | pub struct LayerNormConfig { method from (line 53) | fn from(eps: f64) -> Self { method default (line 43) | fn default() -> Self { type LayerNorm (line 64) | pub struct LayerNorm { method new (line 72) | pub fn new(weight: Tensor, bias: Tensor, eps: f64) -> Self { method new_no_bias (line 81) | pub fn new_no_bias(weight: Tensor, eps: f64) -> Self { method rms_norm (line 90) | pub fn rms_norm(weight: Tensor, eps: f64) -> Self { method weight (line 99) | pub fn weight(&self) -> &Tensor { method bias (line 103) | pub fn bias(&self) -> Option<&Tensor> { method forward (line 109) | fn forward(&self, x: &Tensor) -> Result { function layer_norm (line 138) | pub fn layer_norm>( function layer_norm_no_bias (line 158) | pub fn layer_norm_no_bias(size: usize, eps: f64, vb: crate::VarBuilder) ... type RmsNorm (line 169) | pub struct RmsNorm(LayerNorm); method new (line 172) | pub fn new(weight: Tensor, eps: f64) -> Self { method into_inner (line 176) | pub fn into_inner(self) -> LayerNorm { method forward_diff (line 181) | pub fn forward_diff(&self, xs: &Tensor) -> Result { method forward (line 187) | fn forward(&self, xs: &Tensor) -> Result { function rms_norm (line 196) | pub fn rms_norm(size: usize, eps: f64, vb: crate::VarBuilder) -> Result<... FILE: candle-nn/src/linear.rs type Linear (line 23) | pub struct Linear { method new (line 29) | pub fn new(weight: Tensor, bias: Option) -> Self { method weight (line 33) | pub fn weight(&self) -> &Tensor { method bias (line 37) | pub fn bias(&self) -> Option<&Tensor> { method forward (line 43) | fn forward(&self, x: &Tensor) -> candle::Result { function linear (line 84) | pub fn linear(in_dim: usize, out_dim: usize, vb: crate::VarBuilder) -> R... function linear_no_bias (line 97) | pub fn linear_no_bias(in_dim: usize, out_dim: usize, vb: crate::VarBuild... function linear_b (line 103) | pub fn linear_b( FILE: candle-nn/src/loss.rs function nll (line 14) | pub fn nll(inp: &Tensor, target: &Tensor) -> Result { function cross_entropy (line 41) | pub fn cross_entropy(inp: &Tensor, target: &Tensor) -> Result { function mse (line 50) | pub fn mse(inp: &Tensor, target: &Tensor) -> Result { function binary_cross_entropy_with_logit (line 64) | pub fn binary_cross_entropy_with_logit(inp: &Tensor, target: &Tensor) ->... function huber (line 89) | pub fn huber(inp: &Tensor, target: &Tensor, delta: f64) -> Result { FILE: candle-nn/src/moe.rs function moe_gemm (line 9) | pub fn moe_gemm( function moe_gemm (line 155) | pub fn moe_gemm( function moe_gemm_gguf (line 169) | pub fn moe_gemm_gguf( function moe_gemm_gguf (line 341) | pub fn moe_gemm_gguf( FILE: candle-nn/src/ops.rs function softmax (line 22) | pub fn softmax(xs: &Tensor, dim: D) -> Result(xs: &Tensor, d: D) -> Result Result { function swiglu (line 44) | pub fn swiglu(xs: &Tensor) -> Result { type Sigmoid (line 49) | struct Sigmoid; method name (line 52) | fn name(&self) -> &'static str { method cpu_fwd (line 56) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(Cp... method cuda_fwd (line 86) | fn cuda_fwd( method metal_fwd (line 138) | fn metal_fwd( method bwd (line 206) | fn bwd(&self, _arg: &Tensor, res: &Tensor, grad_res: &Tensor) -> Resul... function sigmoid (line 213) | pub fn sigmoid(xs: &Tensor) -> Result { function hard_sigmoid (line 217) | pub fn hard_sigmoid(xs: &Tensor) -> Result { function mish (line 222) | pub fn mish(xs: &Tensor) -> Result { function leaky_relu (line 226) | pub fn leaky_relu(xs: &Tensor, negative_slope: f64) -> Result { function selu (line 231) | pub fn selu(xs: &Tensor, alpha: f32, gamma: f32) -> Result { function dropout (line 240) | pub fn dropout(xs: &Tensor, drop_p: f32) -> Result { type Dropout (line 257) | pub struct Dropout { method new (line 262) | pub fn new(drop_p: f32) -> Dropout { method forward (line 266) | pub fn forward(&self, xs: &Tensor, train: bool) -> Result { method forward_t (line 276) | fn forward_t(&self, xs: &Tensor, train: bool) -> Result { type SoftmaxLastDim (line 281) | struct SoftmaxLastDim; method name (line 284) | fn name(&self) -> &'static str { method cpu_fwd (line 288) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(Cp... method cuda_fwd (line 329) | fn cuda_fwd( method metal_fwd (line 386) | fn metal_fwd( function softmax_last_dim (line 429) | pub fn softmax_last_dim(xs: &Tensor) -> Result { type RmsNorm (line 434) | struct RmsNorm { method name (line 439) | fn name(&self) -> &'static str { method cpu_fwd (line 443) | fn cpu_fwd( method cuda_fwd (line 507) | fn cuda_fwd( method metal_fwd (line 576) | fn metal_fwd( function rms_norm_slow (line 622) | pub fn rms_norm_slow(x: &Tensor, alpha: &Tensor, eps: f32) -> Result Result { type LayerNorm (line 649) | struct LayerNorm { method name (line 654) | fn name(&self) -> &'static str { method cpu_fwd (line 658) | fn cpu_fwd( method cuda_fwd (line 738) | fn cuda_fwd( method metal_fwd (line 817) | fn metal_fwd( function layer_norm_slow (line 869) | pub fn layer_norm_slow(x: &Tensor, alpha: &Tensor, beta: &Tensor, eps: f... function layer_norm (line 889) | pub fn layer_norm(xs: &Tensor, alpha: &Tensor, beta: &Tensor, eps: f32) ... function pixel_shuffle (line 905) | pub fn pixel_shuffle(xs: &Tensor, upscale_factor: usize) -> Result Result Result { type Identity (line 944) | pub struct Identity; method new (line 947) | pub fn new() -> Identity { method default (line 953) | fn default() -> Self { method forward (line 959) | fn forward(&self, xs: &Tensor) -> Result { type Sdpa (line 965) | struct Sdpa { method name (line 973) | fn name(&self) -> &'static str { method cpu_fwd (line 977) | fn cpu_fwd( method metal_fwd (line 990) | fn metal_fwd( function sdpa (line 1257) | pub fn sdpa( FILE: candle-nn/src/optim.rs type Optimizer (line 5) | pub trait Optimizer: Sized { method new (line 8) | fn new(vars: Vec, config: Self::Config) -> Result; method step (line 10) | fn step(&mut self, grads: &candle::backprop::GradStore) -> Result<()>; method learning_rate (line 12) | fn learning_rate(&self) -> f64; method set_learning_rate (line 14) | fn set_learning_rate(&mut self, lr: f64); method empty (line 16) | fn empty(config: Self::Config) -> Result { method backward_step (line 20) | fn backward_step(&mut self, loss: &Tensor) -> Result<()> { method from_slice (line 25) | fn from_slice(vars: &[&Var], config: Self::Config) -> Result { type Config (line 41) | type Config = f64; method new (line 43) | fn new(vars: Vec, learning_rate: f64) -> Result { method learning_rate (line 54) | fn learning_rate(&self) -> f64 { method step (line 58) | fn step(&mut self, grads: &candle::backprop::GradStore) -> Result<()> { method set_learning_rate (line 67) | fn set_learning_rate(&mut self, lr: f64) { type Config (line 118) | type Config = ParamsAdamW; method new (line 120) | fn new(vars: Vec, params: ParamsAdamW) -> Result { method learning_rate (line 144) | fn learning_rate(&self) -> f64 { method set_learning_rate (line 148) | fn set_learning_rate(&mut self, lr: f64) { method step (line 152) | fn step(&mut self, grads: &candle::backprop::GradStore) -> Result<()> { type SGD (line 35) | pub struct SGD { method into_inner (line 73) | pub fn into_inner(self) -> Vec { method push (line 77) | pub fn push(&mut self, var: &Var) { type ParamsAdamW (line 83) | pub struct ParamsAdamW { method default (line 92) | fn default() -> Self { type VarAdamW (line 104) | struct VarAdamW { type AdamW (line 111) | pub struct AdamW { method new_lr (line 186) | pub fn new_lr(vars: Vec, learning_rate: f64) -> Result { method params (line 194) | pub fn params(&self) -> &ParamsAdamW { method set_params (line 198) | pub fn set_params(&mut self, params: ParamsAdamW) { FILE: candle-nn/src/rnn.rs type RNN (line 6) | pub trait RNN { method zero_state (line 10) | fn zero_state(&self, batch_dim: usize) -> Result; method step (line 15) | fn step(&self, input: &Tensor, state: &Self::State) -> Result Result> { method seq_init (line 30) | fn seq_init(&self, input: &Tensor, init_state: &Self::State) -> Result... method states_to_tensor (line 46) | fn states_to_tensor(&self, states: &[Self::State]) -> Result; type State (line 199) | type State = LSTMState; method zero_state (line 201) | fn zero_state(&self, batch_dim: usize) -> Result { method step (line 210) | fn step(&self, input: &Tensor, in_state: &Self::State) -> Result Result { type State (line 355) | type State = GRUState; method zero_state (line 357) | fn zero_state(&self, batch_dim: usize) -> Result { method step (line 363) | fn step(&self, input: &Tensor, in_state: &Self::State) -> Result Result { type LSTMState (line 52) | pub struct LSTMState { method new (line 58) | pub fn new(h: Tensor, c: Tensor) -> Self { method h (line 63) | pub fn h(&self) -> &Tensor { method c (line 68) | pub fn c(&self) -> &Tensor { type Direction (line 74) | pub enum Direction { type LSTMConfig (line 81) | pub struct LSTMConfig { method default_no_bias (line 104) | pub fn default_no_bias() -> Self { method default (line 91) | fn default() -> Self { type LSTM (line 121) | pub struct LSTM { method new (line 134) | pub fn new( method config (line 183) | pub fn config(&self) -> &LSTMConfig { function lstm (line 189) | pub fn lstm( type GRUState (line 244) | pub struct GRUState { method h (line 250) | pub fn h(&self) -> &Tensor { type GRUConfig (line 257) | pub struct GRUConfig { method default_no_bias (line 276) | pub fn default_no_bias() -> Self { method default (line 265) | fn default() -> Self { type GRU (line 291) | pub struct GRU { method new (line 304) | pub fn new( method config (line 340) | pub fn config(&self) -> &GRUConfig { function gru (line 345) | pub fn gru( FILE: candle-nn/src/rotary_emb.rs type RotaryEmbI (line 12) | struct RotaryEmbI; method name (line 15) | fn name(&self) -> &'static str { method cpu_fwd (line 19) | fn cpu_fwd( method cuda_fwd (line 89) | fn cuda_fwd( method metal_fwd (line 170) | fn metal_fwd( function rope_check_cs (line 228) | fn rope_check_cs(cs: &Tensor, b_sz: usize) -> Result<(usize, usize)> { function rope_i (line 241) | pub fn rope_i(xs: &Tensor, cos: &Tensor, sin: &Tensor) -> Result { function rope_i_slow (line 269) | pub fn rope_i_slow(x: &Tensor, cos: &Tensor, sin: &Tensor) -> Result &'static str { method cpu_fwd (line 298) | fn cpu_fwd( method cuda_fwd (line 372) | fn cuda_fwd( method metal_fwd (line 453) | fn metal_fwd( function rope (line 512) | pub fn rope(xs: &Tensor, cos: &Tensor, sin: &Tensor) -> Result { function rotate_half (line 540) | fn rotate_half(xs: &Tensor) -> Result { function rope_slow (line 547) | pub fn rope_slow(x: &Tensor, cos: &Tensor, sin: &Tensor) -> Result &'static str { method cpu_fwd (line 567) | fn cpu_fwd( method cuda_fwd (line 642) | fn cuda_fwd( method metal_fwd (line 723) | fn metal_fwd( function rope_thd (line 783) | pub fn rope_thd(xs: &Tensor, cos: &Tensor, sin: &Tensor) -> Result( FILE: candle-nn/src/sequential.rs type Sequential (line 7) | pub struct Sequential { method len (line 18) | pub fn len(&self) -> i64 { method is_empty (line 23) | pub fn is_empty(&self) -> bool { method add (line 41) | pub fn add(mut self, layer: M) -> Self { method add_fn (line 47) | pub fn add_fn(self, f: F) -> Self method forward_all (line 55) | pub fn forward_all(&self, xs: &Tensor) -> Result> { function seq (line 12) | pub fn seq() -> Sequential { method forward (line 29) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-nn/src/var_builder.rs type VarBuilderArgs (line 16) | pub struct VarBuilderArgs<'a, B: Backend> { method clone (line 24) | fn clone(&self) -> Self { type VarBuilder (line 36) | pub type VarBuilder<'a> = VarBuilderArgs<'a, Box>; type TensorData (line 38) | struct TensorData { type Backend (line 50) | pub trait Backend: Send + Sync { method get (line 54) | fn get( method get_unchecked (line 64) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 66) | fn contains_tensor(&self, name: &str) -> bool; type Hints (line 87) | type Hints = crate::Init; method get (line 88) | fn get( method get_unchecked (line 99) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 103) | fn contains_tensor(&self, name: &str) -> bool { type Hints (line 785) | type Hints = Shard; method get (line 787) | fn get( method get_unchecked (line 848) | fn get_unchecked(&self, _name: &str, _dtype: DType, _dev: &Device) -> ... method contains_tensor (line 852) | fn contains_tensor(&self, name: &str) -> bool { type SimpleBackend (line 69) | pub trait SimpleBackend: Send + Sync { method get (line 71) | fn get( method get_unchecked (line 81) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 83) | fn contains_tensor(&self, name: &str) -> bool; method get (line 273) | fn get(&self, s: Shape, _: &str, _: crate::Init, dtype: DType, dev: &D... method get_unchecked (line 277) | fn get_unchecked(&self, _name: &str, _dtype: DType, _dev: &Device) -> ... method contains_tensor (line 283) | fn contains_tensor(&self, _name: &str) -> bool { method get (line 289) | fn get( method get_unchecked (line 317) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 330) | fn contains_tensor(&self, name: &str) -> bool { method get (line 336) | fn get( method get_unchecked (line 347) | fn get_unchecked(&self, _name: &str, _dtype: DType, _dev: &Device) -> ... method contains_tensor (line 351) | fn contains_tensor(&self, name: &str) -> bool { method get (line 363) | fn get( method get_unchecked (line 392) | fn get_unchecked(&self, path: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 406) | fn contains_tensor(&self, name: &str) -> bool { method get (line 412) | fn get( method get_unchecked (line 439) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 451) | fn contains_tensor(&self, name: &str) -> bool { method get (line 457) | fn get( method get_unchecked (line 484) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 496) | fn contains_tensor(&self, name: &str) -> bool { method get (line 502) | fn get( method get_unchecked (line 522) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 526) | fn contains_tensor(&self, name: &str) -> bool { method get (line 532) | fn get( method get_unchecked (line 552) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 556) | fn contains_tensor(&self, name: &str) -> bool { method get (line 562) | fn get( method get_unchecked (line 582) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 586) | fn contains_tensor(&self, name: &str) -> bool { method get (line 871) | fn get( method get_unchecked (line 885) | fn get_unchecked(&self, name: &str, dtype: DType, dev: &Device) -> Res... method contains_tensor (line 890) | fn contains_tensor(&self, name: &str) -> bool { function new_with_args (line 109) | pub fn new_with_args(backend: B, dtype: DType, dev: &Device) -> Self { function prefix (line 124) | pub fn prefix(&self) -> String { function root (line 129) | pub fn root(&self) -> Self { function set_prefix (line 139) | pub fn set_prefix(&self, prefix: impl ToString) -> Self { function push_prefix (line 150) | pub fn push_prefix(&self, s: S) -> Self { function pp (line 162) | pub fn pp(&self, s: S) -> Self { function device (line 167) | pub fn device(&self) -> &Device { function dtype (line 172) | pub fn dtype(&self) -> DType { function to_dtype (line 177) | pub fn to_dtype(&self, dtype: DType) -> Self { function path (line 186) | fn path(&self, tensor_name: &str) -> String { function contains_tensor (line 197) | pub fn contains_tensor(&self, tensor_name: &str) -> bool { function get_with_hints (line 203) | pub fn get_with_hints>( function get (line 213) | pub fn get>(&self, s: S, name: &str) -> Result { function get_unchecked (line 218) | pub fn get_unchecked(&self, name: &str) -> Result { function get_unchecked_dtype (line 223) | pub fn get_unchecked_dtype(&self, name: &str, dtype: DType) -> Result>( function set_device (line 245) | pub fn set_device(self, device: Device) -> Self { function set_dtype (line 257) | pub fn set_dtype(self, dtype: DType) -> Self { type Zeros (line 270) | struct Zeros; type SafeTensorWithRouting (line 357) | pub struct SafeTensorWithRouting<'a> { function from_backend (line 597) | pub fn from_backend( function zeros (line 616) | pub fn zeros(dtype: DType, dev: &Device) -> Self { function from_tensors (line 622) | pub fn from_tensors(ts: HashMap, dtype: DType, dev: &Dev... function from_varmap (line 632) | pub fn from_varmap(varmap: &VarMap, dtype: DType, dev: &Device) -> Self { function from_mmaped_safetensors (line 642) | pub unsafe fn from_mmaped_safetensors>( function from_buffered_safetensors (line 652) | pub fn from_buffered_safetensors(data: Vec, dtype: DType, dev: &Devi... function from_slice_safetensors (line 658) | pub fn from_slice_safetensors(data: &'a [u8], dtype: DType, dev: &Device... function from_npz (line 664) | pub fn from_npz>(p: P, dtype: DType, dev: &Dev... function from_pth (line 670) | pub fn from_pth>(p: P, dtype: DType, dev: &Dev... function from_pth_with_state (line 676) | pub fn from_pth_with_state>( function rename_f (line 709) | pub fn rename_f String + Sync + Send + 'static>(self, f: ... function rename (line 714) | pub fn rename(self, renamer: R) -> Self { type ShardedSafeTensors (line 734) | pub struct ShardedSafeTensors(candle::safetensors::MmapedSafetensors); method var_builder (line 745) | pub unsafe fn var_builder>( type ShardedVarBuilder (line 736) | pub type ShardedVarBuilder<'a> = VarBuilderArgs<'a, ShardedSafeTensors>; type Shard (line 757) | pub struct Shard { method default (line 764) | fn default() -> Self { type Renamer (line 859) | pub trait Renamer { method rename (line 862) | fn rename(&self, v: &str) -> std::borrow::Cow<'_, str>; method rename (line 903) | fn rename(&self, v: &str) -> std::borrow::Cow<'_, str> { type Rename (line 865) | pub struct Rename<'a, R: Renamer> { function new (line 897) | pub fn new(inner: VarBuilder<'a>, renamer: R) -> Self { FILE: candle-nn/src/var_map.rs type VarMap (line 12) | pub struct VarMap { method new (line 19) | pub fn new() -> Self { method all_vars (line 25) | pub fn all_vars(&self) -> Vec { method save (line 32) | pub fn save>(&self, path: P) -> Result<()> { method load (line 43) | pub fn load>(&mut self, path: P) -> Result<(... method set_one (line 57) | pub fn set_one, V: AsRef>(&mut self, name: K, va... method set (line 75) | pub fn set, K: AsRef, V: AsRef>( method get (line 95) | pub fn get>( method data (line 118) | pub fn data(&self) -> &Mutex> { FILE: candle-nn/tests/batch_norm.rs function batch_norm_test (line 23) | fn batch_norm_test() -> Result<()> { function train_batch_norm (line 90) | fn train_batch_norm() -> Result<()> { FILE: candle-nn/tests/cpu_flash_attn.rs function cpu_flash_attn (line 5) | fn cpu_flash_attn() -> Result<()> { FILE: candle-nn/tests/group_norm.rs function group_norm (line 33) | fn group_norm() -> Result<()> { FILE: candle-nn/tests/kv_cache.rs function kv_cache (line 10) | fn kv_cache() -> Result<()> { function rotating_kv_cache (line 35) | fn rotating_kv_cache() -> Result<()> { FILE: candle-nn/tests/layer_norm.rs function layer_norm (line 12) | fn layer_norm() -> Result<()> { FILE: candle-nn/tests/loss.rs function nll_and_cross_entropy (line 22) | fn nll_and_cross_entropy() -> Result<()> { function binary_cross_entropy_with_logit (line 61) | fn binary_cross_entropy_with_logit() -> Result<()> { function huber_loss (line 109) | fn huber_loss() -> Result<()> { FILE: candle-nn/tests/one_hot.rs function test_i64_one_hot (line 5) | fn test_i64_one_hot() -> Result<()> { function test_rank_3_one_hot (line 31) | fn test_rank_3_one_hot() -> Result<()> { function test_u8_one_cold (line 74) | fn test_u8_one_cold() -> Result<()> { function test_iter (line 97) | fn test_iter() -> Result<()> { FILE: candle-nn/tests/ops.rs function softmax (line 9) | fn softmax(device: &Device) -> Result<()> { function rms_norm (line 55) | fn rms_norm(device: &Device) -> Result<()> { function rms_norml (line 80) | fn rms_norml(device: &Device) -> Result<()> { function layer_norm (line 102) | fn layer_norm(device: &Device) -> Result<()> { function layer_norml (line 128) | fn layer_norml(device: &Device) -> Result<()> { function softmax_numerical_stability (line 151) | fn softmax_numerical_stability() -> Result<()> { function ropei (line 159) | fn ropei(device: &Device) -> Result<()> { function rope (line 208) | fn rope(device: &Device) -> Result<()> { function rope_thd (line 257) | fn rope_thd(device: &Device) -> Result<()> { function sigmoid (line 318) | fn sigmoid(device: &Device) -> Result<()> { FILE: candle-nn/tests/optim.rs function sgd_optim (line 14) | fn sgd_optim() -> Result<()> { function sgd_linear_regression (line 51) | fn sgd_linear_regression() -> Result<()> { function adamw_linear_regression (line 99) | fn adamw_linear_regression() -> Result<()> { function adamw_linear_regression_varmap (line 126) | fn adamw_linear_regression_varmap() -> Result<()> { FILE: candle-nn/tests/rnn.rs function lstm (line 26) | fn lstm() -> Result<()> { function gru (line 75) | fn gru() -> Result<()> { FILE: candle-nn/tests/sdpa.rs function randn (line 8) | fn randn>( function sdpa_full (line 21) | fn sdpa_full() -> Result<()> { function sdpa_vector (line 52) | fn sdpa_vector() -> Result<()> { function sdpa_full_softcapping (line 82) | fn sdpa_full_softcapping() -> Result<()> { function sdpa_vector_softcapping (line 122) | fn sdpa_vector_softcapping() -> Result<()> { function sdpa_vector_cross (line 159) | fn sdpa_vector_cross() -> Result<()> { FILE: candle-onnx/build.rs function main (line 3) | fn main() -> Result<()> { FILE: candle-onnx/src/eval.rs type Value (line 9) | pub type Value = Tensor; function dtype (line 11) | pub fn dtype(dt: DataType) -> Option { type Attr (line 24) | trait Attr { constant TYPE (line 25) | const TYPE: AttributeType; method get (line 26) | fn get(attr: &onnx::AttributeProto) -> Result<&Self>; constant TYPE (line 35) | const TYPE: AttributeType = AttributeType::Int; method get (line 36) | fn get(attr: &onnx::AttributeProto) -> Result<&Self> { constant TYPE (line 42) | const TYPE: AttributeType = AttributeType::Float; method get (line 43) | fn get(attr: &onnx::AttributeProto) -> Result<&Self> { constant TYPE (line 49) | const TYPE: AttributeType = AttributeType::Ints; method get (line 50) | fn get(attr: &onnx::AttributeProto) -> Result<&Self> { constant TYPE (line 56) | const TYPE: AttributeType = AttributeType::String; method get (line 57) | fn get(attr: &onnx::AttributeProto) -> Result<&Self> { constant TYPE (line 63) | const TYPE: AttributeType = AttributeType::Graph; method get (line 64) | fn get(attr: &onnx::AttributeProto) -> Result<&Self> { type AttrOwned (line 29) | trait AttrOwned: Sized { constant TYPE (line 30) | const TYPE: AttributeType; method get (line 31) | fn get(attr: &onnx::AttributeProto) -> Result; constant TYPE (line 72) | const TYPE: AttributeType = AttributeType::Strings; method get (line 73) | fn get(attr: &onnx::AttributeProto) -> Result { constant TYPE (line 84) | const TYPE: AttributeType = AttributeType::Tensor; method get (line 85) | fn get(attr: &onnx::AttributeProto) -> Result { function get_attr_ (line 127) | fn get_attr_<'a>(node: &'a onnx::NodeProto, name: &str) -> Result<&'a on... function get_attr (line 140) | fn get_attr<'a, T: Attr + ?Sized>(node: &'a onnx::NodeProto, name: &str)... function get_attr_opt (line 153) | fn get_attr_opt<'a, T: Attr + ?Sized>( function get_attr_opt_owned (line 174) | fn get_attr_opt_owned(node: &onnx::NodeProto, name: &str) ... function get_tensor (line 192) | pub fn get_tensor(t: &onnx::TensorProto, name: &str) -> Result { function simple_eval (line 239) | pub fn simple_eval( function simple_eval_ (line 250) | fn simple_eval_( function broadcast_shape (line 2561) | fn broadcast_shape(shape_a: &[usize], shape_b: &[usize]) -> Result Result> { function to_scalar_flexible (line 2597) | fn to_scalar_flexible(t: &Tensor) -> Result { function to_vec0_flexible (line 2606) | fn to_vec0_flexible(t: &Tensor) -> Result { FILE: candle-onnx/src/lib.rs function read_file (line 11) | pub fn read_file>(p: P) -> Result) -> ModelProto { function test_evaluation_fails_without_defined_graph (line 33) | fn test_evaluation_fails_without_defined_graph() -> Result<()> { function test_add_operation (line 45) | fn test_add_operation() -> Result<()> { function test_sub_operation (line 85) | fn test_sub_operation() -> Result<()> { function test_mul_operation (line 125) | fn test_mul_operation() -> Result<()> { function test_div_operation (line 165) | fn test_div_operation() -> Result<()> { function test_exp_operation (line 205) | fn test_exp_operation() -> Result<()> { function test_equal_operation (line 251) | fn test_equal_operation() -> Result<()> { function test_not_operation (line 292) | fn test_not_operation() -> Result<()> { function test_matmul_operation (line 332) | fn test_matmul_operation() -> Result<()> { function test_reshape_operation (line 389) | fn test_reshape_operation() -> Result<()> { function test_logsoftmax_operation (line 456) | fn test_logsoftmax_operation() -> Result<()> { function test_softmax_operation (line 519) | fn test_softmax_operation() -> Result<()> { function test_transpose_operation (line 582) | fn test_transpose_operation() -> Result<()> { function test_dropout_operation (line 642) | fn test_dropout_operation() -> Result<()> { function test_flatten_operation (line 701) | fn test_flatten_operation() -> Result<()> { function test_constant_of_shape (line 843) | fn test_constant_of_shape() -> Result<()> { function test_unsqueeze (line 985) | fn test_unsqueeze() -> Result<()> { function test_gather_operation (line 1043) | fn test_gather_operation() -> Result<()> { function test_gather_elements (line 1173) | fn test_gather_elements() -> Result<()> { function test_size_operation (line 1330) | fn test_size_operation() -> Result<()> { function test_shape_operation (line 1375) | fn test_shape_operation() -> Result<()> { function test_abs_operation (line 1426) | fn test_abs_operation() -> Result<()> { function test_cos_operation (line 1484) | fn test_cos_operation() -> Result<()> { function test_sin_operation (line 1534) | fn test_sin_operation() -> Result<()> { function test_neg_operation (line 1581) | fn test_neg_operation() -> Result<()> { function test_tanh_operation (line 1638) | fn test_tanh_operation() -> Result<()> { function test_sigmoid_operation (line 1695) | fn test_sigmoid_operation() -> Result<()> { function test_gelu_operation (line 1752) | fn test_gelu_operation() -> Result<()> { function test_relu_operation (line 1809) | fn test_relu_operation() -> Result<()> { function test_prelu_operation (line 1860) | fn test_prelu_operation() -> Result<()> { function test_reduce_max (line 1924) | fn test_reduce_max() -> Result<()> { function test_reduce_min (line 2443) | fn test_reduce_min() -> Result<()> { function test_reduce_mean (line 2962) | fn test_reduce_mean() -> Result<()> { function test_sqrt (line 3139) | fn test_sqrt() -> Result<()> { function test_random_uniform (line 3193) | fn test_random_uniform() -> Result<()> { function test_random_normal (line 3339) | fn test_random_normal() -> Result<()> { function test_range (line 3483) | fn test_range() -> Result<()> { function test_greater (line 3554) | fn test_greater() -> Result<()> { function test_less (line 3615) | fn test_less() -> Result<()> { function test_log (line 3676) | fn test_log() -> Result<()> { function test_min (line 3730) | fn test_min() -> Result<()> { function test_where (line 3795) | fn test_where() -> Result<()> { function test_floor (line 3875) | fn test_floor() -> Result<()> { function test_ceil (line 3951) | fn test_ceil() -> Result<()> { function test_argmin (line 4028) | fn test_argmin() -> Result<()> { function test_argmax (line 4210) | fn test_argmax() -> Result<()> { function test_leakyrelu (line 4392) | fn test_leakyrelu() -> Result<()> { function test_if (line 4470) | fn test_if() -> Result<()> { function test_pad (line 4579) | fn test_pad() -> Result<()> { function test_slice (line 4641) | fn test_slice() -> Result<()> { function test_lstm (line 4776) | fn test_lstm() -> Result<()> { function test_rnn (line 5240) | fn test_rnn() -> Result<()> { function test_expand_dim_changed (line 5509) | fn test_expand_dim_changed() -> Result<()> { function make_graph_helper (line 5574) | fn make_graph_helper( function test_expand_dim_unchanged (line 5609) | fn test_expand_dim_unchanged() -> Result<()> { function make_split_graph_helper (line 5643) | fn make_split_graph_helper(inputs: &[&str], outputs: &[&str], axis: i64)... function test_split_equal_parts_1d_opset13 (line 5655) | fn test_split_equal_parts_1d_opset13() -> Result<()> { function make_reduce_sum_graph_helper (line 5697) | fn make_reduce_sum_graph_helper( function test_reduce_sum_default_axes_keepdims (line 5724) | fn test_reduce_sum_default_axes_keepdims() -> Result<()> { function test_reduce_sum_do_not_keep_dims (line 5776) | fn test_reduce_sum_do_not_keep_dims() -> Result<()> { function test_xor (line 5839) | fn test_xor() -> Result<()> { function test_sign_operation (line 6210) | fn test_sign_operation() -> Result<()> { function test_selu_operator (line 6251) | fn test_selu_operator() -> Result<()> { function test_hard_swish (line 6446) | fn test_hard_swish() -> candle::Result<()> { function test_scatternd_operation (line 6525) | fn test_scatternd_operation() -> Result<()> { function test_trilu_operation (line 6617) | fn test_trilu_operation() -> Result<()> { function test_one_hot (line 7033) | fn test_one_hot() -> Result<()> { FILE: candle-pyo3/_additional_typing/__init__.py class Tensor (line 4) | class Tensor: method __add__ (line 9) | def __add__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __radd__ (line 15) | def __radd__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __sub__ (line 21) | def __sub__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __truediv__ (line 27) | def __truediv__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __mul__ (line 33) | def __mul__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __rmul__ (line 39) | def __rmul__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __richcmp__ (line 45) | def __richcmp__(self, rhs: Union["Tensor", "Scalar"], op) -> "Tensor": method __getitem__ (line 51) | def __getitem__(self, index: Union["Index", "Tensor", Sequence["Index"... method __eq__ (line 57) | def __eq__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __ne__ (line 63) | def __ne__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __lt__ (line 69) | def __lt__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __le__ (line 75) | def __le__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __gt__ (line 81) | def __gt__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": method __ge__ (line 87) | def __ge__(self, rhs: Union["Tensor", "Scalar"]) -> "Tensor": FILE: candle-pyo3/build.rs function main (line 1) | fn main() { FILE: candle-pyo3/e5.py function average_pool (line 45) | def average_pool(last_hidden_states: torch.Tensor, attention_mask: torch... FILE: candle-pyo3/py_src/candle/__init__.py function locate_cuda_dlls (line 13) | def locate_cuda_dlls(): function locate_mkl_dlls (line 29) | def locate_mkl_dlls(): FILE: candle-pyo3/py_src/candle/__init__.pyi class bf16 (line 6) | class bf16(DType): function cat (line 10) | def cat(tensors: List[Tensor], dim: int) -> Tensor: class f16 (line 16) | class f16(DType): class f32 (line 19) | class f32(DType): class f64 (line 22) | class f64(DType): class i64 (line 25) | class i64(DType): function ones (line 29) | def ones(*shape: Shape, dtype: Optional[DType] = None, device: Optional[... function rand (line 36) | def rand(*shape: Shape, device: Optional[Device] = None) -> Tensor: function randn (line 43) | def randn(*shape: Shape, device: Optional[Device] = None) -> Tensor: function stack (line 50) | def stack(tensors: List[Tensor], dim: int) -> Tensor: function tensor (line 57) | def tensor(data: _ArrayLike) -> Tensor: class u32 (line 63) | class u32(DType): class u8 (line 66) | class u8(DType): function zeros (line 70) | def zeros(*shape: Shape, dtype: Optional[DType] = None, device: Optional... class DType (line 76) | class DType: class QTensor (line 81) | class QTensor: method dequantize (line 86) | def dequantize(self) -> Tensor: method ggml_dtype (line 93) | def ggml_dtype(self) -> str: method matmul_t (line 99) | def matmul_t(self, lhs: Tensor) -> Tensor: method rank (line 106) | def rank(self) -> int: method shape (line 113) | def shape(self) -> Tuple[int]: class Tensor (line 119) | class Tensor: method __init__ (line 124) | def __init__(self, data: _ArrayLike): method __add__ (line 127) | def __add__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __eq__ (line 133) | def __eq__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __ge__ (line 139) | def __ge__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __getitem__ (line 145) | def __getitem__(self, index: Union[Index, Tensor, Sequence[Index]]) ->... method __gt__ (line 151) | def __gt__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __le__ (line 157) | def __le__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __lt__ (line 163) | def __lt__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __mul__ (line 169) | def __mul__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __ne__ (line 175) | def __ne__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __radd__ (line 181) | def __radd__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __richcmp__ (line 187) | def __richcmp__(self, rhs: Union[Tensor, Scalar], op) -> "Tensor": method __rmul__ (line 193) | def __rmul__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __sub__ (line 199) | def __sub__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method __truediv__ (line 205) | def __truediv__(self, rhs: Union[Tensor, Scalar]) -> "Tensor": method abs (line 211) | def abs(self) -> Tensor: method argmax_keepdim (line 217) | def argmax_keepdim(self, dim: int) -> Tensor: method argmin_keepdim (line 223) | def argmin_keepdim(self, dim: int) -> Tensor: method broadcast_add (line 229) | def broadcast_add(self, rhs: Tensor) -> Tensor: method broadcast_as (line 235) | def broadcast_as(self, *shape: Shape) -> Tensor: method broadcast_div (line 241) | def broadcast_div(self, rhs: Tensor) -> Tensor: method broadcast_left (line 247) | def broadcast_left(self, *shape: Shape) -> Tensor: method broadcast_mul (line 253) | def broadcast_mul(self, rhs: Tensor) -> Tensor: method broadcast_sub (line 259) | def broadcast_sub(self, rhs: Tensor) -> Tensor: method contiguous (line 265) | def contiguous(self) -> Tensor: method copy (line 271) | def copy(self) -> Tensor: method cos (line 277) | def cos(self) -> Tensor: method detach (line 283) | def detach(self) -> Tensor: method device (line 290) | def device(self) -> Device: method dtype (line 297) | def dtype(self) -> DType: method exp (line 303) | def exp(self) -> Tensor: method flatten_all (line 309) | def flatten_all(self) -> Tensor: method flatten_from (line 315) | def flatten_from(self, dim: int) -> Tensor: method flatten_to (line 321) | def flatten_to(self, dim: int) -> Tensor: method gather (line 327) | def gather(self, index, dim): method get (line 333) | def get(self, index: int) -> Tensor: method index_select (line 339) | def index_select(self, rhs: Tensor, dim: int) -> Tensor: method is_contiguous (line 351) | def is_contiguous(self) -> bool: method is_fortran_contiguous (line 357) | def is_fortran_contiguous(self) -> bool: method log (line 363) | def log(self) -> Tensor: method matmul (line 369) | def matmul(self, rhs: Tensor) -> Tensor: method max_keepdim (line 375) | def max_keepdim(self, dim: int) -> Tensor: method mean_all (line 381) | def mean_all(self) -> Tensor: method min_keepdim (line 387) | def min_keepdim(self, dim: int) -> Tensor: method narrow (line 393) | def narrow(self, dim: int, start: int, len: int) -> Tensor: method nelement (line 401) | def nelement(self) -> int: method powf (line 407) | def powf(self, p: float) -> Tensor: method quantize (line 413) | def quantize(self, quantized_dtype: str) -> QTensor: method rank (line 420) | def rank(self) -> int: method recip (line 426) | def recip(self) -> Tensor: method reshape (line 432) | def reshape(self, *shape: Shape) -> Tensor: method shape (line 439) | def shape(self) -> Tuple[int]: method sin (line 445) | def sin(self) -> Tensor: method sqr (line 451) | def sqr(self) -> Tensor: method sqrt (line 457) | def sqrt(self) -> Tensor: method squeeze (line 463) | def squeeze(self, dim: int) -> Tensor: method stride (line 470) | def stride(self) -> Tuple[int]: method sum_all (line 476) | def sum_all(self) -> Tensor: method sum_keepdim (line 482) | def sum_keepdim(self, dim: Union[int, List[int]]) -> Tensor: method t (line 488) | def t(self) -> Tensor: method to (line 494) | def to(self, *args, **kwargs) -> Tensor: method to_device (line 500) | def to_device(self, device: Union[str, Device]) -> Tensor: method to_dtype (line 506) | def to_dtype(self, dtype: Union[str, DType]) -> Tensor: method to_torch (line 512) | def to_torch(self) -> torch.Tensor: method transpose (line 518) | def transpose(self, dim1: int, dim2: int) -> Tensor: method unsqueeze (line 524) | def unsqueeze(self, dim: int) -> Tensor: method values (line 530) | def values(self) -> _ArrayLike: method where_cond (line 536) | def where_cond(self, on_true: Tensor, on_false: Tensor) -> Tensor: FILE: candle-pyo3/py_src/candle/functional/__init__.pyi function avg_pool2d (line 8) | def avg_pool2d(tensor: Tensor, ksize: int, stride: int = 1) -> Tensor: function gelu (line 15) | def gelu(tensor: Tensor) -> Tensor: function max_pool2d (line 22) | def max_pool2d(tensor: Tensor, ksize: int, stride: int = 1) -> Tensor: function relu (line 29) | def relu(tensor: Tensor) -> Tensor: function silu (line 36) | def silu(tensor: Tensor) -> Tensor: function softmax (line 43) | def softmax(tensor: Tensor, dim: int) -> Tensor: function tanh (line 50) | def tanh(tensor: Tensor) -> Tensor: FILE: candle-pyo3/py_src/candle/models/bert.py class Config (line 11) | class Config: class BertSelfAttention (line 30) | class BertSelfAttention(Module): method __init__ (line 31) | def __init__(self, config: Config) -> None: method transpose_for_scores (line 41) | def transpose_for_scores(self, x: Tensor) -> Tensor: method forward (line 49) | def forward(self, hidden_states: Tensor, attention_mask=None) -> Tensor: class BertSelfOutput (line 71) | class BertSelfOutput(Module): method __init__ (line 72) | def __init__(self, config: Config) -> None: method forward (line 77) | def forward(self, hidden_states: Tensor, input_tensor: Tensor) -> Tensor: class BertAttention (line 82) | class BertAttention(Module): method __init__ (line 83) | def __init__(self, config: Config) -> None: method forward (line 88) | def forward(self, hidden_states: Tensor, attention_mask: None) -> Tensor: class BertIntermediate (line 94) | class BertIntermediate(Module): method __init__ (line 95) | def __init__(self, config: Config) -> None: method forward (line 100) | def forward(self, hidden_states: Tensor) -> Tensor: class BertOutput (line 105) | class BertOutput(Module): method __init__ (line 106) | def __init__(self, config: Config) -> None: method forward (line 111) | def forward(self, hidden_states: Tensor, input_tensor: Tensor) -> Tensor: class BertLayer (line 116) | class BertLayer(Module): method __init__ (line 117) | def __init__(self, config: Config) -> None: method forward (line 123) | def forward(self, hidden_states: Tensor, attention_mask=None) -> Tensor: class BertEncoder (line 133) | class BertEncoder(Module): method __init__ (line 134) | def __init__(self, config: Config) -> None: method forward (line 140) | def forward(self, hidden_states: Tensor, attention_mask=None) -> Tensor: class BertEmbeddings (line 146) | class BertEmbeddings(Module): method __init__ (line 147) | def __init__(self, config: Config) -> None: method forward (line 157) | def forward(self, input_ids: Tensor, token_type_ids: Tensor) -> Tensor: class BertPooler (line 171) | class BertPooler(Module): method __init__ (line 172) | def __init__(self, config: Config) -> None: method forward (line 177) | def forward(self, hidden_states: Tensor) -> Tensor: function masked_fill (line 184) | def masked_fill(on_false: float, mask: Tensor, on_true: float): class BertModel (line 192) | class BertModel(Module): method __init__ (line 193) | def __init__(self, config: Config, add_pooling_layer=True) -> None: method forward (line 200) | def forward( FILE: candle-pyo3/py_src/candle/models/llama.py function masked_fill (line 7) | def masked_fill(on_false: Tensor, mask: Tensor, on_true: Tensor): function precompute_freqs_cis (line 13) | def precompute_freqs_cis(hparams: Dict[str, Any], freq_base: float, max_... class RmsNorm (line 23) | class RmsNorm(Module): method __init__ (line 24) | def __init__(self, qtensor: QTensor): method forward (line 28) | def forward(self, x: Tensor) -> Tensor: class QuantizedLayer (line 35) | class QuantizedLayer(Module): method __init__ (line 36) | def __init__( method forward (line 65) | def forward(self, x: Tensor, mask: Tensor, index_pos: int) -> Tensor: method forward_attn (line 79) | def forward_attn(self, x: Tensor, mask: Tensor, index_pos: int): method apply_rotary_emb (line 109) | def apply_rotary_emb(self, x: Tensor, index_pos: int): class QuantizedLlama (line 122) | class QuantizedLlama(Module): method __init__ (line 123) | def __init__(self, hparams: Dict[str, Any], all_tensors: Dict[str, QTe... method forward (line 135) | def forward(self, token: Tensor, index_pos: int) -> Tensor: FILE: candle-pyo3/py_src/candle/nn/__init__.pyi function silu (line 8) | def silu(tensor: Tensor) -> Tensor: function softmax (line 15) | def softmax(tensor: Tensor, dim: int) -> Tensor: FILE: candle-pyo3/py_src/candle/nn/container.py function _addindent (line 24) | def _addindent(s_: str, numSpaces: int): class Sequential (line 36) | class Sequential(Module): method __init__ (line 60) | def __init__(self, *args: Module) -> None: ... method __init__ (line 63) | def __init__(self, arg: "OrderedDict[str, Module]") -> None: ... method __init__ (line 65) | def __init__(self, *args): method _get_item_by_idx (line 74) | def _get_item_by_idx(self, iterator, idx) -> T: method __getitem__ (line 83) | def __getitem__(self, idx: Union[slice, int]) -> Union["Sequential", T]: method __setitem__ (line 89) | def __setitem__(self, idx: int, module: Module) -> None: method __delitem__ (line 93) | def __delitem__(self, idx: Union[slice, int]) -> None: method __len__ (line 104) | def __len__(self) -> int: method __add__ (line 107) | def __add__(self, other) -> "Sequential": method pop (line 120) | def pop(self, key: Union[int, slice]) -> Module: method __iadd__ (line 125) | def __iadd__(self, other) -> "Sequential": method __mul__ (line 136) | def __mul__(self, other: int) -> "Sequential": method __rmul__ (line 150) | def __rmul__(self, other: int) -> "Sequential": method __imul__ (line 153) | def __imul__(self, other: int) -> "Sequential": method __dir__ (line 167) | def __dir__(self): method __iter__ (line 172) | def __iter__(self) -> Iterator[Module]: method forward (line 179) | def forward(self, input): method append (line 184) | def append(self, module: Module) -> "Sequential": method insert (line 193) | def insert(self, index: int, module: Module) -> "Sequential": method extend (line 206) | def extend(self, sequential) -> "Sequential": class ModuleList (line 212) | class ModuleList(Module): method __init__ (line 238) | def __init__(self, modules: Optional[Iterable[Module]] = None) -> None: method _get_abs_string_index (line 243) | def _get_abs_string_index(self, idx): method __getitem__ (line 252) | def __getitem__(self, idx: Union[int, slice]) -> Union[Module, "Module... method __setitem__ (line 258) | def __setitem__(self, idx: int, module: Module) -> None: method __delitem__ (line 262) | def __delitem__(self, idx: Union[int, slice]) -> None: method __len__ (line 272) | def __len__(self) -> int: method __iter__ (line 275) | def __iter__(self) -> Iterator[Module]: method __iadd__ (line 278) | def __iadd__(self, modules: Iterable[Module]) -> "ModuleList": method __add__ (line 281) | def __add__(self, other: Iterable[Module]) -> "ModuleList": method __repr__ (line 287) | def __repr__(self): method __dir__ (line 319) | def __dir__(self): method insert (line 324) | def insert(self, index: int, module: Module) -> None: method append (line 335) | def append(self, module: Module) -> "ModuleList": method pop (line 344) | def pop(self, key: Union[int, slice]) -> Module: method extend (line 349) | def extend(self, modules: Iterable[Module]) -> "ModuleList": class ModuleDict (line 367) | class ModuleDict(Module): method __init__ (line 394) | def __init__(self, modules: Optional[Mapping[str, Module]] = None) -> ... method __getitem__ (line 399) | def __getitem__(self, key: str) -> Module: method __setitem__ (line 402) | def __setitem__(self, key: str, module: Module) -> None: method __delitem__ (line 405) | def __delitem__(self, key: str) -> None: method __len__ (line 408) | def __len__(self) -> int: method __iter__ (line 411) | def __iter__(self) -> Iterator[str]: method __contains__ (line 414) | def __contains__(self, key: str) -> bool: method clear (line 417) | def clear(self) -> None: method pop (line 421) | def pop(self, key: str) -> Module: method keys (line 431) | def keys(self) -> Iterable[str]: method items (line 435) | def items(self) -> Iterable[Tuple[str, Module]]: method values (line 439) | def values(self) -> Iterable[Module]: method update (line 443) | def update(self, modules: Mapping[str, Module]) -> None: FILE: candle-pyo3/py_src/candle/nn/linear.py class Identity (line 11) | class Identity(Module): method __init__ (line 30) | def __init__(self, *args: Any, **kwargs: Any) -> None: method forward (line 33) | def forward(self, input: Tensor) -> Tensor: class Linear (line 37) | class Linear(Module): method __init__ (line 67) | def __init__( method forward (line 89) | def forward(self, x: Tensor) -> Tensor: method extra_repr (line 118) | def extra_repr(self) -> str: FILE: candle-pyo3/py_src/candle/nn/module.py class _IncompatibleKeys (line 21) | class _IncompatibleKeys(namedtuple("IncompatibleKeys", ["missing_keys", ... method __repr__ (line 22) | def __repr__(self): class Module (line 31) | class Module: method __init__ (line 46) | def __init__(self, *args, **kwargs) -> None: method __call__ (line 55) | def __call__(self, *input): method forward (line 61) | def forward(self, *input): method children (line 68) | def children(self) -> Iterator["Module"]: method named_children (line 77) | def named_children(self) -> Iterator[Tuple[str, "Module"]]: method add_module (line 97) | def add_module(self, name: str, module: Optional["Module"]) -> None: method register_module (line 119) | def register_module(self, name: str, module: Optional["Module"]) -> None: method modules (line 123) | def modules(self) -> Iterator["Module"]: method named_modules (line 128) | def named_modules( method buffers (line 164) | def buffers(self, recurse: bool = True) -> Iterator[TensorLike]: method named_buffers (line 171) | def named_buffers( method state_dict (line 207) | def state_dict(self, *, destination: T_destination, prefix: str = ...,... method state_dict (line 210) | def state_dict(self, *, prefix: str = ..., keep_vars: bool = ...) -> D... method state_dict (line 212) | def state_dict(self, *args, destination=None, prefix="", keep_vars=Fal... method _save_to_state_dict (line 283) | def _save_to_state_dict(self, destination, prefix, keep_vars): method load_state_dict (line 303) | def load_state_dict(self, state_dict: Mapping[str, Any], strict: bool ... method _load_from_state_dict (line 391) | def _load_from_state_dict( method _named_members (line 480) | def _named_members(self, get_members_fn, prefix="", recurse=True, remo... method _get_name (line 494) | def _get_name(self): method _apply (line 497) | def _apply(self, fn): method __move_tensor_to_device (line 507) | def __move_tensor_to_device(self, tensor: TensorLike, device: str): method device (line 513) | def device(self) -> str: method cuda (line 524) | def cuda(self: T) -> T: method cpu (line 543) | def cpu(self: T) -> T: method __cast_tensor (line 558) | def __cast_tensor(self, tensor: TensorLike, dtype: Union[DType, str]): method type (line 564) | def type(self: T, dst_type: Union[DType, str]) -> T: method to (line 583) | def to( method to (line 590) | def to(self: T, dtype: Union[DType, str]) -> T: ... method to (line 592) | def to(self, *args, **kwargs): method __setattr__ (line 659) | def __setattr__(self, __name: str, __value: Any) -> None: method __getattr__ (line 681) | def __getattr__(self, __name: str) -> Any: method __delattr__ (line 692) | def __delattr__(self, name): FILE: candle-pyo3/py_src/candle/nn/normalization.py class LayerNorm (line 10) | class LayerNorm(Module): method __init__ (line 22) | def __init__( method forward (line 43) | def forward(self, input: Tensor) -> Tensor: method extra_repr (line 54) | def extra_repr(self) -> str: FILE: candle-pyo3/py_src/candle/nn/sparse.py class Embedding (line 7) | class Embedding(Module): method __init__ (line 27) | def __init__(self, num_embeddings: int, embedding_dim: int, device=Non... method forward (line 34) | def forward(self, indexes: Tensor) -> Tensor: FILE: candle-pyo3/py_src/candle/onnx/__init__.pyi class ONNXModel (line 7) | class ONNXModel: method __init__ (line 12) | def __init__(self, path: str): method doc_string (line 16) | def doc_string(self) -> str: method domain (line 23) | def domain(self) -> str: method initializers (line 29) | def initializers(self) -> Dict[str, Tensor]: method inputs (line 36) | def inputs(self) -> Optional[Dict[str, ONNXTensorDescription]]: method ir_version (line 43) | def ir_version(self) -> int: method model_version (line 50) | def model_version(self) -> int: method outputs (line 57) | def outputs(self) -> Optional[Dict[str, ONNXTensorDescription]]: method producer_name (line 64) | def producer_name(self) -> str: method producer_version (line 71) | def producer_version(self) -> str: method run (line 77) | def run(self, inputs: Dict[str, Tensor]) -> Dict[str, Tensor]: class ONNXTensorDescription (line 83) | class ONNXTensorDescription: method dtype (line 89) | def dtype(self) -> DType: method shape (line 96) | def shape(self) -> Tuple[Union[int, str, Any]]: FILE: candle-pyo3/py_src/candle/testing/__init__.py function _assert_tensor_metadata (line 8) | def _assert_tensor_metadata( function assert_equal (line 29) | def assert_equal( function assert_almost_equal (line 44) | def assert_almost_equal( FILE: candle-pyo3/py_src/candle/utils/__init__.pyi function cuda_is_available (line 8) | def cuda_is_available() -> bool: function get_num_threads (line 15) | def get_num_threads() -> int: function has_accelerate (line 22) | def has_accelerate() -> bool: function has_mkl (line 29) | def has_mkl() -> bool: function load_ggml (line 36) | def load_ggml(path, device=None) -> Tuple[Dict[str, QTensor], Dict[str, ... function load_gguf (line 44) | def load_gguf(path, device=None) -> Tuple[Dict[str, QTensor], Dict[str, ... function load_safetensors (line 52) | def load_safetensors(path: Union[str, PathLike]) -> Dict[str, Tensor]: function save_gguf (line 59) | def save_gguf(path, tensors, metadata): function save_safetensors (line 66) | def save_safetensors(path: Union[str, PathLike], tensors: Dict[str, Tens... FILE: candle-pyo3/quant-llama.py function gguf_rename (line 10) | def gguf_rename(tensor_name: str): function main (line 27) | def main(): FILE: candle-pyo3/src/lib.rs type PyTensor (line 34) | struct PyTensor(Tensor); type Target (line 37) | type Target = Tensor; method deref (line 39) | fn deref(&self) -> &Self::Target { method new (line 261) | fn new(py: Python<'_>, data: Py) -> PyResult { method values (line 303) | fn values(&self, py: Python<'_>) -> PyResult> { method to_torch (line 347) | fn to_torch(&self, py: Python<'_>) -> PyResult> { method shape (line 360) | fn shape<'py>(&self, py: Python<'py>) -> PyResult> { method nelement (line 367) | fn nelement(&self) -> usize { method stride (line 374) | fn stride<'py>(&self, py: Python<'py>) -> PyResult> { method dtype (line 381) | fn dtype(&self) -> PyDType { method device (line 388) | fn device<'py>(&self, py: Python<'py>) -> PyResult usize { method __repr__ (line 399) | fn __repr__(&self) -> String { method __str__ (line 403) | fn __str__(&self) -> String { method abs (line 409) | fn abs(&self) -> PyResult { method sin (line 415) | fn sin(&self) -> PyResult { method cos (line 421) | fn cos(&self) -> PyResult { method log (line 427) | fn log(&self) -> PyResult { method sqr (line 433) | fn sqr(&self) -> PyResult { method sqrt (line 439) | fn sqrt(&self) -> PyResult { method recip (line 445) | fn recip(&self) -> PyResult { method exp (line 451) | fn exp(&self) -> PyResult { method powf (line 458) | fn powf(&self, p: f64) -> PyResult { method index_select (line 471) | fn index_select(&self, rhs: &Self, dim: i64) -> PyResult { method gather (line 477) | fn gather(&self, index: &Self, dim: i64) -> PyResult { method matmul (line 485) | fn matmul(&self, rhs: &Self) -> PyResult { method broadcast_add (line 492) | fn broadcast_add(&self, rhs: &Self) -> PyResult { method broadcast_sub (line 499) | fn broadcast_sub(&self, rhs: &Self) -> PyResult { method broadcast_mul (line 506) | fn broadcast_mul(&self, rhs: &Self) -> PyResult { method broadcast_div (line 513) | fn broadcast_div(&self, rhs: &Self) -> PyResult { method where_cond (line 522) | fn where_cond(&self, on_true: &Self, on_false: &Self) -> PyResult { method __getitem__ (line 531) | fn __getitem__(&self, py: Python, idx: Py) -> PyResult { method __add__ (line 677) | fn __add__(&self, rhs: &Bound) -> PyResult { method __radd__ (line 688) | fn __radd__(&self, rhs: &Bound) -> PyResult { method __mul__ (line 694) | fn __mul__(&self, rhs: &Bound) -> PyResult { method __rmul__ (line 705) | fn __rmul__(&self, rhs: &Bound) -> PyResult { method __sub__ (line 711) | fn __sub__(&self, rhs: &Bound) -> PyResult { method __truediv__ (line 724) | fn __truediv__(&self, rhs: &Bound) -> PyResult { method __richcmp__ (line 736) | fn __richcmp__(&self, rhs: &Bound, op: CompareOp) -> PyResult u64 { method reshape (line 790) | fn reshape(&self, shape: PyShapeWithHole) -> PyResult { method broadcast_as (line 801) | fn broadcast_as(&self, shape: PyShapeWithHole) -> PyResult { method broadcast_left (line 812) | fn broadcast_left(&self, shape: PyShapeWithHole) -> PyResult { method squeeze (line 823) | fn squeeze(&self, dim: i64) -> PyResult { method unsqueeze (line 831) | fn unsqueeze(&self, dim: usize) -> PyResult { method get (line 838) | fn get(&self, index: i64) -> PyResult { method transpose (line 846) | fn transpose(&self, dim1: usize, dim2: usize) -> PyResult { method narrow (line 854) | fn narrow(&self, dim: i64, start: i64, len: usize) -> PyResult { method argmax_keepdim (line 863) | fn argmax_keepdim(&self, dim: i64) -> PyResult { method argmin_keepdim (line 871) | fn argmin_keepdim(&self, dim: i64) -> PyResult { method max_keepdim (line 879) | fn max_keepdim(&self, dim: i64) -> PyResult { method min_keepdim (line 887) | fn min_keepdim(&self, dim: i64) -> PyResult { method sum_keepdim (line 895) | fn sum_keepdim(&self, dims: Py, py: Python<'_>) -> PyResult PyResult { method mean_all (line 914) | fn mean_all(&self) -> PyResult { method flatten_from (line 924) | fn flatten_from(&self, dim: i64) -> PyResult { method flatten_to (line 932) | fn flatten_to(&self, dim: i64) -> PyResult { method flatten_all (line 939) | fn flatten_all(&self) -> PyResult { method t (line 945) | fn t(&self) -> PyResult { method contiguous (line 951) | fn contiguous(&self) -> PyResult { method is_contiguous (line 957) | fn is_contiguous(&self) -> bool { method is_fortran_contiguous (line 963) | fn is_fortran_contiguous(&self) -> bool { method detach (line 969) | fn detach(&self) -> Self { method copy (line 975) | fn copy(&self) -> PyResult { method to (line 982) | fn to(&self, args: &Bound, kwargs: Option<&Bound>) ->... method to_dtype (line 1086) | fn to_dtype(&self, dtype: Py, py: Python<'_>) -> PyResult { method to_device (line 1094) | fn to_device(&self, device: PyDevice) -> PyResult { method quantize (line 1102) | fn quantize(&self, quantized_dtype: &str) -> PyResult { type PyDType (line 47) | struct PyDType(DType); method __repr__ (line 51) | fn __repr__(&self) -> String { method __str__ (line 55) | fn __str__(&self) -> String { method from_pyobject (line 60) | fn from_pyobject(obj: Py, py: Python<'_>) -> PyResult { type PyDevice (line 76) | enum PyDevice { method from_device (line 83) | fn from_device(device: &Device) -> Self { method as_device (line 91) | fn as_device(&self) -> PyResult { type Error (line 117) | type Error = PyErr; method extract (line 119) | fn extract(obj: Borrowed<'_, '_, PyAny>) -> PyResult { type Target (line 132) | type Target = PyString; type Output (line 133) | type Output = Bound<'py, Self::Target>; type Error (line 134) | type Error = PyErr; method into_pyobject (line 136) | fn into_pyobject(self, py: Python<'py>) -> PyResult { type PyWithDType (line 146) | trait PyWithDType: WithDType { method to_py (line 147) | fn to_py(&self, py: Python<'_>) -> Py; function actual_index (line 170) | fn actual_index(t: &Tensor, dim: usize, index: i64) -> ::candle::Result<... function actual_dim (line 186) | fn actual_dim(t: &Tensor, dim: i64) -> ::candle::Result { type MapDType (line 203) | trait MapDType { method f (line 205) | fn f(&self, t: &Tensor) -> PyResult; method map (line 207) | fn map(&self, t: &Tensor) -> PyResult { type Indexer (line 235) | enum Indexer { type TorchTensor (line 244) | struct TorchTensor(Py); type Error (line 247) | type Error = PyErr; method extract (line 249) | fn extract(obj: Borrowed<'_, '_, PyAny>) -> PyResult { function cat (line 1133) | fn cat(tensors: Vec, dim: i64) -> PyResult { function stack (line 1147) | fn stack(tensors: Vec, dim: usize) -> PyResult { function tensor (line 1157) | fn tensor(py: Python<'_>, data: Py) -> PyResult { function rand (line 1165) | fn rand(_py: Python<'_>, shape: PyShape, device: Option) -> Py... function randn (line 1175) | fn randn(_py: Python<'_>, shape: PyShape, device: Option) -> P... function ones (line 1185) | fn ones( function zeros (line 1204) | fn zeros( type PyQTensor (line 1222) | struct PyQTensor(Arc); type Target (line 1225) | type Target = QTensor; method deref (line 1227) | fn deref(&self) -> &Self::Target { method ggml_dtype (line 1237) | fn ggml_dtype(&self) -> String { method rank (line 1244) | fn rank(&self) -> usize { method shape (line 1251) | fn shape<'py>(&self, py: Python<'py>) -> Bound<'py, PyTuple> { method __repr__ (line 1255) | fn __repr__(&self) -> String { method __str__ (line 1259) | fn __str__(&self) -> String { method dequantize (line 1265) | fn dequantize(&self) -> PyResult { method matmul_t (line 1273) | fn matmul_t(&self, lhs: &PyTensor) -> PyResult { function load_safetensors (line 1284) | fn load_safetensors(path: &str, py: Python<'_>) -> PyResult> { function save_safetensors (line 1297) | fn save_safetensors( function load_ggml (line 1313) | fn load_ggml<'py>( function load_gguf (line 1353) | fn load_gguf<'py>( function save_gguf (line 1409) | fn save_gguf(path: &str, tensors: Py, metadata: Py, py: Py... function cuda_is_available (line 1494) | fn cuda_is_available() -> bool { function has_accelerate (line 1501) | fn has_accelerate() -> bool { function has_mkl (line 1508) | fn has_mkl() -> bool { function get_num_threads (line 1515) | fn get_num_threads() -> usize { function candle_utils (line 1519) | fn candle_utils(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { function softmax (line 1536) | fn softmax(tensor: PyTensor, dim: i64) -> PyResult { function avg_pool2d (line 1546) | fn avg_pool2d(tensor: PyTensor, ksize: usize, stride: usize) -> PyResult... function max_pool2d (line 1557) | fn max_pool2d(tensor: PyTensor, ksize: usize, stride: usize) -> PyResult... function silu (line 1568) | fn silu(tensor: PyTensor) -> PyResult { function gelu (line 1577) | fn gelu(tensor: PyTensor) -> PyResult { function relu (line 1586) | fn relu(tensor: PyTensor) -> PyResult { function tanh (line 1595) | fn tanh(tensor: PyTensor) -> PyResult { function candle_functional_m (line 1600) | fn candle_functional_m(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyRe... function candle_onnx_m (line 1612) | fn candle_onnx_m(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<(... function candle (line 1620) | fn candle(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { FILE: candle-pyo3/src/onnx.rs type PyONNXTensorDescriptor (line 17) | pub struct PyONNXTensorDescriptor(ONNXTensor); method dtype (line 24) | fn dtype(&self) -> PyResult { method shape (line 41) | fn shape(&self, py: Python) -> PyResult> { method __repr__ (line 58) | fn __repr__(&self, py: Python) -> String { method __str__ (line 77) | fn __str__(&self, py: Python) -> String { type PyONNXModel (line 85) | pub struct PyONNXModel(ModelProto); method new (line 118) | fn new(path: String) -> PyResult { method ir_version (line 126) | fn ir_version(&self) -> i64 { method producer_name (line 133) | fn producer_name(&self) -> String { method producer_version (line 140) | fn producer_version(&self) -> String { method domain (line 147) | fn domain(&self) -> String { method model_version (line 154) | fn model_version(&self) -> i64 { method doc_string (line 161) | fn doc_string(&self) -> String { method initializers (line 167) | fn initializers(&self) -> PyResult> { method inputs (line 182) | fn inputs(&self) -> Option> { method outputs (line 192) | fn outputs(&self) -> Option> { method run (line 202) | fn run(&self, inputs: HashMap) -> PyResult); type Error (line 9) | type Error = PyErr; method extract (line 11) | fn extract(obj: Borrowed<'_, '_, PyAny>) -> PyResult { function from (line 31) | fn from(val: PyShape) -> Self { type PyShapeWithHole (line 38) | pub struct PyShapeWithHole(Vec); type Error (line 41) | type Error = PyErr; method extract (line 43) | fn extract(obj: Borrowed<'_, '_, PyAny>) -> PyResult { method is_absolute (line 73) | pub fn is_absolute(&self) -> bool { method to_absolute (line 78) | pub fn to_absolute(&self, t: &Tensor) -> PyResult { FILE: candle-pyo3/src/utils.rs function wrap_err (line 4) | pub fn wrap_err(err: ::candle::Error) -> PyErr { FILE: candle-pyo3/stub.py function do_indent (line 23) | def do_indent(text: Optional[str], indent: str): function function (line 29) | def function(obj, indent: str, text_signature: str = None): function member_sort (line 61) | def member_sort(member): function fn_predicate (line 69) | def fn_predicate(obj): function get_module_members (line 78) | def get_module_members(module): function pyi_file (line 88) | def pyi_file(obj, indent=""): function py_file (line 171) | def py_file(module, origin): function do_black (line 186) | def do_black(content, is_pyi): function write (line 199) | def write(module, directory, origin, check=False): function extract_additional_types (line 245) | def extract_additional_types(module): FILE: candle-pyo3/tests/bindings/test_linear.py function test_linear_layer_can_be_constructed (line 6) | def test_linear_layer_can_be_constructed(): function test_linear_layer_can_forward_a_singular_input (line 11) | def test_linear_layer_can_forward_a_singular_input(): function test_linear_layer_can_forward_a_batched_input (line 18) | def test_linear_layer_can_forward_a_batched_input(): function test_quantized_linear_layer_can_forward_a_singular_input (line 25) | def test_quantized_linear_layer_can_forward_a_singular_input(): function test_quantized_linear_layer_can_forward_a_batched_input (line 33) | def test_quantized_linear_layer_can_forward_a_batched_input(): FILE: candle-pyo3/tests/bindings/test_module.py function test_module_can_be_constructed (line 9) | def test_module_can_be_constructed(): function test_module_registers_tensors (line 18) | def test_module_registers_tensors(): function test_module_registers_submodules (line 30) | def test_module_registers_submodules(): function test_module_can_dump_statedict (line 45) | def test_module_can_dump_statedict(): function test_module_can_load_statedict (line 61) | def test_module_can_load_statedict(): function test_module_throws_on_shape_mismatch (line 77) | def test_module_throws_on_shape_mismatch(): function test_module_throws_on_missing_key (line 92) | def test_module_throws_on_missing_key(): function test_module_can_load_quantized_tensors (line 108) | def test_module_can_load_quantized_tensors(): function test_module_dequantizes_tensors_automatically (line 124) | def test_module_dequantizes_tensors_automatically(): function test_module_can_be_moved_to_cuda (line 139) | def test_module_can_be_moved_to_cuda(): function test_module_can_be_moved_from_cuda_to_cpu (line 151) | def test_module_can_be_moved_from_cuda_to_cpu(): FILE: candle-pyo3/tests/bindings/test_testing.py function test_assert_equal_asserts_correctly (line 8) | def test_assert_equal_asserts_correctly(dtype: candle.DType): function test_assert_almost_equal_asserts_correctly (line 18) | def test_assert_almost_equal_asserts_correctly(dtype: candle.DType): FILE: candle-pyo3/tests/native/test_shape.py function test_absolute_shapes_are_valid (line 6) | def test_absolute_shapes_are_valid(): function test_relative_shapes_are_valid (line 17) | def test_relative_shapes_are_valid(): FILE: candle-pyo3/tests/native/test_tensor.py function test_tensor_can_be_constructed (line 8) | def test_tensor_can_be_constructed(): function test_tensor_can_be_constructed_from_list (line 13) | def test_tensor_can_be_constructed_from_list(): function test_tensor_can_be_constructed_from_list_of_lists (line 18) | def test_tensor_can_be_constructed_from_list_of_lists(): function test_tensor_can_be_quantized (line 23) | def test_tensor_can_be_quantized(): function test_tensor_can_be_indexed (line 43) | def test_tensor_can_be_indexed(): function test_tensor_can_be_sliced (line 51) | def test_tensor_can_be_sliced(): function test_tensor_can_be_sliced_2d (line 62) | def test_tensor_can_be_sliced_2d(): function test_tensor_can_be_scliced_3d (line 72) | def test_tensor_can_be_scliced_3d(): function assert_bool (line 81) | def assert_bool(t: Tensor, expected: bool): function test_tensor_supports_equality_operations_with_scalars (line 87) | def test_tensor_supports_equality_operations_with_scalars(): function test_tensor_supports_equality_operations_with_tensors (line 109) | def test_tensor_supports_equality_operations_with_tensors(): function test_tensor_equality_operations_can_broadcast (line 133) | def test_tensor_equality_operations_can_broadcast(): function test_tensor_can_be_hashed (line 145) | def test_tensor_can_be_hashed(): function test_tensor_can_be_expanded_with_none (line 153) | def test_tensor_can_be_expanded_with_none(): function test_tensor_can_be_index_via_tensor (line 168) | def test_tensor_can_be_index_via_tensor(): function test_tensor_can_be_index_via_list (line 179) | def test_tensor_can_be_index_via_list(): function test_tensor_can_be_cast_via_to (line 190) | def test_tensor_can_be_cast_via_to(): function test_tensor_can_be_moved_via_to (line 212) | def test_tensor_can_be_moved_via_to(): function test_tensor_can_be_moved_and_cast_via_to (line 234) | def test_tensor_can_be_moved_and_cast_via_to(): function test_tensor_can_be_added (line 254) | def test_tensor_can_be_added(): function test_tensor_can_be_subtracted (line 272) | def test_tensor_can_be_subtracted(): function test_tensor_can_be_multiplied (line 290) | def test_tensor_can_be_multiplied(): function test_tensor_can_be_divided (line 308) | def test_tensor_can_be_divided(): FILE: candle-pyo3/tests/native/test_utils.py function test_can_roundtrip_safetensors (line 10) | def test_can_roundtrip_safetensors(): function test_can_roundtrip_gguf (line 26) | def test_can_roundtrip_gguf(): FILE: candle-transformers/src/fused_moe.rs type MoeCfg (line 7) | pub struct MoeCfg { type FusedMoe (line 19) | pub struct FusedMoe { method new (line 32) | pub fn new(cfg: &MoeCfg, vb: VarBuilder, dtype: DType) -> Result { method forward (line 91) | pub fn forward(&self, xs: &Tensor, is_prefill: bool) -> Result { type FusedMoeGGUF (line 163) | pub struct FusedMoeGGUF { method new (line 177) | pub fn new( method forward (line 222) | pub fn forward(&self, xs: &Tensor, is_prefill: bool) -> Result { FILE: candle-transformers/src/generation/mod.rs type Sampling (line 10) | pub enum Sampling { type LogitsProcessor (line 20) | pub struct LogitsProcessor { method from_sampling (line 26) | pub fn from_sampling(seed: u64, sampling: Sampling) -> Self { method new (line 31) | pub fn new(seed: u64, temperature: Option, top_p: Option) ->... method sample_argmax (line 43) | fn sample_argmax(&mut self, logits: Tensor) -> Result { method sample_gumbel_softmax (line 47) | fn sample_gumbel_softmax(&mut self, logits: &Tensor, temperature: f64)... method sample_multinomial (line 52) | fn sample_multinomial(&mut self, prs: &Vec) -> Result { method sample_topp (line 61) | fn sample_topp(&mut self, prs: &mut Vec, top_p: f32) -> Result, top_k: usize) -> Result<... method sample_topk_topp (line 96) | fn sample_topk_topp(&mut self, prs: &mut Vec, top_k: usize, top_p... method sample (line 114) | pub fn sample(&mut self, logits: &Tensor) -> Result { method sample_f (line 118) | pub fn sample_f(&mut self, logits: &Tensor, f: impl FnOnce(&mut [f32])... FILE: candle-transformers/src/models/based.rs type LinearAttentionFeatureMapConfig (line 16) | pub struct LinearAttentionFeatureMapConfig { type LinearAttentionConfig (line 21) | pub struct LinearAttentionConfig { type SlidingWindowAttentionConfig (line 28) | pub struct SlidingWindowAttentionConfig { type Config (line 34) | pub struct Config { function default_rope (line 57) | fn default_rope() -> f64 { type MLP (line 63) | struct MLP { method new (line 69) | fn new(cfg: &Config, vb: VarBuilder) -> Result { function swiglu (line 78) | fn swiglu(xs: &Tensor) -> Result { method forward (line 84) | fn forward(&self, xs: &Tensor) -> Result { type BasedConv (line 94) | struct BasedConv { method new (line 102) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method step (line 123) | fn step(&mut self, xs: &Tensor) -> Result { method forward (line 138) | fn forward(&mut self, xs: &Tensor, seqlen_offset: usize) -> Result Result { method taylor_expansion (line 220) | fn taylor_expansion(&self) -> Result> { method forward (line 243) | fn forward(&mut self, xs: &Tensor, seqlen_offset: usize) -> Result Result { method apply_rotary_emb_qkv (line 333) | fn apply_rotary_emb_qkv( type SlidingWindowAttention (line 350) | struct SlidingWindowAttention { method new (line 361) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 379) | fn forward( type SequenceMixer (line 438) | enum SequenceMixer { method forward (line 445) | fn forward( type DecoderLayer (line 460) | struct DecoderLayer { method new (line 468) | fn new(layer_idx: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 492) | fn forward( type Model (line 509) | pub struct Model { method new (line 520) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 543) | fn prepare_decoder_attention_mask( method forward (line 572) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... FILE: candle-transformers/src/models/beit.rs constant IMG_SIZE (line 11) | const IMG_SIZE: usize = 384; constant PATCH_SIZE (line 12) | const PATCH_SIZE: usize = 16; constant NUM_CLASSES (line 13) | const NUM_CLASSES: usize = 1000; constant WINDOW_SIZE (line 14) | const WINDOW_SIZE: usize = IMG_SIZE / PATCH_SIZE; constant NB_TOKENS (line 15) | const NB_TOKENS: usize = WINDOW_SIZE * WINDOW_SIZE + 1; function linear (line 17) | fn linear(vb: VarBuilder, in_dim: usize, out_dim: usize, bias: bool) -> ... type Attention (line 26) | struct Attention { method new (line 36) | fn new( method gen_relative_position_index (line 67) | fn gen_relative_position_index(device: &Device) -> Result { method _get_rel_pos_bias (line 123) | fn _get_rel_pos_bias(&self) -> Result { method forward (line 141) | fn forward(&self, xs: &Tensor) -> Result { type LayerScale (line 161) | struct LayerScale { method new (line 166) | fn new(vb: VarBuilder, dim: usize) -> Result { method forward (line 173) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 179) | struct Mlp { method new (line 185) | fn new(vb: VarBuilder, in_features: usize, hidden_features: usize, bia... method forward (line 194) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 201) | struct Block { method new (line 211) | fn new(vb: VarBuilder, dim: usize, num_heads: usize) -> Result { method forward (line 230) | fn forward(&self, xs: &Tensor) -> Result { type PatchEmbed (line 245) | struct PatchEmbed { method new (line 251) | fn new(vb: VarBuilder, patch_size: usize, in_chans: usize, embed_dim: ... method forward (line 265) | fn forward(&self, xs: &Tensor) -> Result { type BeitVisionTransformer (line 282) | pub struct BeitVisionTransformer { method new (line 291) | pub fn new(vb: VarBuilder, depth: usize, embed_dim: usize, num_heads: ... method prepare_tokens_with_mask (line 309) | fn prepare_tokens_with_mask(&self, xs: &Tensor) -> Result { method get_intermediate_layers_not_chunked (line 314) | fn get_intermediate_layers_not_chunked( method get_intermediate_layers (line 337) | pub fn get_intermediate_layers( method forward (line 394) | fn forward(&self, xs: &Tensor) -> Result { function vit_base (line 405) | pub fn vit_base(vb: VarBuilder) -> Result { function vit_large (line 409) | pub fn vit_large(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/bert.rs constant DTYPE (line 15) | pub const DTYPE: DType = DType::F32; type HiddenAct (line 19) | pub enum HiddenAct { type HiddenActLayer (line 26) | struct HiddenActLayer { method new (line 32) | fn new(act: HiddenAct) -> Self { method forward (line 37) | fn forward(&self, xs: &Tensor) -> candle::Result { type PositionEmbeddingType (line 50) | pub enum PositionEmbeddingType { type Config (line 57) | pub struct Config { method _all_mini_lm_l6_v2 (line 102) | fn _all_mini_lm_l6_v2() -> Self { method default (line 79) | fn default() -> Self { type Dropout (line 126) | struct Dropout { method new (line 132) | fn new(pr: f64) -> Self { method forward (line 138) | fn forward(&self, x: &Tensor) -> Result { type BertEmbeddings (line 145) | struct BertEmbeddings { method load (line 155) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 186) | fn forward(&self, input_ids: &Tensor, token_type_ids: &Tensor) -> Resu... type BertSelfAttention (line 205) | struct BertSelfAttention { method load (line 217) | fn load(vb: VarBuilder, config: &Config) -> Result { method transpose_for_scores (line 237) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method forward (line 246) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type BertSelfOutput (line 273) | struct BertSelfOutput { method load (line 281) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 297) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type BertAttention (line 307) | struct BertAttention { method load (line 314) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 324) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type BertIntermediate (line 334) | struct BertIntermediate { method load (line 341) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 352) | fn forward(&self, hidden_states: &Tensor) -> Result { type BertOutput (line 362) | struct BertOutput { method load (line 370) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 386) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type BertLayer (line 396) | pub struct BertLayer { method load (line 404) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 416) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type BertEncoder (line 432) | pub struct BertEncoder { method load (line 438) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 446) | pub fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor)... type BertModel (line 458) | pub struct BertModel { method load (line 466) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 495) | pub fn forward( function get_extended_attention_mask (line 515) | fn get_extended_attention_mask(attention_mask: &Tensor, dtype: DType) ->... type BertPredictionHeadTransform (line 531) | struct BertPredictionHeadTransform { method load (line 538) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 555) | fn forward(&self, hidden_states: &Tensor) -> Result { type BertLMPredictionHead (line 564) | pub struct BertLMPredictionHead { method load (line 570) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 578) | fn forward(&self, hidden_states: &Tensor) -> Result { type BertOnlyMLMHead (line 585) | pub struct BertOnlyMLMHead { method load (line 590) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 597) | fn forward(&self, sequence_output: &Tensor) -> Result { type BertForMaskedLM (line 602) | pub struct BertForMaskedLM { method load (line 608) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 614) | pub fn forward( FILE: candle-transformers/src/models/bigcode.rs function layer_norm (line 27) | fn layer_norm(size: usize, eps: f64, vb: VarBuilder) -> Result { function make_causal_mask (line 33) | fn make_causal_mask(t: usize, device: &Device) -> Result { type Config (line 42) | pub struct Config { method starcoder_1b (line 60) | pub fn starcoder_1b() -> Self { method starcoder_3b (line 75) | pub fn starcoder_3b() -> Self { method starcoder_7b (line 90) | pub fn starcoder_7b() -> Self { method starcoder (line 105) | pub fn starcoder() -> Self { type Attention (line 120) | struct Attention { method load (line 133) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method attn (line 157) | fn attn( method forward (line 206) | fn forward(&mut self, hidden_states: &Tensor, attention_mask: &Tensor)... type Mlp (line 247) | struct Mlp { method load (line 253) | fn load(inner_dim: usize, vb: VarBuilder, cfg: &Config) -> Result { method forward (line 259) | fn forward(&mut self, hidden_states: &Tensor) -> Result { type Block (line 267) | struct Block { method load (line 275) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 290) | fn forward(&mut self, hidden_states: &Tensor, attention_mask: &Tensor)... type GPTBigCode (line 303) | pub struct GPTBigCode { method config (line 314) | pub fn config(&self) -> &Config { method load (line 318) | pub fn load(vb: VarBuilder, cfg: Config) -> Result { method forward (line 340) | pub fn forward(&mut self, input_ids: &Tensor, past_len: usize) -> Resu... FILE: candle-transformers/src/models/blip.rs type VisionConfig (line 18) | pub struct VisionConfig { type Config (line 31) | pub struct Config { method image_captioning_large (line 39) | pub fn image_captioning_large() -> Self { type VisionEmbeddings (line 74) | struct VisionEmbeddings { method new (line 81) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 108) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 124) | struct Attention { method new (line 132) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 147) | fn forward(&self, xs: &Tensor, attn_mask: Option<&Tensor>) -> Result Result { method forward (line 192) | fn forward(&self, xs: &Tensor) -> Result { type EncoderLayer (line 200) | struct EncoderLayer { method new (line 208) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 222) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type Encoder (line 235) | struct Encoder { method new (line 240) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 250) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type VisionModel (line 260) | pub struct VisionModel { method new (line 267) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 281) | fn forward(&self, xs: &Tensor) -> Result { type BlipForConditionalGeneration (line 290) | pub struct BlipForConditionalGeneration { method new (line 296) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method vision_model (line 306) | pub fn vision_model(&self) -> &VisionModel { method text_decoder (line 310) | pub fn text_decoder(&mut self) -> &mut blip_text::TextLMHeadModel { method reset_kv_cache (line 314) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/blip_text.rs type Config (line 16) | pub struct Config { type TextEmbeddings (line 31) | struct TextEmbeddings { method new (line 39) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 58) | fn forward(&self, xs: &Tensor, past_kv_len: usize) -> Result { type TextSelfAttention (line 68) | struct TextSelfAttention { method new (line 79) | fn new(cfg: &Config, is_cross_attention: bool, vb: VarBuilder) -> Resu... method transpose_for_scores (line 103) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method reset_kv_cache (line 114) | fn reset_kv_cache(&mut self) { method forward (line 118) | fn forward( type TextSelfOutput (line 166) | struct TextSelfOutput { method new (line 172) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 178) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type TextAttention (line 184) | struct TextAttention { method new (line 190) | fn new(cfg: &Config, is_cross_attention: bool, vb: VarBuilder) -> Resu... method reset_kv_cache (line 196) | fn reset_kv_cache(&mut self) { method forward (line 200) | fn forward( type TextIntermediate (line 214) | struct TextIntermediate { method new (line 220) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 230) | fn forward(&self, xs: &Tensor) -> Result { type TextOutput (line 236) | struct TextOutput { method new (line 242) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 248) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type TextLayer (line 254) | struct TextLayer { method new (line 262) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 279) | fn reset_kv_cache(&mut self) { method forward (line 286) | fn forward( type TextEncoder (line 303) | struct TextEncoder { method new (line 308) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 318) | fn reset_kv_cache(&mut self) { method forward (line 322) | fn forward( type TextPooler (line 337) | pub struct TextPooler { method new (line 342) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 349) | fn forward(&self, xs: &Tensor) -> Result { type TextPredictionHeadTransform (line 358) | struct TextPredictionHeadTransform { method new (line 365) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 377) | fn forward(&self, xs: &Tensor) -> Result { type TextLMPredictionHead (line 385) | struct TextLMPredictionHead { method new (line 391) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 401) | fn forward(&self, xs: &Tensor) -> Result { type TextOnlyMLMHead (line 407) | struct TextOnlyMLMHead { method new (line 412) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 419) | fn forward(&self, xs: &Tensor) -> Result { type TextModel (line 425) | struct TextModel { method new (line 433) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 443) | fn forward( method reset_kv_cache (line 459) | fn reset_kv_cache(&mut self) { type TextLMHeadModel (line 466) | pub struct TextLMHeadModel { method new (line 472) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 478) | pub fn forward( method reset_kv_cache (line 494) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/chatglm.rs type Config (line 11) | pub struct Config { method glm3_6b (line 34) | pub fn glm3_6b() -> Self { type RotaryEmbedding (line 60) | struct RotaryEmbedding { method new (line 65) | fn new(cfg: &Config, dtype: DType, dev: &Device) -> Result { method apply (line 82) | fn apply(&self, xs: &Tensor, seqlen_offset: usize) -> Result { type CoreAttention (line 110) | struct CoreAttention { method new (line 123) | fn new(layer_number: usize, cfg: &Config) -> Result { method forward (line 134) | fn forward( function masked_fill (line 115) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type SelfAttention (line 187) | struct SelfAttention { method new (line 199) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method forward (line 363) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 371) | struct Block { method new (line 380) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method reset_kv_cache (line 493) | fn reset_kv_cache(&mut self) { method forward (line 499) | fn forward(&mut self, xs: &Tensor, attention_mask: &Option) ->... type Embedding (line 512) | struct Embedding { method new (line 518) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 532) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 543) | pub struct Model { method new (line 557) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 574) | pub fn reset_kv_cache(&mut self) { method forward (line 578) | pub fn forward(&mut self, xs: &Tensor) -> Result { function get_mask (line 549) | fn get_mask(size: usize, device: &Device) -> Result { FILE: candle-transformers/src/models/chinese_clip/mod.rs type Activation (line 19) | pub enum Activation { method from (line 27) | fn from(value: String) -> Self { method forward (line 39) | fn forward(&self, xs: &Tensor) -> Result { type ChineseClipConfig (line 50) | pub struct ChineseClipConfig { method clip_vit_base_patch16 (line 60) | pub fn clip_vit_base_patch16() -> Self { type EncoderConfig (line 75) | pub enum EncoderConfig { method embed_dim (line 81) | pub fn embed_dim(&self) -> usize { method num_attention_heads (line 88) | pub fn num_attention_heads(&self) -> usize { method intermediate_size (line 95) | pub fn intermediate_size(&self) -> usize { method num_hidden_layers (line 102) | pub fn num_hidden_layers(&self) -> usize { method activation (line 109) | pub fn activation(&self) -> Activation { method layer_norm_eps (line 116) | pub fn layer_norm_eps(&self) -> f64 { type ChineseClipModel (line 125) | pub struct ChineseClipModel { method new (line 134) | pub fn new(vs: nn::VarBuilder, c: &ChineseClipConfig) -> Result { method get_text_features (line 166) | pub fn get_text_features( method get_image_features (line 179) | pub fn get_image_features(&self, pixel_values: &Tensor) -> Result Result { FILE: candle-transformers/src/models/chinese_clip/text_model.rs type PositionEmbeddingType (line 20) | pub enum PositionEmbeddingType { type ChineseClipTextConfig (line 27) | pub struct ChineseClipTextConfig { method clip_vit_base_patch16 (line 71) | pub fn clip_vit_base_patch16() -> Self { method default (line 47) | fn default() -> Self { type ChineseClipTextEmbeddings (line 94) | pub struct ChineseClipTextEmbeddings { method new (line 106) | pub fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Res... method forward (line 145) | fn forward(&self, xs: &Tensor, token_type_ids: Option<&Tensor>) -> Res... type ChineseClipTextSelfOutput (line 179) | struct ChineseClipTextSelfOutput { method new (line 187) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 203) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type ChineseClipTextSelfAttention (line 213) | struct ChineseClipTextSelfAttention { method new (line 225) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method transpose_for_scores (line 245) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method forward (line 254) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type ChineseClipTextAttention (line 282) | struct ChineseClipTextAttention { method new (line 289) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 299) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type HiddenActLayer (line 307) | type HiddenActLayer = Activation; type ChineseClipTextIntermediate (line 311) | struct ChineseClipTextIntermediate { method new (line 318) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 333) | fn forward(&self, hidden_states: &Tensor) -> Result { type ChineseClipTextOutput (line 343) | struct ChineseClipTextOutput { method new (line 351) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 371) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type ChineseClipTextLayer (line 381) | struct ChineseClipTextLayer { method new (line 389) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 401) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type Tanh (line 414) | struct Tanh; method new (line 417) | pub fn new() -> Self { method forward (line 422) | fn forward(&self, xs: &Tensor) -> Result { type ChineseClipTextPooler (line 428) | struct ChineseClipTextPooler { method new (line 434) | pub fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Res... method forward (line 442) | fn forward(&self, hidden_states: &Tensor) -> Result { type ChineseClipTextEncoder (line 451) | struct ChineseClipTextEncoder { method new (line 457) | fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Result<... method forward (line 465) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type ChineseClipTextTransformer (line 477) | pub struct ChineseClipTextTransformer { method new (line 486) | pub fn new(var: nn::VarBuilder, config: &ChineseClipTextConfig) -> Res... method forward (line 505) | pub fn forward( function get_extended_attention_mask (line 531) | fn get_extended_attention_mask(attention_mask: &Tensor, dtype: DType) ->... FILE: candle-transformers/src/models/chinese_clip/vision_model.rs type ChineseClipVisionConfig (line 15) | pub struct ChineseClipVisionConfig { method clip_vit_base_patch16 (line 53) | pub fn clip_vit_base_patch16() -> Self { method default (line 32) | fn default() -> Self { type ChineseClipVisionEmbeddings (line 73) | pub struct ChineseClipVisionEmbeddings { method new (line 81) | pub fn new(var: nn::VarBuilder, config: &ChineseClipVisionConfig) -> R... method forward (line 117) | fn forward(&self, xs: &Tensor) -> Result { type ChineseClipVisionAttention (line 133) | struct ChineseClipVisionAttention { method new (line 144) | fn new(var: nn::VarBuilder, config: &EncoderConfig) -> Result { method shape (line 165) | fn shape(&self, xs: &Tensor, seq_len: usize, bsz: usize) -> Result)... type ChineseClipVisionMlp (line 214) | struct ChineseClipVisionMlp { method new (line 221) | fn new(var: nn::VarBuilder, config: &EncoderConfig) -> Result { method forward (line 242) | fn forward(&self, xs: &Tensor) -> Result { type ChineseClipVisionEncoderLayer (line 249) | struct ChineseClipVisionEncoderLayer { method new (line 257) | fn new(var: nn::VarBuilder, config: &EncoderConfig) -> Result { method forward (line 279) | fn forward(&self, xs: &Tensor, causal_attention_mask: Option<&Tensor>)... type ChineseClipVisionEncoder (line 293) | pub struct ChineseClipVisionEncoder { method new (line 298) | pub fn new(var: nn::VarBuilder, config: &EncoderConfig) -> Result { method forward (line 308) | pub fn forward(&self, xs: &Tensor, causal_attention_mask: Option<&Tens... method output_hidden_states (line 317) | pub fn output_hidden_states( type ChineseClipVisionTransformer (line 333) | pub struct ChineseClipVisionTransformer { method new (line 341) | pub fn new(var: nn::VarBuilder, config: &ChineseClipVisionConfig) -> R... method output_hidden_states (line 360) | pub fn output_hidden_states(&self, pixel_values: &Tensor) -> Result Result { FILE: candle-transformers/src/models/clip/mod.rs type ClipModel (line 21) | pub struct ClipModel { method new (line 96) | pub fn new(vs: candle_nn::VarBuilder, c: &ClipConfig) -> Result { method get_text_features (line 124) | pub fn get_text_features(&self, input_ids: &Tensor) -> Result { method get_image_features (line 130) | pub fn get_image_features(&self, pixel_values: &Tensor) -> Result Re... type EncoderConfig (line 30) | pub enum EncoderConfig { method embed_dim (line 36) | pub fn embed_dim(&self) -> usize { method num_attention_heads (line 43) | pub fn num_attention_heads(&self) -> usize { method intermediate_size (line 50) | pub fn intermediate_size(&self) -> usize { method num_hidden_layers (line 57) | pub fn num_hidden_layers(&self) -> usize { method activation (line 64) | pub fn activation(&self) -> Activation { type ClipConfig (line 73) | pub struct ClipConfig { method vit_base_patch32 (line 82) | pub fn vit_base_patch32() -> Self { function div_l2_norm (line 149) | pub fn div_l2_norm(v: &Tensor) -> Result { FILE: candle-transformers/src/models/clip/text_model.rs type Activation (line 16) | pub enum Activation { method forward (line 21) | fn forward(&self, xs: &Tensor) -> Result { type ClipTextConfig (line 29) | pub struct ClipTextConfig { method vit_base_patch32 (line 45) | pub fn vit_base_patch32() -> Self { type ClipTextEmbeddings (line 63) | struct ClipTextEmbeddings { method new (line 70) | fn new(vs: candle_nn::VarBuilder, c: &ClipTextConfig) -> Result { method forward (line 89) | fn forward(&self, input_ids: &Tensor) -> Result { type ClipAttention (line 99) | struct ClipAttention { method new (line 110) | fn new(vs: candle_nn::VarBuilder, c: &EncoderConfig) -> Result { method shape (line 131) | fn shape(&self, xs: &Tensor, seq_len: usize, bsz: usize) -> Result)... type ClipMlp (line 180) | struct ClipMlp { method new (line 187) | fn new(vs: candle_nn::VarBuilder, c: &EncoderConfig) -> Result { method forward (line 200) | fn forward(&self, xs: &Tensor) -> Result { type ClipEncoderLayer (line 207) | struct ClipEncoderLayer { method new (line 215) | fn new(vs: candle_nn::VarBuilder, c: &EncoderConfig) -> Result { method forward (line 229) | fn forward(&self, xs: &Tensor, causal_attention_mask: Option<&Tensor>)... type ClipEncoder (line 243) | pub struct ClipEncoder { method new (line 248) | pub fn new(vs: candle_nn::VarBuilder, c: &EncoderConfig) -> Result Result Result { FILE: candle-transformers/src/models/clip/vision_model.rs type ClipVisionConfig (line 20) | pub struct ClipVisionConfig { method vit_base_patch32 (line 36) | pub fn vit_base_patch32() -> Self { method clip_vit_large_patch14_336 (line 49) | pub fn clip_vit_large_patch14_336() -> Self { type ClipVisionEmbeddings (line 66) | struct ClipVisionEmbeddings { method new (line 74) | fn new(vs: candle_nn::VarBuilder, c: &ClipVisionConfig) -> Result { method forward (line 109) | fn forward(&self, pixel_values: &Tensor) -> Result { type ClipVisionTransformer (line 126) | pub struct ClipVisionTransformer { method new (line 134) | pub fn new(vs: candle_nn::VarBuilder, c: &ClipVisionConfig) -> Result<... method output_hidden_states (line 147) | pub fn output_hidden_states(&self, pixel_values: &Tensor) -> Result Result { FILE: candle-transformers/src/models/codegeex4_9b.rs function default_one (line 13) | fn default_one() -> usize { type Config (line 18) | pub struct Config { method codegeex4 (line 43) | pub fn codegeex4() -> Self { type RotaryEmbedding (line 70) | struct RotaryEmbedding { method new (line 75) | fn new(cfg: &Config, dtype: DType, dev: &Device) -> Result { method apply (line 94) | fn apply(&self, xs: &Tensor, seqlen_offset: usize) -> Result { type CoreAttention (line 122) | struct CoreAttention { method new (line 136) | fn new(layer_number: usize, cfg: &Config, dtype: DType) -> Result { method forward (line 151) | fn forward( function masked_fill (line 128) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32, dtype: DT... type SelfAttention (line 208) | struct SelfAttention { method new (line 220) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method forward (line 384) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 392) | struct Block { method new (line 401) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method reset_kv_cache (line 514) | fn reset_kv_cache(&mut self) { method forward (line 520) | fn forward(&mut self, xs: &Tensor, attention_mask: &Option) ->... type Embedding (line 533) | struct Embedding { method new (line 539) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 553) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 564) | pub struct Model { method new (line 578) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 596) | pub fn reset_kv_cache(&mut self) { method forward (line 600) | pub fn forward(&mut self, xs: &Tensor) -> Result { function get_mask (line 570) | fn get_mask(size: usize, device: &Device) -> Result { FILE: candle-transformers/src/models/colpali.rs type Model (line 12) | pub struct Model { method new (line 18) | pub fn new(config: &paligemma::Config, vb: VarBuilder) -> Result { method forward_images (line 32) | pub fn forward_images(&mut self, pixel_values: &Tensor, input_ids: &Te... method forward_text (line 41) | pub fn forward_text(&mut self, input_ids: &Tensor) -> Result { FILE: candle-transformers/src/models/convmixer.rs function conv2d_same (line 12) | fn conv2d_same( function block (line 39) | fn block(dim: usize, kernel_size: usize, vb: VarBuilder) -> Result Result Result Self { method femto (line 35) | pub fn femto() -> Self { method pico (line 43) | pub fn pico() -> Self { method nano (line 51) | pub fn nano() -> Self { method tiny (line 59) | pub fn tiny() -> Self { method small (line 67) | pub fn small() -> Self { method base (line 75) | pub fn base() -> Self { method large (line 83) | pub fn large() -> Self { method xlarge (line 91) | pub fn xlarge() -> Self { method huge (line 99) | pub fn huge() -> Self { function layer_norm_cl (line 109) | fn layer_norm_cl(dim: usize, vb: VarBuilder) -> Result> { function layer_norm_cf (line 116) | fn layer_norm_cf(dim: usize, vb: VarBuilder) -> Result> { function convnext2_grn (line 130) | fn convnext2_grn(dim: usize, channels_last: bool, vb: VarBuilder) -> Res... function convnext_stem (line 160) | fn convnext_stem(out_channels: usize, vb: VarBuilder) -> Result Result Result> { function convnext_conv_mlp (line 200) | fn convnext_conv_mlp(dim: usize, vb: VarBuilder) -> Result> { function convnext_block (line 219) | fn convnext_block(dim: usize, use_conv_mlp: bool, vb: VarBuilder) -> Res... function convnext_stage (line 263) | fn convnext_stage(cfg: &Config, stage_idx: usize, vb: VarBuilder) -> Res... function convnext_head (line 291) | fn convnext_head(outputs: usize, nclasses: usize, vb: VarBuilder) -> Res... function convnext_model (line 298) | fn convnext_model( function convnext (line 334) | pub fn convnext(cfg: &Config, nclasses: usize, vb: VarBuilder) -> Result... function convnext_no_final_layer (line 338) | pub fn convnext_no_final_layer(cfg: &Config, vb: VarBuilder) -> Result Self { type RotaryEmbedding (line 78) | struct RotaryEmbedding { method new (line 92) | fn new(dtype: DType, cfg: &LlamaConfig, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 131) | fn apply_rotary_emb_qkv( function calculate_default_inv_freq (line 83) | fn calculate_default_inv_freq(cfg: &LlamaConfig) -> Vec { function rms_norm (line 145) | fn rms_norm(hidden_size: usize, eps: f64, vb: VarBuilder) -> Result, vb: VarBui... method forward (line 187) | fn forward( method clear_kv_cache (line 246) | fn clear_kv_cache(&mut self) { type Mlp (line 252) | struct Mlp { method new (line 259) | fn new(cfg: &LlamaConfig, vb: VarBuilder) -> Result { method forward (line 268) | fn forward(&self, xs: &Tensor) -> Result { type Layer (line 276) | struct Layer { method new (line 284) | fn new(cfg: &LlamaConfig, rotary_emb: Arc, vb: VarBui... method forward (line 297) | fn forward( method clear_kv_cache (line 312) | fn clear_kv_cache(&mut self) { type LlamaModel (line 318) | pub struct LlamaModel { method new (line 326) | pub fn new(cfg: &LlamaConfig, vb: VarBuilder) -> Result { method clear_kv_cache (line 343) | pub fn clear_kv_cache(&mut self) { method prepare_decoder_attention_mask (line 349) | fn prepare_decoder_attention_mask( method forward (line 368) | pub fn forward(&mut self, xs: &Tensor, seqlen_offset: usize) -> Result... type Model (line 386) | pub struct Model { method new (line 398) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 439) | pub fn clear_kv_cache(&mut self) { method generate_frame (line 444) | pub fn generate_frame( method audio_tokens_and_mask (line 502) | pub fn audio_tokens_and_mask(&self, mut frame: Vec) -> Result<(Te... method text_tokens_and_mask (line 514) | pub fn text_tokens_and_mask(&self, ids: &[u32]) -> Result<(Tensor, Ten... FILE: candle-transformers/src/models/dac.rs type Config (line 12) | pub struct Config { type Snake1d (line 22) | pub struct Snake1d { method new (line 27) | pub fn new(channels: usize, vb: VarBuilder) -> Result { method forward (line 34) | fn forward(&self, xs: &Tensor) -> Result { type ResidualUnit (line 44) | pub struct ResidualUnit { method new (line 52) | pub fn new(dim: usize, dilation: usize, vb: VarBuilder) -> Result { method forward (line 74) | fn forward(&self, xs: &Tensor) -> Result { type EncoderBlock (line 90) | pub struct EncoderBlock { method new (line 99) | pub fn new(dim: usize, stride: usize, vb: VarBuilder) -> Result { method forward (line 122) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 132) | pub struct Encoder { method forward (line 140) | fn forward(&self, xs: &Tensor) -> Result { method new (line 150) | pub fn new( type DecoderBlock (line 185) | pub struct DecoderBlock { method new (line 194) | pub fn new(in_dim: usize, out_dim: usize, stride: usize, vb: VarBuilde... method forward (line 224) | fn forward(&self, xs: &Tensor) -> Result { type Decoder (line 234) | pub struct Decoder { method new (line 242) | pub fn new( method forward (line 273) | fn forward(&self, xs: &Tensor) -> Result { type VectorQuantizer (line 284) | pub struct VectorQuantizer { method new (line 291) | pub fn new(in_dim: usize, cb_size: usize, cb_dim: usize, vb: VarBuilde... method embed_code (line 304) | pub fn embed_code(&self, embed_id: &Tensor) -> Result { method decode_code (line 308) | pub fn decode_code(&self, embed_id: &Tensor) -> Result { type ResidualVectorQuantizer (line 314) | pub struct ResidualVectorQuantizer { method new (line 319) | pub fn new( method from_codes (line 334) | pub fn from_codes(&self, codes: &Tensor) -> Result { type Model (line 353) | pub struct Model { method new (line 360) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method decode_codes (line 377) | pub fn decode_codes(&self, audio_codes: &Tensor) -> Result { FILE: candle-transformers/src/models/debertav2.rs constant DTYPE (line 9) | pub const DTYPE: DType = DType::F32; type HiddenAct (line 14) | pub enum HiddenAct { type HiddenActLayer (line 20) | pub struct HiddenActLayer { method new (line 26) | fn new(act: HiddenAct) -> Self { method forward (line 31) | fn forward(&self, xs: &Tensor) -> Result { type Id2Label (line 42) | pub type Id2Label = HashMap; type Label2Id (line 43) | pub type Label2Id = HashMap; type Config (line 46) | pub struct Config { function deserialize_pos_att_type (line 81) | fn deserialize_pos_att_type<'de, D>(deserializer: D) -> std::result::Res... type StableDropout (line 100) | pub struct StableDropout { method new (line 106) | pub fn new(drop_prob: f64) -> Self { method forward (line 113) | pub fn forward(&self, x: &Tensor) -> Result { type DebertaV2Embeddings (line 119) | pub struct DebertaV2Embeddings { method load (line 133) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 197) | pub fn forward( type XSoftmax (line 282) | struct XSoftmax {} method apply (line 285) | pub fn apply(input: &Tensor, mask: &Tensor, dim: D, device: &Device) -... type DebertaV2DisentangledSelfAttention (line 306) | pub struct DebertaV2DisentangledSelfAttention { method load (line 325) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 412) | pub fn forward( method transpose_for_scores (line 522) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method disentangled_attention_bias (line 540) | fn disentangled_attention_bias( type DebertaV2Attention (line 700) | pub struct DebertaV2Attention { method load (line 706) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 712) | fn forward( type DebertaV2SelfOutput (line 734) | pub struct DebertaV2SelfOutput { method load (line 741) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 756) | pub fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -... type DebertaV2Intermediate (line 765) | pub struct DebertaV2Intermediate { method load (line 771) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 784) | pub fn forward(&self, hidden_states: &Tensor) -> Result { type DebertaV2Output (line 791) | pub struct DebertaV2Output { method load (line 798) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 817) | pub fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -... type DebertaV2Layer (line 829) | pub struct DebertaV2Layer { method load (line 836) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 847) | fn forward( type ConvLayer (line 875) | pub struct ConvLayer { method load (line 884) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 921) | pub fn forward( type DebertaV2Encoder (line 932) | pub struct DebertaV2Encoder { method load (line 945) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 1011) | pub fn forward( method get_attention_mask (line 1064) | fn get_attention_mask(&self, mut attention_mask: Tensor) -> Result Result> { type DebertaV2Model (line 1136) | pub struct DebertaV2Model { method load (line 1144) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 1158) | pub fn forward( type NERItem (line 1197) | pub struct NERItem { type TextClassificationItem (line 1207) | pub struct TextClassificationItem { type DebertaV2NERModel (line 1212) | pub struct DebertaV2NERModel { method load (line 1236) | pub fn load(vb: VarBuilder, config: &Config, id2label: Option>)... type DebertaV2SeqClassificationModel (line 1269) | pub struct DebertaV2SeqClassificationModel { method load (line 1278) | pub fn load(vb: VarBuilder, config: &Config, id2label: Option Result { method forward (line 1345) | pub fn forward(&self, hidden_states: &Tensor) -> Result { method output_dim (line 1358) | pub fn output_dim(&self) -> Result { function build_relative_position (line 1364) | pub(crate) fn build_relative_position( function make_log_bucket_position (line 1387) | pub(crate) fn make_log_bucket_position( FILE: candle-transformers/src/models/deepseek2.rs type NonZero (line 13) | struct NonZero {} method nonzero (line 17) | fn nonzero(&self, vs: &[T], layout: &Layout) -> Vec { method name (line 37) | fn name(&self) -> &'static str { method cpu_fwd (line 41) | fn cpu_fwd(&self, storage: &CpuStorage, layout: &Layout) -> Result<(CpuS... type NonZeroOp (line 84) | pub trait NonZeroOp { method nonzero (line 85) | fn nonzero(&self) -> Result; method nonzero (line 89) | fn nonzero(&self) -> Result { type TopKOutput (line 100) | pub struct TopKOutput { type TopKLastDimOp (line 105) | pub trait TopKLastDimOp { method topk (line 109) | fn topk(&self, topk: usize) -> Result; method topk_unsorted (line 114) | fn topk_unsorted(&self, topk: usize) -> Result; method topk (line 118) | fn topk(&self, topk: usize) -> Result { method topk_unsorted (line 128) | fn topk_unsorted(&self, topk: usize) -> Result { type SplitOp (line 147) | pub trait SplitOp { method split (line 148) | fn split(&self, splits: &[usize], dim: D) -> Result>; method split (line 152) | fn split(&self, splits: &[usize], dim: D) -> Result Result>; method bincount (line 204) | fn bincount(&self, minlength: u32) -> Result> { function bincount (line 168) | fn bincount(values: &[u32], minlength: u32) -> Vec { function masked_fill (line 211) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type TopkMethod (line 238) | enum TopkMethod { type ScoringFunc (line 246) | enum ScoringFunc { type DeepSeekV2Config (line 252) | pub struct DeepSeekV2Config { method q_head_dim (line 502) | pub(crate) fn q_head_dim(&self) -> usize { method softmax_scale (line 506) | fn softmax_scale(&self) -> f32 { type ScaledRopeType (line 295) | pub enum ScaledRopeType { type DeepSeekV2RotaryEmbedding (line 308) | pub struct DeepSeekV2RotaryEmbedding { method new_unscaled (line 341) | fn new_unscaled(cfg: &DeepSeekV2RopeConfig, dtype: DType, dev: &Device... method yarn_find_correction_dim (line 362) | fn yarn_find_correction_dim( method yarn_find_correction_range (line 372) | fn yarn_find_correction_range( method yarn_linear_ramp_mask (line 386) | fn yarn_linear_ramp_mask(min: f32, mut max: f32, dim: usize, dev: &Dev... method yarn_get_mscale (line 396) | pub(crate) fn yarn_get_mscale(scale: f32, mscale: f32) -> f32 { method new_yarn (line 404) | fn new_yarn( method new (line 454) | pub fn new(cfg: &DeepSeekV2RopeConfig, dtype: DType, dev: &Device) -> ... method forward (line 483) | pub fn forward( type DeepSeekV2RopeScaling (line 315) | pub enum DeepSeekV2RopeScaling { type DeepSeekV2RopeConfig (line 333) | pub struct DeepSeekV2RopeConfig { type QProj (line 521) | enum QProj { method forward (line 527) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 535) | struct Attention { method new (line 549) | fn new( method forward (line 612) | fn forward( method clear_kv_cache (line 696) | fn clear_kv_cache(&mut self) { type Mlp (line 701) | struct Mlp { method new (line 709) | fn new( method forward (line 726) | fn forward(&self, xs: &Tensor) -> Result { type MoeGate (line 733) | struct MoeGate { method new (line 741) | fn new(cfg: &DeepSeekV2Config, vb: VarBuilder, n_routed_experts: usize... method forward (line 752) | fn forward(&self, xs: &Tensor) -> Result<(Tensor, Tensor)> { type Moe (line 809) | struct Moe { method new (line 816) | fn new( method moe_infer (line 847) | fn moe_infer(&self, xs: &Tensor, topk_ids: &Tensor, topk_weight: &Tens... method forward (line 877) | fn forward(&self, xs: &Tensor) -> Result { type MoeOrMlp (line 893) | enum MoeOrMlp { method forward (line 899) | fn forward(&self, xs: &Tensor) -> Result { type DecoderLayer (line 907) | struct DecoderLayer { method new (line 915) | fn new( method forward (line 951) | fn forward( method clear_kv_cache (line 968) | fn clear_kv_cache(&mut self) { type DeepSeekV2 (line 973) | pub struct DeepSeekV2 { method new (line 983) | pub fn new(cfg: &DeepSeekV2Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 1023) | fn prepare_decoder_attention_mask( method forward (line 1043) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 1068) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/depth_anything_v2.rs type DepthAnythingV2Config (line 19) | pub struct DepthAnythingV2Config { method new (line 32) | pub fn new( method vit_small (line 54) | pub fn vit_small() -> Self { method vit_base (line 67) | pub fn vit_base() -> Self { method vit_large (line 80) | pub fn vit_large() -> Self { method vit_giant (line 93) | pub fn vit_giant() -> Self { type ResidualConvUnit (line 107) | pub struct ResidualConvUnit { method new (line 116) | pub fn new( method forward (line 171) | fn forward(&self, xs: &Tensor) -> Result { type FeatureFusionBlock (line 192) | pub struct FeatureFusionBlock { method new (line 200) | pub fn new( method forward (line 234) | fn forward(&self, xs: &Tensor) -> Result { type Scratch (line 242) | pub struct Scratch { method new (line 256) | pub fn new(conf: &DepthAnythingV2Config, vb: VarBuilder) -> Result Result Result { type DepthAnythingV2 (line 535) | pub struct DepthAnythingV2 { method new (line 542) | pub fn new( method forward (line 558) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/dinov2.rs constant IMG_SIZE (line 43) | const IMG_SIZE: usize = 518; constant PATCH_SIZE (line 44) | const PATCH_SIZE: usize = 14; constant NUM_CLASSES (line 45) | const NUM_CLASSES: usize = 1000; function linear (line 47) | fn linear(vb: VarBuilder, in_dim: usize, out_dim: usize, bias: bool) -> ... type Attention (line 56) | struct Attention { method new (line 64) | fn new( method forward (line 84) | fn forward(&self, xs: &Tensor) -> Result { type LayerScale (line 103) | struct LayerScale { method new (line 108) | fn new(vb: VarBuilder, dim: usize) -> Result { method forward (line 115) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 121) | struct Mlp { method new (line 127) | fn new(vb: VarBuilder, in_features: usize, hidden_features: usize, bia... method forward (line 136) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 143) | struct Block { method new (line 153) | fn new(vb: VarBuilder, dim: usize, num_heads: usize) -> Result { method forward (line 172) | fn forward(&self, xs: &Tensor) -> Result { type PatchEmbed (line 187) | struct PatchEmbed { method new (line 194) | fn new( method forward (line 216) | fn forward(&self, xs: &Tensor) -> Result { type DinoVisionTransformer (line 233) | pub struct DinoVisionTransformer { method new (line 243) | pub fn new(vb: VarBuilder, depth: usize, embed_dim: usize, num_heads: ... method interpolate_pos_encoding (line 268) | fn interpolate_pos_encoding(&self, xs: &Tensor, w: usize, h: usize) ->... method prepare_tokens_with_mask (line 294) | fn prepare_tokens_with_mask(&self, xs: &Tensor) -> Result { method get_intermediate_layers_not_chunked (line 301) | fn get_intermediate_layers_not_chunked( method get_intermediate_layers (line 324) | pub fn get_intermediate_layers( method forward (line 381) | fn forward(&self, xs: &Tensor) -> Result { function vit_small (line 394) | pub fn vit_small(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/dinov2reg4.rs constant IMG_SIZE (line 36) | const IMG_SIZE: usize = 518; constant PATCH_SIZE (line 37) | const PATCH_SIZE: usize = 14; constant NUM_CLASSES (line 38) | const NUM_CLASSES: usize = 7806; function linear (line 40) | fn linear(vb: VarBuilder, in_dim: usize, out_dim: usize, bias: bool) -> ... type Attention (line 49) | struct Attention { method new (line 57) | fn new( method forward (line 77) | fn forward(&self, xs: &Tensor) -> Result { type LayerScale (line 96) | struct LayerScale { method new (line 101) | fn new(vb: VarBuilder, dim: usize) -> Result { method forward (line 108) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 114) | struct Mlp { method new (line 120) | fn new(vb: VarBuilder, in_features: usize, hidden_features: usize, bia... method forward (line 129) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 136) | struct Block { method new (line 146) | fn new(vb: VarBuilder, dim: usize, num_heads: usize) -> Result { method forward (line 165) | fn forward(&self, xs: &Tensor) -> Result { type PatchEmbed (line 180) | struct PatchEmbed { method new (line 187) | fn new( method forward (line 209) | fn forward(&self, xs: &Tensor) -> Result { type DinoVisionTransformer (line 226) | pub struct DinoVisionTransformer { method new (line 237) | pub fn new(vb: VarBuilder, depth: usize, embed_dim: usize, num_heads: ... method interpolate_pos_encoding (line 260) | fn interpolate_pos_encoding(&self, xs: &Tensor, w: usize, h: usize) ->... method prepare_tokens_with_mask (line 283) | fn prepare_tokens_with_mask(&self, xs: &Tensor) -> Result { method forward (line 296) | fn forward(&self, xs: &Tensor) -> Result { function vit_small (line 307) | pub fn vit_small(vb: VarBuilder) -> Result { function vit_base (line 311) | pub fn vit_base(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/distilbert.rs constant DTYPE (line 11) | pub const DTYPE: DType = DType::F32; function masked_fill (line 13) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type HiddenAct (line 22) | pub enum HiddenAct { type HiddenActLayer (line 27) | struct HiddenActLayer { method new (line 33) | fn new(act: HiddenAct) -> Self { method forward (line 40) | fn forward(&self, xs: &Tensor) -> candle::Result { type PositionEmbeddingType (line 52) | pub enum PositionEmbeddingType { type Config (line 58) | pub struct Config { method default (line 76) | fn default() -> Self { type Embeddings (line 94) | struct Embeddings { method load (line 102) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 119) | fn forward(&self, input_ids: &Tensor) -> Result { type MultiHeadSelfAttention (line 133) | struct MultiHeadSelfAttention { method load (line 144) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 165) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type FFN (line 203) | struct FFN { method load (line 211) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 224) | fn forward(&self, hidden_states: &Tensor) -> Result { type TransformerBlock (line 233) | struct TransformerBlock { method load (line 242) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 258) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type Transformer (line 275) | struct Transformer { method load (line 281) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 291) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... type DistilBertModel (line 302) | pub struct DistilBertModel { method load (line 310) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 339) | pub fn forward(&self, input_ids: &Tensor, attention_mask: &Tensor) -> ... type DistilBertPredictionHeadTransform (line 349) | struct DistilBertPredictionHeadTransform { method load (line 356) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 369) | fn forward(&self, hidden_states: &Tensor) -> Result { type DistilBertLMPredictionHead (line 378) | pub struct DistilBertLMPredictionHead { method load (line 384) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 411) | fn forward(&self, hidden_states: &Tensor) -> Result { type DistilBertOnlyMLMHead (line 418) | pub struct DistilBertOnlyMLMHead { method load (line 423) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 430) | fn forward(&self, sequence_output: &Tensor) -> Result { type DistilBertForMaskedLM (line 435) | pub struct DistilBertForMaskedLM { method load (line 441) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 447) | pub fn forward(&self, input_ids: &Tensor, attention_mask: &Tensor) -> ... FILE: candle-transformers/src/models/efficientnet.rs type MBConvConfig (line 13) | pub struct MBConvConfig { method b0 (line 61) | pub fn b0() -> Vec { method b1 (line 64) | pub fn b1() -> Vec { method b2 (line 67) | pub fn b2() -> Vec { method b3 (line 70) | pub fn b3() -> Vec { method b4 (line 73) | pub fn b4() -> Vec { method b5 (line 76) | pub fn b5() -> Vec { method b6 (line 79) | pub fn b6() -> Vec { method b7 (line 82) | pub fn b7() -> Vec { function make_divisible (line 22) | fn make_divisible(v: f64, divisor: usize) -> usize { function bneck_confs (line 35) | fn bneck_confs(width_mult: f64, depth_mult: f64) -> Vec { type Conv2DSame (line 89) | struct Conv2DSame { method new (line 96) | fn new( method forward (line 124) | fn forward(&self, xs: &Tensor) -> Result { type ConvNormActivation (line 143) | struct ConvNormActivation { method new (line 150) | fn new( method no_activation (line 167) | fn no_activation(self) -> Self { method forward (line 176) | fn forward(&self, xs: &Tensor) -> Result { type SqueezeExcitation (line 187) | struct SqueezeExcitation { method new (line 193) | fn new(vb: VarBuilder, in_channels: usize, squeeze_channels: usize) ->... method forward (line 201) | fn forward(&self, xs: &Tensor) -> Result { type MBConv (line 214) | struct MBConv { method new (line 223) | fn new(vb: VarBuilder, c: MBConvConfig) -> Result { method forward (line 258) | fn forward(&self, xs: &Tensor) -> Result { function swish (line 276) | fn swish(s: &Tensor) -> Result { type EfficientNet (line 281) | pub struct EfficientNet { method new (line 289) | pub fn new(p: VarBuilder, configs: Vec, nclasses: usize)... method forward (line 325) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/efficientvit.rs type Config (line 45) | pub struct Config { method m0 (line 53) | pub fn m0() -> Self { method m1 (line 61) | pub fn m1() -> Self { method m2 (line 69) | pub fn m2() -> Self { method m3 (line 77) | pub fn m3() -> Self { method m4 (line 85) | pub fn m4() -> Self { method m5 (line 94) | pub fn m5() -> Self { function efficientvit_stemblock (line 104) | fn efficientvit_stemblock( function efficientvit_stem (line 124) | fn efficientvit_stem(dim: usize, vb: VarBuilder) -> Result> { function depthwise_conv (line 144) | fn depthwise_conv( function pointwise_conv (line 164) | fn pointwise_conv( function conv_mlp (line 179) | fn conv_mlp(in_channels: usize, out_channels: usize, vb: VarBuilder) -> ... constant RESOLUTIONS (line 190) | const RESOLUTIONS: [usize; 3] = [14, 7, 4]; function efficientvit_attn (line 193) | fn efficientvit_attn( function cascaded_group_attn (line 240) | fn cascaded_group_attn( function squeeze_and_excitation (line 310) | fn squeeze_and_excitation( function patchmerge (line 331) | fn patchmerge(in_channels: usize, out_channels: usize, vb: VarBuilder) -... function res (line 351) | fn res(dim: usize, vb: VarBuilder) -> Result> { function efficientvit_downsample (line 363) | fn efficientvit_downsample( function efficientvit_block (line 377) | fn efficientvit_block( function efficientvit_stage (line 400) | fn efficientvit_stage(cfg: &Config, stage: usize, vb: VarBuilder) -> Res... function efficientvit_head (line 438) | fn efficientvit_head(outputs: usize, nclasses: usize, vb: VarBuilder) ->... function efficientvit_model (line 447) | fn efficientvit_model( function efficientvit (line 484) | pub fn efficientvit(cfg: &Config, nclasses: usize, vb: VarBuilder) -> Re... function efficientvit_no_final_layer (line 488) | pub fn efficientvit_no_final_layer(cfg: &Config, vb: VarBuilder) -> Resu... FILE: candle-transformers/src/models/encodec.rs type NormType (line 14) | pub enum NormType { type PadMode (line 21) | pub enum PadMode { type Config (line 28) | pub struct Config { method codebook_dim (line 86) | fn codebook_dim(&self) -> usize { method frame_rate (line 90) | fn frame_rate(&self) -> usize { method num_quantizers (line 95) | fn num_quantizers(&self) -> usize { method default (line 55) | fn default() -> Self { function get_extra_padding_for_conv1d (line 105) | fn get_extra_padding_for_conv1d( function pad1d (line 118) | fn pad1d(xs: &Tensor, pad_l: usize, pad_r: usize, mode: PadMode) -> Resu... function conv1d_weight_norm (line 129) | pub fn conv1d_weight_norm( function conv1d_weight_norm_no_bias (line 144) | pub fn conv1d_weight_norm_no_bias( function conv_transpose1d_weight_norm (line 158) | pub fn conv_transpose1d_weight_norm( type CodebookEncode (line 178) | struct CodebookEncode; method name (line 181) | fn name(&self) -> &'static str { method cpu_fwd (line 185) | fn cpu_fwd( type EuclideanCodebook (line 244) | pub struct EuclideanCodebook { method new (line 253) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encode_slow (line 269) | pub fn encode_slow(&self, xs: &Tensor) -> Result { method encode (line 279) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 288) | pub fn decode(&self, embed_ind: &Tensor) -> Result { type VectorQuantization (line 295) | pub struct VectorQuantization { method new (line 300) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encode (line 305) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 310) | pub fn decode(&self, embed_ind: &Tensor) -> Result { type ResidualVectorQuantizer (line 318) | pub struct ResidualVectorQuantizer { method new (line 324) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encode (line 335) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 347) | pub fn decode(&self, codes: &Tensor) -> Result { type EncodecLSTM (line 367) | pub struct EncodecLSTM { method new (line 372) | pub fn new(dim: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 388) | fn forward(&self, xs: &Tensor) -> Result { type EncodecConvTranspose1d (line 404) | pub struct EncodecConvTranspose1d { method new (line 409) | fn new( method forward (line 427) | fn forward(&self, xs: &Tensor) -> Result { type EncodecConv1d (line 433) | pub struct EncodecConv1d { method new (line 441) | pub fn new( method forward (line 493) | fn forward(&self, xs: &Tensor) -> Result { type EncodecResnetBlock (line 523) | pub struct EncodecResnetBlock { method new (line 530) | pub fn new( method forward (line 566) | fn forward(&self, xs: &Tensor) -> Result { type Layer (line 580) | struct Layer<'a> { function new (line 586) | fn new(vb: VarBuilder<'a>) -> Self { function inc (line 590) | fn inc(&mut self) { function next (line 594) | fn next(&mut self) -> VarBuilder<'_> { type Encoder (line 602) | pub struct Encoder { method new (line 610) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 669) | fn forward(&self, xs: &Tensor) -> Result { type Decoder (line 684) | pub struct Decoder { method new (line 692) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 750) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 763) | pub struct Model { method new (line 770) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encode (line 781) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 787) | pub fn decode(&self, codes: &Tensor) -> Result { FILE: candle-transformers/src/models/eva2.rs constant IMG_SIZE (line 32) | const IMG_SIZE: usize = 448; constant PATCH_SIZE (line 33) | const PATCH_SIZE: usize = 14; constant NUM_CLASSES (line 34) | const NUM_CLASSES: usize = 1000; function linear (line 36) | fn linear(vb: VarBuilder, in_dim: usize, out_dim: usize, bias: bool) -> ... type Attention (line 45) | struct Attention { method new (line 56) | fn new( method apply_rot_embed_cat (line 84) | fn apply_rot_embed_cat(x: &Tensor, emb: &Tensor) -> Result { method forward (line 109) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 152) | struct Mlp { method new (line 160) | fn new(vb: VarBuilder, in_features: usize, hidden_features: usize, bia... method forward (line 176) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 185) | struct Block { method new (line 193) | fn new(vb: VarBuilder, dim: usize, num_heads: usize, rot_pos_embed: &T... method forward (line 209) | fn forward(&self, xs: &Tensor) -> Result { type PatchEmbed (line 220) | struct PatchEmbed { method new (line 227) | fn new( method forward (line 249) | fn forward(&self, xs: &Tensor) -> Result { type EVA2VisionTransformer (line 266) | pub struct EVA2VisionTransformer { method new (line 276) | pub fn new(vb: VarBuilder, depth: usize, embed_dim: usize, num_heads: ... method interpolate_pos_encoding (line 298) | fn interpolate_pos_encoding( method prepare_tokens_with_mask (line 331) | fn prepare_tokens_with_mask(&self, xs: &Tensor) -> Result { method get_intermediate_layers_not_chunked (line 342) | fn get_intermediate_layers_not_chunked( method get_intermediate_layers (line 365) | pub fn get_intermediate_layers( method forward (line 422) | fn forward(&self, xs: &Tensor) -> Result { function vit_base (line 433) | pub fn vit_base(vb: VarBuilder) -> Result { function vit_large (line 437) | pub fn vit_large(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/falcon.rs constant MAX_SEQ_LEN (line 11) | const MAX_SEQ_LEN: usize = 5000; function layer_norm (line 13) | fn layer_norm(size: usize, eps: f64, vb: VarBuilder) -> Result { type Config (line 29) | pub struct Config { method validate (line 74) | pub fn validate(&self) -> Result<()> { method falcon7b (line 88) | pub fn falcon7b() -> Self { method head_dim (line 112) | fn head_dim(&self) -> usize { method rotary (line 116) | fn rotary(&self) -> bool { method default (line 50) | fn default() -> Self { function rotate_half (line 121) | fn rotate_half(x: &Tensor) -> Result { type FalconRotaryEmbedding (line 130) | struct FalconRotaryEmbedding { method load (line 136) | fn load(device: &Device, cfg: &Config) -> Result { method cos_sin (line 148) | fn cos_sin( method forward (line 170) | fn forward( function masked_fill (line 186) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type FalconAttention (line 196) | struct FalconAttention { method load (line 210) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method split_heads (line 240) | fn split_heads(&self, fused_qkv: &Tensor) -> Result<(Tensor, Tensor, T... method forward (line 259) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, past_kv_len: ... method clear_kv_cache (line 325) | fn clear_kv_cache(&mut self) { type FalconMlp (line 331) | struct FalconMlp { method load (line 337) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 348) | fn forward(&self, x: &Tensor) -> Result { type FalconDecoderLayer (line 356) | struct FalconDecoderLayer { method load (line 365) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 392) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, past_kv_len: ... method clear_kv_cache (line 416) | pub fn clear_kv_cache(&mut self) { type Falcon (line 422) | pub struct Falcon { method config (line 446) | pub fn config(&self) -> &Config { method load (line 450) | pub fn load(vb: VarBuilder, cfg: Config) -> Result { method forward (line 474) | pub fn forward(&mut self, input_ids: &Tensor) -> Result { method clear_kv_cache (line 495) | pub fn clear_kv_cache(&mut self) { function make_causal_mask (line 430) | fn make_causal_mask(t: usize) -> Result { function prepare_attn_mask (line 438) | fn prepare_attn_mask(b_sz: usize, seq_len: usize) -> Result { FILE: candle-transformers/src/models/fastvit.rs type Config (line 15) | pub struct Config { method t8 (line 24) | pub fn t8() -> Self { method t12 (line 34) | pub fn t12() -> Self { method s12 (line 43) | pub fn s12() -> Self { method sa12 (line 52) | pub fn sa12() -> Self { method sa24 (line 61) | pub fn sa24() -> Self { method sa36 (line 70) | pub fn sa36() -> Self { method ma36 (line 79) | pub fn ma36() -> Self { method mci0 (line 90) | pub fn mci0() -> Self { method mci1 (line 99) | pub fn mci1() -> Self { method mci2 (line 108) | pub fn mci2() -> Self { function conv_norm (line 119) | fn conv_norm( function conv_mlp (line 142) | fn conv_mlp(dim: usize, exp_ratio: usize, vb: VarBuilder) -> Result Result<(Tensor, Tens... function mobileone_block (line 191) | fn mobileone_block( function repmixer (line 295) | fn repmixer(dim: usize, kernel: usize, vb: VarBuilder) -> Result Resul... function positional_encoding (line 323) | fn positional_encoding(dim: usize, vb: VarBuilder) -> Result Result> { function attention_block (line 374) | fn attention_block(dim: usize, exp_ratio: usize, vb: VarBuilder) -> Resu... function fastvit_stage (line 398) | fn fastvit_stage(cfg: &Config, idx: usize, vb: VarBuilder) -> Result, vb: VarBuilder) ... function fastvit (line 505) | pub fn fastvit(cfg: &Config, nclasses: usize, vb: VarBuilder) -> Result<... function fastvit_no_final_layer (line 509) | pub fn fastvit_no_final_layer(cfg: &Config, vb: VarBuilder) -> Result Self { method schnell (line 35) | pub fn schnell() -> Self { function scaled_dot_product_attention (line 50) | fn scaled_dot_product_attention(q: &Tensor, k: &Tensor, v: &Tensor) -> R... type AttnBlock (line 58) | struct AttnBlock { method new (line 67) | fn new(in_c: usize, vb: VarBuilder) -> Result { method forward (line 84) | fn forward(&self, xs: &Tensor) -> Result { type ResnetBlock (line 101) | struct ResnetBlock { method new (line 110) | fn new(in_c: usize, out_c: usize, vb: VarBuilder) -> Result { method forward (line 141) | fn forward(&self, xs: &Tensor) -> Result { type Downsample (line 157) | struct Downsample { method new (line 162) | fn new(in_c: usize, vb: VarBuilder) -> Result { method forward (line 173) | fn forward(&self, xs: &Tensor) -> Result { type Upsample (line 181) | struct Upsample { method new (line 186) | fn new(in_c: usize, vb: VarBuilder) -> Result { method forward (line 197) | fn forward(&self, xs: &Tensor) -> Result { type DownBlock (line 204) | struct DownBlock { type Encoder (line 210) | pub struct Encoder { method new (line 221) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 274) | fn forward(&self, xs: &Tensor) -> Result { type UpBlock (line 294) | struct UpBlock { type Decoder (line 300) | pub struct Decoder { method new (line 311) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 359) | fn forward(&self, xs: &Tensor) -> Result { type DiagonalGaussian (line 380) | pub struct DiagonalGaussian { method new (line 386) | pub fn new(sample: bool, chunk_dim: usize) -> Result { method forward (line 392) | fn forward(&self, xs: &Tensor) -> Result { type AutoEncoder (line 404) | pub struct AutoEncoder { method new (line 413) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encode (line 426) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 430) | pub fn decode(&self, xs: &Tensor) -> Result { method forward (line 437) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/flux/mod.rs type WithForward (line 26) | pub trait WithForward { method forward (line 28) | fn forward( FILE: candle-transformers/src/models/flux/model.rs type Config (line 6) | pub struct Config { method dev (line 23) | pub fn dev() -> Self { method schnell (line 41) | pub fn schnell() -> Self { function layer_norm (line 59) | fn layer_norm(dim: usize, vb: VarBuilder) -> Result { function scaled_dot_product_attention (line 64) | fn scaled_dot_product_attention(q: &Tensor, k: &Tensor, v: &Tensor) -> R... function rope (line 80) | fn rope(pos: &Tensor, dim: usize, theta: usize) -> Result { function apply_rope (line 101) | fn apply_rope(x: &Tensor, freq_cis: &Tensor) -> Result { function attention (line 112) | pub(crate) fn attention(q: &Tensor, k: &Tensor, v: &Tensor, pe: &Tensor)... function timestep_embedding (line 119) | pub(crate) fn timestep_embedding(t: &Tensor, dim: usize, dtype: DType) -... type EmbedNd (line 139) | pub struct EmbedNd { method new (line 147) | pub fn new(dim: usize, theta: usize, axes_dim: Vec) -> Self { method forward (line 157) | fn forward(&self, ids: &Tensor) -> Result { type MlpEmbedder (line 174) | pub struct MlpEmbedder { method new (line 180) | fn new(in_sz: usize, h_sz: usize, vb: VarBuilder) -> Result { method forward (line 191) | fn forward(&self, xs: &Tensor) -> Result { type QkNorm (line 197) | pub struct QkNorm { method new (line 203) | fn new(dim: usize, vb: VarBuilder) -> Result { type ModulationOut (line 215) | struct ModulationOut { method scale_shift (line 222) | fn scale_shift(&self, xs: &Tensor) -> Result { method gate (line 227) | fn gate(&self, xs: &Tensor) -> Result { type Modulation1 (line 233) | struct Modulation1 { method new (line 238) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 243) | fn forward(&self, vec_: &Tensor) -> Result { type Modulation2 (line 261) | struct Modulation2 { method new (line 266) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 271) | fn forward(&self, vec_: &Tensor) -> Result<(ModulationOut, ModulationO... type SelfAttention (line 295) | pub struct SelfAttention { method new (line 303) | fn new(dim: usize, num_heads: usize, qkv_bias: bool, vb: VarBuilder) -... method qkv (line 316) | fn qkv(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> { method forward (line 329) | fn forward(&self, xs: &Tensor, pe: &Tensor) -> Result { type Mlp (line 336) | struct Mlp { method new (line 342) | fn new(in_sz: usize, mlp_sz: usize, vb: VarBuilder) -> Result { method forward (line 350) | fn forward(&self, xs: &Tensor) -> Result { type DoubleStreamBlock (line 356) | pub struct DoubleStreamBlock { method new (line 370) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 397) | fn forward( type SingleStreamBlock (line 443) | pub struct SingleStreamBlock { method new (line 455) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 476) | fn forward(&self, xs: &Tensor, vec_: &Tensor, pe: &Tensor) -> Result Resu... method forward (line 514) | fn forward(&self, xs: &Tensor, vec: &Tensor) -> Result { type Flux (line 526) | pub struct Flux { method new (line 539) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 582) | fn forward( FILE: candle-transformers/src/models/flux/quantized_model.rs function layer_norm (line 7) | fn layer_norm(dim: usize, vb: VarBuilder) -> Result { type MlpEmbedder (line 13) | pub struct MlpEmbedder { method new (line 19) | fn new(in_sz: usize, h_sz: usize, vb: VarBuilder) -> Result { method forward (line 30) | fn forward(&self, xs: &Tensor) -> Result { type QkNorm (line 36) | pub struct QkNorm { method new (line 42) | fn new(dim: usize, vb: VarBuilder) -> Result { type ModulationOut (line 54) | struct ModulationOut { method scale_shift (line 61) | fn scale_shift(&self, xs: &Tensor) -> Result { method gate (line 66) | fn gate(&self, xs: &Tensor) -> Result { type Modulation1 (line 72) | struct Modulation1 { method new (line 77) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 82) | fn forward(&self, vec_: &Tensor) -> Result { type Modulation2 (line 100) | struct Modulation2 { method new (line 105) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 110) | fn forward(&self, vec_: &Tensor) -> Result<(ModulationOut, ModulationO... type SelfAttention (line 134) | pub struct SelfAttention { method new (line 142) | fn new(dim: usize, num_heads: usize, qkv_bias: bool, vb: VarBuilder) -... method qkv (line 155) | fn qkv(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> { method forward (line 168) | fn forward(&self, xs: &Tensor, pe: &Tensor) -> Result { type Mlp (line 175) | struct Mlp { method new (line 181) | fn new(in_sz: usize, mlp_sz: usize, vb: VarBuilder) -> Result { method forward (line 189) | fn forward(&self, xs: &Tensor) -> Result { type DoubleStreamBlock (line 195) | pub struct DoubleStreamBlock { method new (line 209) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 236) | fn forward( type SingleStreamBlock (line 282) | pub struct SingleStreamBlock { method new (line 294) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 315) | fn forward(&self, xs: &Tensor, vec_: &Tensor, pe: &Tensor) -> Result Resu... method forward (line 353) | fn forward(&self, xs: &Tensor, vec: &Tensor) -> Result { type Flux (line 365) | pub struct Flux { method new (line 378) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 421) | fn forward( FILE: candle-transformers/src/models/flux/sampling.rs function get_noise (line 3) | pub fn get_noise( type State (line 15) | pub struct State { method new (line 24) | pub fn new(t5_emb: &Tensor, clip_emb: &Tensor, img: &Tensor) -> Result... function time_shift (line 59) | fn time_shift(mu: f64, sigma: f64, t: f64) -> f64 { function get_schedule (line 65) | pub fn get_schedule(num_steps: usize, shift: Option<(usize, f64, f64)>) ... function unpack (line 85) | pub fn unpack(xs: &Tensor, height: usize, width: usize) -> Result { function denoise (line 95) | pub fn denoise( FILE: candle-transformers/src/models/gemma.rs function default_max_position_embeddings (line 12) | fn default_max_position_embeddings() -> usize { type Config (line 17) | pub struct Config { method hidden_act (line 37) | fn hidden_act(&self) -> Result { type RmsNorm (line 47) | struct RmsNorm { method new (line 53) | fn new(dim: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 60) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 77) | struct RotaryEmbedding { method new (line 83) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 102) | fn apply_rotary_emb_qkv( type MLP (line 119) | struct MLP { method new (line 127) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 143) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 151) | struct Attention { method new (line 166) | fn new( method forward (line 197) | fn forward( method clear_kv_cache (line 261) | fn clear_kv_cache(&mut self) { function flash_attn (line 267) | fn flash_attn( function flash_attn (line 278) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type DecoderLayer (line 283) | struct DecoderLayer { method new (line 291) | fn new( method forward (line 314) | fn forward( method clear_kv_cache (line 329) | fn clear_kv_cache(&mut self) { type Model (line 335) | pub struct Model { method new (line 346) | pub fn new(use_flash_attn: bool, cfg: &Config, vb: VarBuilder) -> Resu... method embed_tokens (line 371) | pub fn embed_tokens(&self) -> &candle_nn::Embedding { method prepare_decoder_attention_mask (line 375) | fn prepare_decoder_attention_mask( method forward (line 395) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method forward_embeds (line 412) | pub fn forward_embeds( method forward_embeds_without_projection (line 429) | pub fn forward_embeds_without_projection( method clear_kv_cache (line 443) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/gemma2.rs function default_max_position_embeddings (line 12) | fn default_max_position_embeddings() -> usize { type Config (line 17) | pub struct Config { type RmsNorm (line 40) | struct RmsNorm { method new (line 46) | fn new(dim: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 53) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 70) | struct RotaryEmbedding { method new (line 76) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 95) | fn apply_rotary_emb_qkv( type MLP (line 112) | struct MLP { method new (line 120) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 136) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 144) | struct Attention { method new (line 160) | fn new( method forward (line 192) | fn forward( method clear_kv_cache (line 261) | fn clear_kv_cache(&mut self) { function flash_attn (line 267) | fn flash_attn( function flash_attn (line 278) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type DecoderLayer (line 283) | struct DecoderLayer { method new (line 293) | fn new( method forward (line 328) | fn forward( method clear_kv_cache (line 346) | fn clear_kv_cache(&mut self) { type Model (line 352) | pub struct Model { method new (line 365) | pub fn new(use_flash_attn: bool, cfg: &Config, vb: VarBuilder) -> Resu... method prepare_decoder_attention_mask (line 392) | fn prepare_decoder_attention_mask( method forward (line 425) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 450) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/gemma3.rs type Config (line 13) | pub struct Config { type RmsNorm (line 35) | struct RmsNorm { method new (line 41) | fn new(dim: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 48) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 65) | struct RotaryEmbedding { method new (line 71) | fn new( method apply_rotary_emb_qkv (line 100) | fn apply_rotary_emb_qkv( type MLP (line 117) | struct MLP { method new (line 125) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 141) | fn forward(&self, xs: &Tensor) -> Result { type KvCache (line 149) | enum KvCache { type Attention (line 155) | struct Attention { method new (line 173) | fn new( method forward (line 218) | fn forward( method clear_kv_cache (line 284) | fn clear_kv_cache(&mut self) { function flash_attn (line 293) | fn flash_attn( function flash_attn (line 304) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type DecoderLayer (line 309) | struct DecoderLayer { method new (line 320) | fn new( method forward (line 368) | fn forward( method clear_kv_cache (line 386) | fn clear_kv_cache(&mut self) { function prepare_decoder_attention_mask (line 391) | fn prepare_decoder_attention_mask( type Model (line 428) | pub struct Model { method new (line 441) | pub fn new(use_flash_attn: bool, cfg: &Config, vb: VarBuilder) -> Resu... method create_attention_masks (line 472) | fn create_attention_masks( method forward (line 503) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 531) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/glm4.rs type EosTokenId (line 15) | pub enum EosTokenId { method deserialize (line 21) | fn deserialize(deserializer: D) -> std::result::Result function default_one (line 61) | fn default_one() -> usize { type Config (line 66) | pub struct Config { type RotaryEmbedding (line 92) | struct RotaryEmbedding { method new (line 97) | fn new(cfg: &Config, dtype: DType, dev: &Device) -> Result { method apply (line 115) | fn apply(&self, xs: &Tensor, seqlen_offset: usize) -> Result { type CoreAttention (line 143) | struct CoreAttention { method new (line 157) | fn new(layer_number: usize, cfg: &Config, dtype: DType) -> Result { method forward (line 172) | fn forward( function masked_fill (line 149) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32, dtype: DT... type SelfAttention (line 229) | struct SelfAttention { method new (line 241) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method forward (line 405) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 413) | struct Block { method new (line 422) | fn new(layer_number: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method reset_kv_cache (line 535) | fn reset_kv_cache(&mut self) { method forward (line 541) | fn forward(&mut self, xs: &Tensor, attention_mask: &Option) ->... type Embedding (line 554) | struct Embedding { method new (line 560) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 574) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 585) | pub struct Model { method new (line 599) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 617) | pub fn reset_kv_cache(&mut self) { method forward (line 621) | pub fn forward(&mut self, xs: &Tensor) -> Result { function get_mask (line 591) | fn get_mask(size: usize, device: &Device) -> Result { FILE: candle-transformers/src/models/glm4_new.rs type Config (line 11) | pub struct Config { type RotaryEmbedding (line 31) | pub(crate) struct RotaryEmbedding { method new (line 38) | pub(crate) fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result<... method apply (line 65) | pub(crate) fn apply(&self, xs: &Tensor, offset: usize) -> Result Result { method forward (line 102) | fn forward(&self, x: &Tensor) -> Result { type Attention (line 115) | pub(crate) struct Attention { method new (line 130) | pub(crate) fn new( method forward (line 189) | pub(crate) fn forward( method clear_kv_cache (line 232) | pub(crate) fn clear_kv_cache(&mut self) { type DecoderLayer (line 238) | struct DecoderLayer { method new (line 248) | fn new(cfg: &Config, rotary: Arc, vb: VarBuilder) -> ... method forward (line 280) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>, offset: usiz... method clear_kv_cache (line 293) | fn clear_kv_cache(&mut self) { type Model (line 299) | pub struct Model { method new (line 308) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 326) | fn clear_kv_cache(&mut self) { method causal_mask (line 332) | fn causal_mask( method forward (line 359) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Result { method forward (line 393) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result usize { method into_config (line 65) | pub fn into_config(self, use_flash_attn: bool) -> Config { function default_rope (line 60) | fn default_rope() -> f32 { type Config (line 85) | pub struct Config { type Cache (line 102) | pub struct Cache { method new (line 120) | pub fn new(use_kv_cache: bool, dtype: DType, config: &Config, device: ... method mask (line 172) | fn mask(&mut self, t: usize) -> Result { function calculate_default_inv_freq (line 111) | fn calculate_default_inv_freq(cfg: &Config) -> Vec { type CausalSelfAttention (line 187) | struct CausalSelfAttention { method apply_rotary_emb (line 218) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize, cache: &Cache... method forward (line 226) | fn forward( method repeat_kv (line 313) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 317) | fn load(vb: VarBuilder, cfg: &Config) -> Result { function flash_attn (line 202) | fn flash_attn( function flash_attn (line 213) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... function masked_fill (line 343) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 351) | struct Mlp { method forward (line 359) | fn forward(&self, x: &Tensor) -> Result { method load (line 365) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Block (line 382) | struct Block { method forward (line 391) | fn forward( method load (line 407) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Granite (line 428) | pub struct Granite { method forward (line 436) | pub fn forward(&self, x: &Tensor, index_pos: usize, cache: &mut Cache)... method load (line 448) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { FILE: candle-transformers/src/models/granitemoehybrid.rs constant DEFAULT_MAX_SEQ_LEN (line 12) | pub const DEFAULT_MAX_SEQ_LEN: usize = 4096; type GraniteMoeHybridRopeType (line 15) | pub enum GraniteMoeHybridRopeType { type GraniteMoeHybridRopeConfig (line 24) | pub struct GraniteMoeHybridRopeConfig { type GraniteMoeHybridConfig (line 33) | pub struct GraniteMoeHybridConfig { method num_key_value_heads (line 62) | pub fn num_key_value_heads(&self) -> usize { method into_config (line 84) | pub fn into_config(self, use_flash_attn: bool) -> GraniteMoeHybridInte... function default_rope (line 67) | fn default_rope() -> f32 { function default_one (line 71) | fn default_one() -> f32 { type GraniteMoeHybridLayerType (line 77) | pub enum GraniteMoeHybridLayerType { type GraniteMoeHybridInternalConfig (line 118) | pub struct GraniteMoeHybridInternalConfig { type GraniteMoeHybridCache (line 141) | pub struct GraniteMoeHybridCache { method new (line 159) | pub fn new( method mask (line 216) | fn mask(&mut self, t: usize) -> Result { function calculate_default_inv_freq (line 150) | fn calculate_default_inv_freq(cfg: &GraniteMoeHybridInternalConfig) -> V... type CausalSelfAttention (line 233) | struct CausalSelfAttention { method apply_rotary_emb (line 265) | fn apply_rotary_emb( method forward (line 278) | fn forward( method repeat_kv (line 366) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 370) | fn load(vb: VarBuilder, cfg: &GraniteMoeHybridInternalConfig) -> Resul... function flash_attn (line 249) | fn flash_attn( function flash_attn (line 260) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... function masked_fill (line 398) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type MultiLayerPercepton (line 409) | struct MultiLayerPercepton { method forward (line 416) | fn forward(&self, x: &Tensor) -> Result { method load (line 425) | fn load(vb: VarBuilder, cfg: &GraniteMoeHybridInternalConfig) -> Resul... type Block (line 442) | struct Block { method forward (line 452) | fn forward( method load (line 475) | fn load(vb: VarBuilder, cfg: &GraniteMoeHybridInternalConfig) -> Resul... type GraniteMoeHybrid (line 497) | pub struct GraniteMoeHybrid { method forward (line 506) | pub fn forward( method load (line 538) | pub fn load(vb: VarBuilder, cfg: &GraniteMoeHybridInternalConfig) -> R... function scale_tensor (line 580) | fn scale_tensor(tensor: Tensor, scale: f32) -> Result { FILE: candle-transformers/src/models/helium.rs function default_use_flash_attn (line 10) | fn default_use_flash_attn() -> bool { type Config (line 15) | pub struct Config { method config_2b (line 37) | pub fn config_2b(use_flash_attn: bool) -> Self { type RotaryEmbedding (line 61) | struct RotaryEmbedding { method new (line 67) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 87) | fn apply_rotary_emb_qkv( type MLP (line 104) | struct MLP { method new (line 112) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 129) | fn forward(&self, xs: &Tensor) -> Result { function flash_attn (line 137) | fn flash_attn( function flash_attn (line 148) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type Attention (line 153) | struct Attention { method new (line 168) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 194) | fn forward( method clear_kv_cache (line 260) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 266) | struct DecoderLayer { method new (line 274) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 292) | fn forward( method clear_kv_cache (line 307) | fn clear_kv_cache(&mut self) { type Model (line 313) | pub struct Model { method new (line 323) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 350) | fn prepare_decoder_attention_mask( method embed_tokens (line 369) | pub fn embed_tokens(&self) -> &candle_nn::Embedding { method forward (line 373) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 390) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/hiera.rs type Config (line 11) | pub struct Config { method tiny (line 18) | pub fn tiny() -> Self { method small (line 25) | pub fn small() -> Self { method base (line 32) | pub fn base() -> Self { method base_plus (line 39) | pub fn base_plus() -> Self { method large (line 46) | pub fn large() -> Self { method huge (line 53) | pub fn huge() -> Self { constant NUM_TOKENS (line 62) | const NUM_TOKENS: usize = 56 * 56; function hiera_embeddings (line 64) | fn hiera_embeddings(channels: usize, vb: VarBuilder) -> Result Result> { function hiera_mlp (line 104) | fn hiera_mlp(in_channels: usize, out_channels: usize, vb: VarBuilder) ->... function hiera_attention (line 114) | fn hiera_attention( function hiera_block (line 175) | fn hiera_block( function hiera_blocks (line 215) | fn hiera_blocks(cfg: &Config, vb: VarBuilder) -> Result> { function hiera_head (line 259) | fn hiera_head(outputs: usize, nclasses: usize, vb: VarBuilder) -> Result... function hiera_model (line 268) | fn hiera_model(cfg: &Config, nclasses: Option, vb: VarBuilder) ->... function hiera (line 295) | pub fn hiera(cfg: &Config, nclasses: usize, vb: VarBuilder) -> Result Result Self { method new (line 58) | pub fn new( type BertEmbeddings (line 90) | struct BertEmbeddings { method new (line 99) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 118) | fn forward(&self, input_ids: &Tensor) -> Result { type BertSelfAttention (line 132) | struct BertSelfAttention { method new (line 143) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method transpose_for_scores (line 161) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method forward (line 169) | fn forward(&self, xs: &Tensor, bias: &Tensor) -> Result { type BertSelfOutput (line 194) | struct BertSelfOutput { method new (line 201) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 211) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type BertAttention (line 219) | struct BertAttention { method new (line 226) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 236) | fn forward(&self, xs: &Tensor, bias: &Tensor) -> Result { type BertGLUMLP (line 245) | struct BertGLUMLP { method new (line 254) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 274) | fn forward(&self, xs: &Tensor) -> Result { type BertLayer (line 285) | struct BertLayer { method new (line 292) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 302) | fn forward(&self, xs: &Tensor, bias: &Tensor) -> Result { function build_alibi_bias (line 308) | fn build_alibi_bias(cfg: &Config) -> Result { type BertEncoder (line 341) | struct BertEncoder { method new (line 348) | fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 366) | fn forward(&self, xs: &Tensor) -> Result { type BertModel (line 379) | pub struct BertModel { method new (line 387) | pub fn new(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 400) | fn forward(&self, input_ids: &Tensor) -> Result { FILE: candle-transformers/src/models/llama.rs constant DEFAULT_MAX_SEQ_LEN (line 12) | pub const DEFAULT_MAX_SEQ_LEN: usize = 4096; type Llama3RopeType (line 15) | pub enum Llama3RopeType { type Llama3RopeConfig (line 24) | pub struct Llama3RopeConfig { type LlamaEosToks (line 33) | pub enum LlamaEosToks { type LlamaConfig (line 39) | pub struct LlamaConfig { method num_key_value_heads (line 57) | pub fn num_key_value_heads(&self) -> usize { method into_config (line 67) | pub fn into_config(self, use_flash_attn: bool) -> Config { function default_rope (line 62) | fn default_rope() -> f32 { type Config (line 88) | pub struct Config { method config_7b_v1 (line 106) | pub fn config_7b_v1(use_flash_attn: bool) -> Self { method config_7b_v2 (line 125) | pub fn config_7b_v2(use_flash_attn: bool) -> Self { type Cache (line 146) | pub struct Cache { method new (line 164) | pub fn new(use_kv_cache: bool, dtype: DType, config: &Config, device: ... method mask (line 218) | fn mask(&mut self, t: usize) -> Result { function calculate_default_inv_freq (line 155) | fn calculate_default_inv_freq(cfg: &Config) -> Vec { type CausalSelfAttention (line 233) | struct CausalSelfAttention { method apply_rotary_emb (line 264) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize, cache: &Cache... method forward (line 272) | fn forward( method repeat_kv (line 360) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 364) | fn load(vb: VarBuilder, cfg: &Config) -> Result { function flash_attn (line 248) | fn flash_attn( function flash_attn (line 259) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... function masked_fill (line 390) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 398) | struct Mlp { method forward (line 406) | fn forward(&self, x: &Tensor) -> Result { method load (line 412) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Block (line 429) | struct Block { method forward (line 438) | fn forward( method load (line 454) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Llama (line 475) | pub struct Llama { method embed (line 484) | pub fn embed(&self, x: &Tensor) -> Result { method forward_input_embed (line 488) | pub fn forward_input_embed( method forward (line 505) | pub fn forward(&self, x: &Tensor, index_pos: usize, cache: &mut Cache)... method load (line 517) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { FILE: candle-transformers/src/models/llama2_c.rs type Config (line 15) | pub struct Config { method tiny_260k (line 27) | pub fn tiny_260k() -> Self { method tiny_15m (line 40) | pub fn tiny_15m() -> Self { method tiny_42m (line 53) | pub fn tiny_42m() -> Self { method tiny_110m (line 66) | pub fn tiny_110m() -> Self { type Cache (line 81) | pub struct Cache { method new (line 91) | pub fn new(use_kv_cache: bool, cfg: &Config, vb: VarBuilder) -> Result... method mask (line 123) | pub fn mask(&mut self, t: usize) -> Result { function silu (line 137) | fn silu(xs: &Tensor) -> Result { type CausalSelfAttention (line 142) | struct CausalSelfAttention { method apply_rotary_emb (line 153) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize, cache: &Cache... method forward (line 170) | fn forward( method repeat_kv (line 219) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 233) | fn load(vb: VarBuilder, cfg: &Config) -> Result { function masked_fill (line 253) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 261) | struct Mlp { method new (line 268) | fn new(c_fc1: Linear, c_fc2: Linear, c_proj: Linear) -> Self { method forward (line 276) | fn forward(&self, x: &Tensor) -> Result { method load (line 281) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Block (line 292) | struct Block { method new (line 300) | fn new(rms_1: RmsNorm, attn: CausalSelfAttention, rms_2: RmsNorm, mlp:... method forward (line 309) | fn forward( method load (line 324) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Llama (line 340) | pub struct Llama { method forward (line 349) | pub fn forward(&self, x: &Tensor, index_pos: usize, cache: &mut Cache)... method load (line 360) | pub fn load(vb: VarBuilder, cfg: Config) -> Result { FILE: candle-transformers/src/models/llama2_c_weights.rs type TransformerWeights (line 13) | pub struct TransformerWeights { method from_reader (line 80) | pub fn from_reader(r: &mut R, c: &Config, dev: &Devi... method var_builder (line 112) | pub fn var_builder(&self, cfg: &Config, device: &Device) -> Result(r: &mut R) -> Result { function read_tensor (line 41) | fn read_tensor>( method from_reader (line 54) | pub fn from_reader(r: &mut R) -> Result { method head_size (line 74) | pub fn head_size(&self) -> usize { FILE: candle-transformers/src/models/llava/config.rs type LLaVAConfig (line 11) | pub struct LLaVAConfig { method to_llama_config (line 66) | pub fn to_llama_config(&self) -> Config { function default_hf (line 49) | fn default_hf() -> bool { function default_image_token_index (line 53) | fn default_image_token_index() -> isize { function default_mm_patch_merge_type (line 57) | fn default_mm_patch_merge_type() -> String { function default_image_aspect_ratio (line 61) | fn default_image_aspect_ratio() -> String { type HFLLaVATextConfig (line 87) | pub struct HFLLaVATextConfig { function default_num_hidden_layers (line 113) | fn default_num_hidden_layers() -> usize { function default_use_cache (line 117) | fn default_use_cache() -> bool { function default_hidden_size (line 121) | fn default_hidden_size() -> usize { function default_intermediate_size (line 125) | fn default_intermediate_size() -> usize { function default_max_length (line 129) | fn default_max_length() -> usize { function default_num_attention_heads (line 133) | fn default_num_attention_heads() -> usize { function default_num_key_value_heads (line 137) | fn default_num_key_value_heads() -> usize { function default_rope_theta (line 141) | fn default_rope_theta() -> f32 { type HFLLaVAVisionConfig (line 146) | pub struct HFLLaVAVisionConfig { type HFLLaVAConfig (line 160) | pub struct HFLLaVAConfig { method to_clip_vision_config (line 202) | pub fn to_clip_vision_config(&self) -> ClipVisionConfig { method map_projector_type (line 215) | fn map_projector_type(s: &str) -> String { method map_select_feature (line 223) | fn map_select_feature(s: &str) -> String { method to_llava_config (line 231) | pub fn to_llava_config( type HFGenerationConfig (line 177) | pub struct HFGenerationConfig { type HFPreProcessorConfig (line 186) | pub struct HFPreProcessorConfig { FILE: candle-transformers/src/models/llava/mod.rs function mlp_gelu_match (line 24) | fn mlp_gelu_match(mm_projector_type: &str) -> Option { function unpad_image (line 39) | fn unpad_image(tensor: &Tensor, original_size: &(u32, u32)) -> Result Result { type MMProjector (line 68) | pub struct MMProjector { method load (line 73) | pub fn load(vb: &VarBuilder, config: &LLaVAConfig) -> Result { method forward (line 126) | pub fn forward(&self, x: &Tensor) -> Result { type ClipVisionTower (line 131) | pub struct ClipVisionTower { method new (line 139) | pub fn new( method forward (line 163) | pub fn forward(&self, x: &Tensor) -> Result { method num_patches_per_side (line 174) | pub fn num_patches_per_side(&self) -> usize { type LLaVA (line 179) | pub struct LLaVA { method load (line 189) | pub fn load( method encode_images (line 232) | pub fn encode_images(&self, x: &Tensor) -> Result { method prepare_inputs_labels_for_multimodal (line 238) | pub fn prepare_inputs_labels_for_multimodal( method forward (line 403) | pub fn forward( FILE: candle-transformers/src/models/llava/utils.rs function get_anyres_image_grid_shape (line 1) | pub fn get_anyres_image_grid_shape( function select_best_resolution (line 10) | pub fn select_best_resolution( FILE: candle-transformers/src/models/mamba.rs constant D_CONV (line 12) | const D_CONV: usize = 4; constant D_STATE (line 13) | const D_STATE: usize = 16; type Config (line 16) | pub struct Config { method vocab_size (line 24) | fn vocab_size(&self) -> usize { method dt_rank (line 29) | fn dt_rank(&self) -> usize { method d_inner (line 33) | fn d_inner(&self) -> usize { type State (line 38) | pub struct State { method new (line 45) | pub fn new(batch_size: usize, cfg: &Config, dtype: DType, device: &Dev... type MambaBlock (line 63) | pub struct MambaBlock { method new (line 78) | pub fn new(layer_index: usize, cfg: &Config, vb: VarBuilder) -> Result... method forward (line 110) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type ResidualBlock (line 161) | pub struct ResidualBlock { method new (line 167) | pub fn new(layer_index: usize, cfg: &Config, vb: VarBuilder) -> Result... method forward (line 173) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Model (line 180) | pub struct Model { method new (line 189) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 208) | pub fn forward(&self, input_ids: &Tensor, state: &mut State) -> Result... method dtype (line 218) | pub fn dtype(&self) -> DType { FILE: candle-transformers/src/models/mamba2.rs constant D_CONV (line 10) | const D_CONV: usize = 4; function segsum (line 14) | fn segsum(x: &Tensor) -> Result { function pad_to_chunk_size (line 45) | fn pad_to_chunk_size(x: &Tensor, chunk_size: usize) -> Result<(Tensor, u... function reshape_into_chunks (line 58) | fn reshape_into_chunks(x: &Tensor, chunk_size: usize) -> Result { function reshape_from_chunks (line 69) | fn reshape_from_chunks(x: &Tensor) -> Result { function default_d_state (line 80) | fn default_d_state() -> usize { function default_expand (line 83) | fn default_expand() -> usize { function default_headdim (line 86) | fn default_headdim() -> usize { function default_ngroups (line 89) | fn default_ngroups() -> usize { function default_pad_vocab_size_multiple (line 92) | fn default_pad_vocab_size_multiple() -> usize { type Config (line 97) | pub struct Config { method vocab_size (line 116) | fn vocab_size(&self) -> usize { method d_inner (line 121) | fn d_inner(&self) -> usize { method d_xbc (line 125) | fn d_xbc(&self) -> usize { method nheads (line 129) | fn nheads(&self) -> usize { type State (line 134) | pub struct State { method new (line 141) | pub fn new(batch_size: usize, cfg: &Config, dtype: DType, device: &Dev... type Mamba2Block (line 165) | pub struct Mamba2Block { method new (line 184) | pub fn new(layer_idx: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method apply_conv1d (line 262) | fn apply_conv1d(&self, xbc: &Tensor, conv_state: &mut Tensor) -> Resul... method ssm_step (line 278) | fn ssm_step( method ssd_chunked (line 328) | fn ssd_chunked( method forward_prefill (line 435) | pub fn forward_prefill( type ResidualBlock (line 568) | pub struct ResidualBlock { method new (line 574) | pub fn new(layer_idx: usize, cfg: &Config, vb: VarBuilder) -> Result Result { method forward_prefill (line 584) | fn forward_prefill(&self, xs: &Tensor, state: &mut State, chunk_size: ... type Model (line 591) | pub struct Model { method new (line 600) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 618) | pub fn forward(&self, input_ids: &Tensor, state: &mut State) -> Result... method forward_prefill (line 627) | pub fn forward_prefill( method dtype (line 644) | pub fn dtype(&self) -> DType { FILE: candle-transformers/src/models/marian.rs type Config (line 12) | pub struct Config { method opus_mt_tc_big_fr_en (line 36) | pub fn opus_mt_tc_big_fr_en() -> Self { method opus_mt_fr_en (line 61) | pub fn opus_mt_fr_en() -> Self { method opus_mt_en_zh (line 85) | pub fn opus_mt_en_zh() -> Self { method opus_mt_en_hi (line 109) | pub fn opus_mt_en_hi() -> Self { method opus_mt_en_es (line 133) | pub fn opus_mt_en_es() -> Self { method opus_mt_en_fr (line 157) | pub fn opus_mt_en_fr() -> Self { method opus_mt_en_ru (line 181) | pub fn opus_mt_en_ru() -> Self { type SinusoidalPositionalEmbedding (line 207) | struct SinusoidalPositionalEmbedding { method new (line 212) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 234) | fn forward(&self, input_ids: &Tensor, past_kv_len: usize) -> Result Result { method _shape (line 285) | fn _shape(&self, tensor: &Tensor, bsz: usize) -> Result { method forward (line 292) | fn forward( method reset_kv_cache (line 343) | fn reset_kv_cache(&mut self) { type EncoderLayer (line 349) | struct EncoderLayer { method new (line 359) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 375) | fn forward(&mut self, xs: &Tensor) -> Result { method reset_kv_cache (line 387) | fn reset_kv_cache(&mut self) { type DecoderLayer (line 393) | struct DecoderLayer { method new (line 405) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 426) | fn forward( method reset_kv_cache (line 452) | fn reset_kv_cache(&mut self) { type Encoder (line 459) | pub struct Encoder { method new (line 467) | fn new(cfg: &Config, embed_tokens: &Embedding, vb: VarBuilder) -> Resu... method forward (line 488) | pub fn forward(&mut self, xs: &Tensor, past_kv_len: usize) -> Result Resu... method forward (line 542) | pub fn forward( method reset_kv_cache (line 565) | pub fn reset_kv_cache(&mut self) { type Model (line 573) | struct Model { method new (line 580) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 591) | fn reset_kv_cache(&mut self) { type MTModel (line 598) | pub struct MTModel { method new (line 605) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method encoder (line 617) | pub fn encoder(&mut self) -> &mut Encoder { method decoder (line 621) | pub fn decoder(&mut self) -> &mut Decoder { method decode (line 625) | pub fn decode( method reset_kv_cache (line 643) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/metavoice.rs function repeat_interleave (line 11) | pub(crate) fn repeat_interleave(img: &Tensor, repeats: usize, dim: usize... type Config (line 21) | pub struct Config { method cfg (line 33) | pub fn cfg() -> Self { method cfg1b_v0_1 (line 384) | pub fn cfg1b_v0_1() -> Self { method cfg1b_v0_1 (line 691) | pub fn cfg1b_v0_1() -> Self { method n_local_heads (line 705) | pub(crate) fn n_local_heads(&self) -> usize { method head_dim (line 709) | pub(crate) fn head_dim(&self) -> usize { method intermediate_size (line 713) | pub(crate) fn intermediate_size(&self) -> usize { type Model (line 47) | pub struct Model { method new (line 56) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method compute_partial_slices (line 81) | fn compute_partial_slices( method embed_utterance (line 120) | pub fn embed_utterance( method new (line 605) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method config (line 641) | pub fn config(&self) -> &Config { method forward (line 645) | pub fn forward(&self, idx: &Tensor) -> Result> { method new (line 887) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 924) | pub fn clear_kv_cache(&mut self) { method forward (line 930) | pub fn forward(&mut self, xs: &Tensor, spk_emb: &Tensor, pos: usize) -... type Slice (line 53) | type Slice = (usize, usize); method forward (line 161) | fn forward(&self, xs: &Tensor) -> Result { type Rank (line 179) | type Rank = u32; type BPE (line 185) | pub struct BPE { method from_json (line 194) | pub fn from_json(json: &serde_json::Value, end_of_text: usize) -> Resu... method _byte_pair_merge (line 247) | fn _byte_pair_merge(&self, piece: &[u8]) -> Vec<(usize, Rank)> { method byte_pair_encode (line 306) | pub fn byte_pair_encode(&self, piece: &[u8]) -> Vec { method encode (line 320) | pub fn encode(&self, text: &str) -> Result> { type NormType (line 340) | pub enum NormType { type AttnKernelType (line 346) | pub enum AttnKernelType { type NonLinearityType (line 353) | pub enum NonLinearityType { type Norm (line 358) | enum Norm { method new (line 406) | fn new(cfg: &Config, vb: VarBuilder) -> Result { type Config (line 365) | pub struct Config { method cfg (line 33) | pub fn cfg() -> Self { method cfg1b_v0_1 (line 384) | pub fn cfg1b_v0_1() -> Self { method cfg1b_v0_1 (line 691) | pub fn cfg1b_v0_1() -> Self { method n_local_heads (line 705) | pub(crate) fn n_local_heads(&self) -> usize { method head_dim (line 709) | pub(crate) fn head_dim(&self) -> usize { method intermediate_size (line 713) | pub(crate) fn intermediate_size(&self) -> usize { method forward (line 425) | fn forward(&self, xs: &Tensor) -> Result { type SelfAttention (line 434) | struct SelfAttention { method new (line 442) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 463) | fn forward(&self, xs: &Tensor) -> Result { type MLP (line 485) | enum MLP { method new (line 500) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 536) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 558) | struct Block { method new (line 567) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method new (line 848) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 862) | fn forward(&mut self, xs: &Tensor, pos: usize, mask: &Tensor) -> Resul... method clear_kv_cache (line 869) | fn clear_kv_cache(&mut self) { method forward (line 583) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 593) | pub struct Model { method new (line 56) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method compute_partial_slices (line 81) | fn compute_partial_slices( method embed_utterance (line 120) | pub fn embed_utterance( method new (line 605) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method config (line 641) | pub fn config(&self) -> &Config { method forward (line 645) | pub fn forward(&self, idx: &Tensor) -> Result> { method new (line 887) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 924) | pub fn clear_kv_cache(&mut self) { method forward (line 930) | pub fn forward(&mut self, xs: &Tensor, spk_emb: &Tensor, pos: usize) -... type Config (line 678) | pub struct Config { method cfg (line 33) | pub fn cfg() -> Self { method cfg1b_v0_1 (line 384) | pub fn cfg1b_v0_1() -> Self { method cfg1b_v0_1 (line 691) | pub fn cfg1b_v0_1() -> Self { method n_local_heads (line 705) | pub(crate) fn n_local_heads(&self) -> usize { method head_dim (line 709) | pub(crate) fn head_dim(&self) -> usize { method intermediate_size (line 713) | pub(crate) fn intermediate_size(&self) -> usize { type FeedForward (line 726) | struct FeedForward { method new (line 734) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 749) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 757) | struct Attention { method new (line 770) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 789) | fn forward(&mut self, xs: &Tensor, _pos: usize, mask: &Tensor) -> Resu... method clear_kv_cache (line 833) | fn clear_kv_cache(&mut self) { type Block (line 839) | struct Block { method new (line 567) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method new (line 848) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 862) | fn forward(&mut self, xs: &Tensor, pos: usize, mask: &Tensor) -> Resul... method clear_kv_cache (line 869) | fn clear_kv_cache(&mut self) { type Model (line 875) | pub struct Model { method new (line 56) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method compute_partial_slices (line 81) | fn compute_partial_slices( method embed_utterance (line 120) | pub fn embed_utterance( method new (line 605) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method config (line 641) | pub fn config(&self) -> &Config { method forward (line 645) | pub fn forward(&self, idx: &Tensor) -> Result> { method new (line 887) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 924) | pub fn clear_kv_cache(&mut self) { method forward (line 930) | pub fn forward(&mut self, xs: &Tensor, spk_emb: &Tensor, pos: usize) -... type TiltedEncodec (line 960) | pub struct TiltedEncodec { method new (line 966) | pub fn new(end_of_audio_token: u32) -> Self { method decode (line 973) | pub fn decode(&self, tokens: &[Vec]) -> (Vec, Vec>) { type FlattenedInterleavedEncodec2Codebook (line 1001) | pub struct FlattenedInterleavedEncodec2Codebook { method new (line 1007) | pub fn new(end_of_audio_token: u32) -> Self { method decode (line 1014) | pub fn decode(&self, tokens: &[u32]) -> (Vec, Vec, Vec) { FILE: candle-transformers/src/models/mimi/conv.rs type Norm (line 10) | pub enum Norm { type PadMode (line 17) | pub enum PadMode { function conv1d_weight_norm (line 26) | fn conv1d_weight_norm( type NormConv1d (line 51) | pub struct NormConv1d { method new (line 59) | pub fn new( method forward (line 101) | fn forward(&self, xs: &Tensor) -> Result { type NormConvTranspose1d (line 112) | pub struct NormConvTranspose1d { method new (line 124) | pub fn new( method forward (line 187) | fn forward(&self, xs: &Tensor) -> Result { function get_extra_padding_for_conv1d (line 210) | fn get_extra_padding_for_conv1d( function pad1d (line 223) | fn pad1d(xs: &Tensor, pad_l: usize, pad_r: usize, mode: PadMode) -> Resu... function unpad1d (line 231) | fn unpad1d(xs: &Tensor, unpad_l: usize, unpad_r: usize) -> Result { type StreamableConv1d (line 240) | pub struct StreamableConv1d { method new (line 252) | pub fn new( method forward (line 289) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 316) | fn reset_state(&mut self) { method step (line 321) | fn step(&mut self, xs: &StreamTensor) -> Result { type StreamableConvTranspose1d (line 360) | pub struct StreamableConvTranspose1d { method new (line 370) | pub fn new( method forward (line 394) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 412) | fn reset_state(&mut self) { method step (line 416) | fn step(&mut self, xs: &StreamTensor) -> Result { type ConvDownsample1d (line 452) | pub struct ConvDownsample1d { method new (line 457) | pub fn new( method forward (line 485) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 491) | fn reset_state(&mut self) { method step (line 495) | fn step(&mut self, xs: &StreamTensor) -> Result { type ConvTrUpsample1d (line 501) | pub struct ConvTrUpsample1d { method new (line 506) | pub fn new( method forward (line 532) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 538) | fn reset_state(&mut self) { method step (line 542) | fn step(&mut self, xs: &StreamTensor) -> Result { function run_conv1d (line 552) | fn run_conv1d( function run_conv_tr1d (line 603) | fn run_conv_tr1d( function conv1d (line 646) | fn conv1d() -> Result<()> { function conv_tr1d (line 660) | fn conv_tr1d() -> Result<()> { FILE: candle-transformers/src/models/mimi/encodec.rs type ResampleMethod (line 10) | pub enum ResampleMethod { type Config (line 16) | pub struct Config { method v0_1 (line 31) | pub fn v0_1(num_codebooks: Option) -> Self { type Encodec (line 92) | pub struct Encodec { method new (line 104) | pub fn new(cfg: Config, vb: VarBuilder) -> Result { method config (line 160) | pub fn config(&self) -> &Config { method encode_pre_quantize (line 164) | pub fn encode_pre_quantize(&mut self, xs: &Tensor) -> Result { method encode (line 172) | pub fn encode(&mut self, xs: &Tensor) -> Result { method encode_step (line 182) | pub fn encode_step(&mut self, xs: &StreamTensor) -> Result Result { method decode_step (line 204) | pub fn decode_step(&mut self, codes: &StreamTensor) -> Result, dev: &Device... FILE: candle-transformers/src/models/mimi/mod.rs type NormType (line 40) | pub enum NormType { FILE: candle-transformers/src/models/mimi/quantization.rs type CodebookEncode (line 8) | struct CodebookEncode; method name (line 11) | fn name(&self) -> &'static str { method cpu_fwd (line 15) | fn cpu_fwd( type EuclideanCodebook (line 73) | pub struct EuclideanCodebook { method new (line 86) | pub fn new(dim: usize, codebook_size: usize, vb: VarBuilder) -> Result... method encode_very_slow (line 109) | pub fn encode_very_slow(&self, xs: &Tensor) -> Result { method encode_slow (line 125) | pub fn encode_slow(&self, xs: &Tensor) -> Result { method encode (line 136) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 146) | pub fn decode(&self, indexes: &Tensor) -> Result { type VectorQuantization (line 160) | pub struct VectorQuantization { method new (line 167) | pub fn new( method encode (line 189) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 194) | pub fn decode(&self, codes: &Tensor) -> Result { type ResidualVectorQuantization (line 205) | pub struct ResidualVectorQuantization { method new (line 210) | pub fn new( method encode (line 226) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 238) | pub fn decode(&self, xs: &Tensor) -> Result { type ResidualVectorQuantizer (line 260) | pub struct ResidualVectorQuantizer { method new (line 267) | pub fn new( method encode (line 314) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 319) | pub fn decode(&self, codes: &Tensor) -> Result { type SplitResidualVectorQuantizer (line 333) | pub struct SplitResidualVectorQuantizer { method new (line 342) | pub fn new( method encode (line 379) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 393) | pub fn decode(&self, codes: &Tensor) -> Result { FILE: candle-transformers/src/models/mimi/seanet.rs type Config (line 11) | pub struct Config { type SeaNetResnetBlock (line 33) | pub struct SeaNetResnetBlock { method new (line 43) | pub fn new( method forward (line 108) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 122) | fn reset_state(&mut self) { method step (line 131) | fn step(&mut self, xs: &StreamTensor) -> Result { type EncoderLayer (line 145) | struct EncoderLayer { type SeaNetEncoder (line 151) | pub struct SeaNetEncoder { method new (line 160) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 265) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 279) | fn reset_state(&mut self) { method step (line 288) | fn step(&mut self, xs: &StreamTensor) -> Result { type DecoderLayer (line 302) | struct DecoderLayer { type SeaNetDecoder (line 308) | pub struct SeaNetDecoder { method new (line 318) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 421) | fn forward(&self, xs: &Tensor) -> Result { method reset_state (line 440) | fn reset_state(&mut self) { method step (line 449) | fn step(&mut self, xs: &StreamTensor) -> Result { FILE: candle-transformers/src/models/mimi/transformer.rs function linear (line 9) | fn linear(in_d: usize, out_d: usize, bias: bool, vb: VarBuilder) -> Resu... type PositionalEmbedding (line 18) | pub enum PositionalEmbedding { type Config (line 25) | pub struct Config { type RotaryEmbedding (line 51) | pub struct RotaryEmbedding { method new (line 58) | pub fn new(dim: usize, max_seq_len: usize, theta: f32, dev: &Device) -... method apply_rotary_emb (line 76) | pub fn apply_rotary_emb(&self, qk: &Tensor, seqlen_offset: usize) -> R... type LayerScale (line 87) | pub struct LayerScale { method new (line 92) | pub fn new(d_model: usize, _init: f64, vb: VarBuilder) -> Result { method forward (line 99) | fn forward(&self, xs: &Tensor) -> Result { type StreamingMultiheadAttention (line 105) | pub struct StreamingMultiheadAttention { method new (line 122) | pub fn new(rope: &Option>, cfg: &Config, vb: VarB... method forward (line 148) | pub fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Resul... method reset_kv_cache (line 220) | pub fn reset_kv_cache(&mut self) { method set_kv_cache (line 224) | pub fn set_kv_cache(&mut self, kv_cache: candle_nn::kv_cache::Rotating... type StreamingMultiheadCrossAttention (line 230) | pub struct StreamingMultiheadCrossAttention { method new (line 242) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 277) | pub fn forward(&self, xs: &Tensor, ca_src: &Tensor, mask: Option<&Tens... type Mlp (line 321) | pub enum Mlp { method new (line 338) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 378) | fn forward(&self, xs: &Tensor) -> Result { type RmsNorm (line 416) | pub struct RmsNorm { method new (line 422) | pub fn new(d_model: usize, eps: f32, vb: VarBuilder) -> Result { method forward (line 429) | fn forward(&self, xs: &Tensor) -> Result { type Norm (line 435) | pub enum Norm { method new (line 441) | pub fn new(d_model: usize, cfg: &Config, vb: VarBuilder) -> Result Result { type StreamingTransformerLayer (line 466) | pub struct StreamingTransformerLayer { method new (line 479) | pub fn new(rope: &Option>, cfg: &Config, vb: VarB... method forward (line 533) | pub fn forward( method reset_kv_cache (line 566) | pub fn reset_kv_cache(&mut self) { method set_kv_cache (line 570) | pub fn set_kv_cache(&mut self, kv_cache: candle_nn::kv_cache::Rotating... type StreamingTransformer (line 576) | pub struct StreamingTransformer { method new (line 583) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 609) | pub fn forward(&mut self, xs: &Tensor) -> Result { method forward_ca (line 613) | pub fn forward_ca(&mut self, xs: &Tensor, ca_src: Option<&Tensor>) -> ... method copy_state (line 646) | pub fn copy_state(&mut self, from: &Self) -> Result<()> { method reset_state (line 659) | fn reset_state(&mut self) { method step (line 663) | fn step(&mut self, xs: &StreamTensor) -> Result { type ProjectedTransformer (line 672) | pub struct ProjectedTransformer { method new (line 681) | pub fn new( method forward (line 714) | pub fn forward(&mut self, xs: &Tensor) -> Result> { method reset_state (line 738) | fn reset_state(&mut self) { method step (line 742) | fn step(&mut self, xs: &StreamTensor) -> Result { function flash_attn (line 764) | fn flash_attn( function flash_attn (line 775) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... FILE: candle-transformers/src/models/mistral.rs function default_num_attention_heads (line 14) | fn default_num_attention_heads() -> usize { function default_use_flash_attn (line 18) | fn default_use_flash_attn() -> bool { function default_hidden_act (line 22) | fn default_hidden_act() -> candle_nn::Activation { type Config (line 27) | pub struct Config { method config_7b_v0_1 (line 48) | pub fn config_7b_v0_1(use_flash_attn: bool) -> Self { method config_chat_ml (line 68) | pub fn config_chat_ml(use_flash_attn: bool) -> Self { method config_amazon_mistral_lite (line 87) | pub fn config_amazon_mistral_lite(use_flash_attn: bool) -> Self { method head_dim (line 105) | fn head_dim(&self) -> usize { type RotaryEmbedding (line 112) | struct RotaryEmbedding { method new (line 118) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 138) | fn apply_rotary_emb_qkv( type MLP (line 155) | struct MLP { method new (line 163) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 179) | fn forward(&self, xs: &Tensor) -> Result { function flash_attn (line 187) | fn flash_attn( function flash_attn (line 198) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type Attention (line 203) | struct Attention { method new (line 218) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 243) | fn forward( method clear_kv_cache (line 309) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 315) | struct DecoderLayer { method new (line 323) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 341) | fn forward( method clear_kv_cache (line 356) | fn clear_kv_cache(&mut self) { type Model (line 362) | pub struct Model { method new (line 373) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 397) | fn prepare_decoder_attention_mask( method embed_tokens (line 425) | pub fn embed_tokens(&self) -> &candle_nn::Embedding { method forward (line 429) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method forward_embeds (line 446) | pub fn forward_embeds( method clear_kv_cache (line 462) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/mixformer.rs constant MAX_SEQ_LEN (line 16) | const MAX_SEQ_LEN: usize = 4096; type Config (line 20) | pub struct Config { method v1 (line 35) | pub fn v1() -> Self { method v1_5 (line 51) | pub fn v1_5() -> Self { method v2 (line 67) | pub fn v2() -> Self { method puffin_phi_v2 (line 84) | pub fn puffin_phi_v2() -> Self { method phi_hermes_1_3b (line 101) | pub fn phi_hermes_1_3b() -> Self { type Embedding (line 119) | struct Embedding { method new (line 124) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 131) | fn forward(&self, xs: &Tensor) -> Result { function get_mask (line 136) | fn get_mask(size: usize, dtype: DType, device: &Device) -> Result { type RotaryEmbedding (line 144) | struct RotaryEmbedding { method new (line 150) | fn new(dim: usize, max_seq_len: usize, dtype: DType, dev: &Device) -> ... method apply_rotary_emb_qkv (line 167) | fn apply_rotary_emb_qkv( type MLP (line 195) | struct MLP { method new (line 203) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 217) | fn forward(&self, xs: &Tensor) -> Result { type CausalLMHead (line 224) | struct CausalLMHead { method new (line 230) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 238) | fn forward(&self, xs: &Tensor) -> Result { type MHA (line 247) | struct MHA { method new (line 261) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 283) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 365) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method new (line 406) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 423) | pub fn forward(&mut self, xs: &Tensor) -> Result { method forward_with_img (line 438) | pub fn forward_with_img( method clear_kv_cache (line 462) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/mixtral.rs type Config (line 29) | pub struct Config { method v0_1_8x7b (line 48) | pub fn v0_1_8x7b(use_flash_attn: bool) -> Self { type RotaryEmbedding (line 69) | struct RotaryEmbedding { method new (line 82) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 102) | fn apply_rotary_emb_qkv( function rotate_half (line 74) | fn rotate_half(xs: &Tensor) -> Result { function flash_attn (line 120) | fn flash_attn( function flash_attn (line 131) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type Attention (line 136) | struct Attention { method new (line 152) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 178) | fn forward( type BlockSparseTop2MLP (line 243) | struct BlockSparseTop2MLP { method new (line 251) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 267) | fn forward(&self, xs: &Tensor) -> Result { type SparseMoeBlock (line 275) | struct SparseMoeBlock { method new (line 282) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 299) | fn forward(&self, xs: &Tensor) -> Result { type DecoderLayer (line 358) | struct DecoderLayer { method new (line 366) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 384) | fn forward( type Model (line 403) | pub struct Model { method new (line 414) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 438) | fn prepare_decoder_attention_mask( method forward (line 467) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... FILE: candle-transformers/src/models/mmdit/blocks.rs type ModulateIntermediates (line 6) | pub struct ModulateIntermediates { type DiTBlock (line 13) | pub struct DiTBlock { method new (line 38) | pub fn new(hidden_size: usize, num_heads: usize, vb: nn::VarBuilder) -... method pre_attention (line 60) | pub fn pre_attention(&self, x: &Tensor, c: &Tensor) -> Result<(Qkv, Mo... method post_attention (line 87) | pub fn post_attention( type LayerNormNoAffine (line 21) | pub struct LayerNormNoAffine { method new (line 26) | pub fn new(eps: f64) -> Self { method forward (line 32) | fn forward(&self, x: &Tensor) -> Result { type SelfAttnModulateIntermediates (line 105) | pub struct SelfAttnModulateIntermediates { type SelfAttnDiTBlock (line 113) | pub struct SelfAttnDiTBlock { method new (line 123) | pub fn new(hidden_size: usize, num_heads: usize, vb: nn::VarBuilder) -... method pre_attention (line 147) | pub fn pre_attention( method post_attention (line 196) | pub fn post_attention( type QkvOnlyDiTBlock (line 216) | pub struct QkvOnlyDiTBlock { method new (line 223) | pub fn new(hidden_size: usize, num_heads: usize, vb: nn::VarBuilder) -... method pre_attention (line 240) | pub fn pre_attention(&self, x: &Tensor, c: &Tensor) -> Result { type FinalLayer (line 251) | pub struct FinalLayer { method new (line 258) | pub fn new( method forward (line 283) | pub fn forward(&self, x: &Tensor, c: &Tensor) -> Result { function modulate (line 296) | fn modulate(x: &Tensor, shift: &Tensor, scale: &Tensor) -> Result { type JointBlock (line 303) | pub trait JointBlock { method forward (line 304) | fn forward(&self, context: &Tensor, x: &Tensor, c: &Tensor) -> Result<... method forward (line 334) | fn forward(&self, context: &Tensor, x: &Tensor, c: &Tensor) -> Result<... method forward (line 374) | fn forward(&self, context: &Tensor, x: &Tensor, c: &Tensor) -> Result<... type MMDiTJointBlock (line 307) | pub struct MMDiTJointBlock { method new (line 315) | pub fn new( type MMDiTXJointBlock (line 347) | pub struct MMDiTXJointBlock { method new (line 355) | pub fn new( type ContextQkvOnlyJointBlock (line 390) | pub struct ContextQkvOnlyJointBlock { method new (line 398) | pub fn new( method forward (line 414) | pub fn forward(&self, context: &Tensor, x: &Tensor, c: &Tensor) -> Res... function flash_compatible_attention (line 427) | fn flash_compatible_attention( function flash_attn (line 444) | fn flash_attn( function flash_attn (line 455) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... function joint_attn (line 459) | fn joint_attn( function attn (line 480) | fn attn(qkv: &Qkv, num_heads: usize, use_flash_attn: bool) -> Result Result { type Unpatchifier (line 40) | pub struct Unpatchifier { method new (line 46) | pub fn new(patch_size: usize, out_channels: usize) -> Result { method unpatchify (line 53) | pub fn unpatchify(&self, x: &Tensor, h: usize, w: usize) -> Result Result Resu... method forward (line 172) | fn forward(&self, t: &Tensor) -> Result { type VectorEmbedder (line 178) | pub struct VectorEmbedder { method new (line 183) | pub fn new(input_dim: usize, hidden_size: usize, vb: nn::VarBuilder) -... method forward (line 194) | fn forward(&self, x: &Tensor) -> Result { FILE: candle-transformers/src/models/mmdit/model.rs type Config (line 18) | pub struct Config { method sd3_medium (line 31) | pub fn sd3_medium() -> Self { method sd3_5_medium (line 45) | pub fn sd3_5_medium() -> Self { method sd3_5_large (line 59) | pub fn sd3_5_large() -> Self { type MMDiT (line 74) | pub struct MMDiT { method new (line 85) | pub fn new(cfg: &Config, use_flash_attn: bool, vb: nn::VarBuilder) -> ... method forward (line 133) | pub fn forward( type MMDiTCore (line 166) | pub struct MMDiTCore { method new (line 173) | pub fn new( method forward (line 221) | pub fn forward( FILE: candle-transformers/src/models/mmdit/projections.rs type Qkv (line 4) | pub struct Qkv { type Mlp (line 10) | pub struct Mlp { method new (line 17) | pub fn new( method forward (line 31) | fn forward(&self, x: &Tensor) -> Result { type QkvOnlyAttnProjections (line 38) | pub struct QkvOnlyAttnProjections { method new (line 44) | pub fn new(dim: usize, num_heads: usize, vb: nn::VarBuilder) -> Result... method pre_attention (line 50) | pub fn pre_attention(&self, x: &Tensor) -> Result { type AttnProjections (line 56) | pub struct AttnProjections { method new (line 65) | pub fn new(dim: usize, num_heads: usize, vb: nn::VarBuilder) -> Result... method pre_attention (line 85) | pub fn pre_attention(&self, x: &Tensor) -> Result { method post_attention (line 107) | pub fn post_attention(&self, x: &Tensor) -> Result { function split_qkv (line 112) | fn split_qkv(qkv: &Tensor, head_dim: usize) -> Result { FILE: candle-transformers/src/models/mobileclip.rs type MobileClipModel (line 23) | pub struct MobileClipModel { method new (line 59) | pub fn new(vs: VarBuilder, c: &MobileClipConfig) -> Result { method get_text_features (line 75) | pub fn get_text_features(&self, input_ids: &Tensor) -> Result { method get_image_features (line 81) | pub fn get_image_features(&self, pixel_values: &Tensor) -> Result Re... type MobileClipConfig (line 31) | pub struct MobileClipConfig { method s1 (line 38) | pub fn s1() -> Self { method s2 (line 47) | pub fn s2() -> Self { function div_l2_norm (line 98) | pub fn div_l2_norm(v: &Tensor) -> Result { FILE: candle-transformers/src/models/mobilenetv4.rs type BlockType (line 19) | enum BlockType { type Config (line 49) | pub struct Config { method small (line 57) | pub fn small() -> Self { method medium (line 93) | pub fn medium() -> Self { method hybrid_medium (line 136) | pub fn hybrid_medium() -> Self { method large (line 188) | pub fn large() -> Self { method hybrid_large (line 235) | pub fn hybrid_large() -> Self { function depthwise_conv (line 293) | fn depthwise_conv( function pointwise_conv (line 313) | fn pointwise_conv( function universal_inverted_bottleneck_block (line 330) | fn universal_inverted_bottleneck_block( function conv_block (line 393) | fn conv_block( function edge_residual_block (line 416) | fn edge_residual_block( function reshape_kv (line 467) | fn reshape_kv(t: &Tensor) -> Result { function reshape_query (line 477) | fn reshape_query(t: &Tensor, heads: usize, kv_dim: usize) -> Result Resul... function mqa_block (line 499) | fn mqa_block( function mobilenetv4_stem (line 629) | fn mobilenetv4_stem(cfg: &Config, vb: VarBuilder) -> Result Result Res... function mobilenetv4_no_final_layer (line 803) | pub fn mobilenetv4_no_final_layer(cfg: &Config, vb: VarBuilder) -> Resul... FILE: candle-transformers/src/models/mobileone.rs type StageConfig (line 13) | struct StageConfig { constant STAGES (line 20) | const STAGES: [StageConfig; 5] = [ type Config (line 44) | pub struct Config { method s0 (line 52) | pub fn s0() -> Self { method s1 (line 58) | pub fn s1() -> Self { method s2 (line 64) | pub fn s2() -> Self { method s3 (line 70) | pub fn s3() -> Self { method s4 (line 76) | pub fn s4() -> Self { function squeeze_and_excitation (line 85) | fn squeeze_and_excitation( function fuse_conv_bn (line 108) | fn fuse_conv_bn(weights: &Tensor, bn: BatchNorm) -> Result<(Tensor, Tens... function mobileone_block (line 124) | fn mobileone_block( function output_channels_per_stage (line 223) | fn output_channels_per_stage(cfg: &Config, stage: usize) -> usize { function mobileone_stage (line 235) | fn mobileone_stage(cfg: &Config, idx: usize, vb: VarBuilder) -> Result Resul... function mobileone_no_final_layer (line 332) | pub fn mobileone_no_final_layer(cfg: &Config, vb: VarBuilder) -> Result<... FILE: candle-transformers/src/models/modernbert.rs type Config (line 21) | pub struct Config { type ClassifierPooling (line 41) | pub enum ClassifierPooling { type ClassifierConfig (line 48) | pub struct ClassifierConfig { type RotaryEmbedding (line 55) | struct RotaryEmbedding { method new (line 61) | fn new(dtype: DType, config: &Config, rope_theta: f64, dev: &Device) -... method apply_rotary_emb_qkv (line 80) | fn apply_rotary_emb_qkv(&self, q: &Tensor, k: &Tensor) -> Result<(Tens... type ModernBertAttention (line 88) | struct ModernBertAttention { method load (line 97) | fn load(vb: VarBuilder, config: &Config, rotary_emb: Arc ... type ModernBertMLP (line 152) | pub struct ModernBertMLP { method load (line 158) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 170) | fn forward(&self, xs: &Tensor) -> Result { type ModernBertLayer (line 179) | pub struct ModernBertLayer { method load (line 188) | fn load( method forward (line 213) | fn forward( type ModernBertHead (line 239) | pub struct ModernBertHead { method load (line 245) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 253) | fn forward(&self, xs: &Tensor) -> Result { type ModernBertDecoder (line 260) | pub struct ModernBertDecoder { method load (line 265) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 278) | fn forward(&self, xs: &Tensor) -> Result { function prepare_4d_attention_mask (line 285) | fn prepare_4d_attention_mask( function get_local_attention_mask (line 306) | fn get_local_attention_mask( type ModernBert (line 327) | pub struct ModernBert { method load (line 336) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 390) | pub fn forward(&self, xs: &Tensor, mask: &Tensor) -> Result { type ModernBertForMaskedLM (line 407) | pub struct ModernBertForMaskedLM { method load (line 414) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 425) | pub fn forward(&self, xs: &Tensor, mask: &Tensor) -> Result { type ModernBertClassifier (line 436) | pub struct ModernBertClassifier { method load (line 441) | fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 457) | fn forward(&self, xs: &Tensor) -> Result { type ModernBertForSequenceClassification (line 464) | pub struct ModernBertForSequenceClassification { method load (line 472) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 488) | pub fn forward(&self, xs: &Tensor, mask: &Tensor) -> Result { FILE: candle-transformers/src/models/moondream.rs type Config (line 44) | pub struct Config { method v2 (line 50) | pub fn v2() -> Self { function scaled_dot_product_attention (line 58) | fn scaled_dot_product_attention(q: &Tensor, k: &Tensor, v: &Tensor) -> R... type VisionConfig (line 66) | pub struct VisionConfig { method v2 (line 79) | pub fn v2() -> Self { type LinearPatchEmbedding (line 95) | struct LinearPatchEmbedding { method new (line 100) | fn new(vb: VarBuilder) -> Result { method forward (line 107) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 113) | struct Attention { method new (line 122) | pub fn new(vb: VarBuilder, dim: usize, num_heads: usize) -> Result Result { type VitBlock (line 156) | struct VitBlock { method new (line 165) | fn new(vb: VarBuilder, dim: usize, num_heads: usize, cfg: &VisionConfi... method forward (line 181) | fn forward(&self, xs: &Tensor) -> Result { type VisionTransformer (line 192) | struct VisionTransformer { method new (line 201) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 226) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 237) | pub struct Encoder { method new (line 242) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 249) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 255) | struct Mlp { method new (line 263) | fn new( method forward (line 282) | fn forward(&self, xs: &Tensor) -> Result { type VisionProjection (line 289) | struct VisionProjection { method new (line 294) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 307) | fn forward(&self, xs: &Tensor) -> Result { type VisionEncoder (line 313) | pub struct VisionEncoder { method new (line 319) | pub fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 330) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 344) | pub struct Model { method new (line 350) | pub fn new(config: &Config, vb: VarBuilder) -> Result { method vision_encoder (line 359) | pub fn vision_encoder(&self) -> &VisionEncoder { method text_model (line 363) | pub fn text_model(&mut self) -> &mut PhiModel { FILE: candle-transformers/src/models/mpt.rs type Config (line 17) | pub struct Config { method replit_code_v1_5_3b (line 31) | pub fn replit_code_v1_5_3b() -> Self { method is_causal (line 46) | pub fn is_causal(&self) -> bool { type GroupedQueryAttention (line 52) | struct GroupedQueryAttention { method new (line 66) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 87) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 161) | fn forward(&self, xs: &Tensor) -> Result { type MPTBlock (line 167) | struct MPTBlock { method new (line 175) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 192) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { type Model (line 238) | pub struct Model { method new (line 245) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 265) | pub fn forward(&mut self, xs: &Tensor) -> Result { function get_mask (line 286) | pub(crate) fn get_mask(size: usize, device: &Device) -> Result { function masked_fill (line 293) | pub(crate) fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32... FILE: candle-transformers/src/models/nomic_bert.rs type Config (line 22) | pub struct Config { method head_dim (line 67) | fn head_dim(&self) -> usize { method rotary_emb_dim (line 71) | fn rotary_emb_dim(&self) -> usize { method default (line 43) | fn default() -> Self { type RotaryEmbedding (line 79) | struct RotaryEmbedding { method new (line 86) | fn new( method apply (line 114) | fn apply(&self, x: &Tensor) -> Result { type NomicBertEmbeddings (line 128) | struct NomicBertEmbeddings { method new (line 135) | fn new(vb: VarBuilder, config: &Config) -> Result { method forward (line 154) | fn forward(&self, input_ids: &Tensor, token_type_ids: Option<&Tensor>)... type NomicBertAttention (line 175) | struct NomicBertAttention { method new (line 185) | fn new(vb: VarBuilder, config: &Config) -> Result { method forward (line 208) | fn forward( type NomicBertSwiGLU (line 256) | struct NomicBertSwiGLU { method new (line 264) | fn new(vb: VarBuilder, config: &Config) -> Result { method forward (line 291) | fn forward(&self, xs: &Tensor) -> Result { type NomicBertBlock (line 302) | struct NomicBertBlock { method new (line 312) | fn new(vb: VarBuilder, config: &Config) -> Result { method forward (line 327) | fn forward( type NomicBertEncoder (line 358) | struct NomicBertEncoder { method new (line 365) | fn new(vb: VarBuilder, config: &Config) -> Result { method forward (line 383) | fn forward(&self, hidden_states: &Tensor, attention_mask: &Tensor) -> ... function get_extended_attention_mask (line 396) | fn get_extended_attention_mask(attention_mask: &Tensor, dtype: DType) ->... type NomicBertModel (line 409) | pub struct NomicBertModel { method load (line 418) | pub fn load(vb: VarBuilder, config: &Config) -> Result { method forward (line 442) | pub fn forward( function mean_pooling (line 467) | pub fn mean_pooling(hidden_states: &Tensor, attention_mask: &Tensor) -> ... function l2_normalize (line 483) | pub fn l2_normalize(x: &Tensor) -> Result { FILE: candle-transformers/src/models/nvembed_v2/embedding.rs type RotaryEmbedding (line 12) | struct RotaryEmbedding { method new (line 18) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 38) | fn apply_rotary_emb_qkv( type MLP (line 55) | struct MLP { method new (line 63) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 79) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 87) | struct Attention { method new (line 101) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 125) | fn forward( type DecoderLayer (line 175) | struct DecoderLayer { method new (line 183) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 201) | fn forward( type Model (line 220) | pub struct Model { method new (line 228) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 248) | pub fn forward( function prepare_4d_attention_mask (line 268) | fn prepare_4d_attention_mask( function get_dtype_min_val (line 288) | fn get_dtype_min_val(dtype: DType) -> f64 { FILE: candle-transformers/src/models/nvembed_v2/model.rs type GeGlu (line 11) | struct GeGlu { method new (line 17) | fn new(vs: VarBuilder, dim_in: usize, dim_out: usize) -> Result { method forward (line 25) | fn forward(&self, xs: &Tensor) -> Result { type FeedForward (line 33) | struct FeedForward { method new (line 40) | fn new(vs: VarBuilder, dim: usize, dim_out: Option, mult: usize... method forward (line 56) | fn forward(&self, xs: &Tensor) -> Result { type CrossAttention (line 65) | struct CrossAttention { method new (line 77) | fn new( method reshape_heads_to_batch_dim (line 105) | fn reshape_heads_to_batch_dim(&self, xs: &Tensor) -> Result { method reshape_batch_dim_to_heads (line 112) | fn reshape_batch_dim_to_heads(&self, xs: &Tensor) -> Result { method attention (line 119) | fn attention(&self, query: &Tensor, key: &Tensor, value: &Tensor) -> R... method forward (line 136) | fn forward(&self, xs: &Tensor, context: Option<&Tensor>) -> Result Result { method forward (line 204) | pub fn forward( FILE: candle-transformers/src/models/olmo.rs type Config (line 22) | pub struct Config { type RotaryEmbedding (line 38) | struct RotaryEmbedding { method new (line 44) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 63) | fn apply_rotary_emb_qkv( type MLP (line 80) | struct MLP { method new (line 88) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 104) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 112) | struct Attention { method new (line 128) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 156) | fn forward( method clear_kv_cache (line 223) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 229) | struct DecoderLayer { method new (line 237) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 251) | fn forward( method clear_kv_cache (line 266) | fn clear_kv_cache(&mut self) { type Model (line 272) | pub struct Model { method new (line 282) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 310) | fn prepare_decoder_attention_mask( method forward (line 331) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 348) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/olmo2.rs type Config (line 13) | pub struct Config { type RotaryEmbedding (line 30) | struct RotaryEmbedding { method new (line 36) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 55) | fn apply_rotary_emb_qkv( type MLP (line 72) | struct MLP { method new (line 80) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 96) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 104) | struct Attention { method new (line 121) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 151) | fn forward( method clear_kv_cache (line 211) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 217) | struct DecoderLayer { method new (line 225) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 246) | fn forward( method clear_kv_cache (line 262) | fn clear_kv_cache(&mut self) { type Model (line 268) | pub struct Model { method new (line 278) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 305) | fn prepare_decoder_attention_mask( method forward (line 326) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 343) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/openclip/text_model.rs type Config (line 11) | pub struct Config { method vit_base_patch32 (line 23) | pub fn vit_base_patch32() -> Self { type TextEmbeddings (line 38) | struct TextEmbeddings { method new (line 44) | fn new(vs: VarBuilder, c: &Config) -> Result { method forward (line 58) | fn forward(&self, input_ids: &Tensor) -> Result { type Attention (line 69) | struct Attention { method new (line 80) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method shape_multihead (line 113) | fn shape_multihead(&self, xs: &Tensor, bsz: usize, seq_len: usize) -> ... method forward (line 120) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 144) | struct Mlp { method new (line 150) | fn new(vs: VarBuilder, c: &Config) -> Result { method forward (line 159) | fn forward(&self, xs: &Tensor) -> Result { type EncoderLayer (line 166) | struct EncoderLayer { method new (line 174) | fn new(vs: VarBuilder, c: &Config) -> Result { method forward (line 188) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 203) | pub struct Encoder { method new (line 208) | pub fn new(vs: VarBuilder, c: &Config) -> Result { method forward (line 218) | pub fn forward(&self, xs: &Tensor) -> Result { type OpenClipTextTransformer (line 229) | pub struct OpenClipTextTransformer { method new (line 236) | pub fn new(vs: VarBuilder, c: &Config) -> Result { method forward (line 247) | pub fn forward(&self, input_ids: &Tensor) -> Result { method forward (line 255) | fn forward(&self, input_ids: &Tensor) -> Result { FILE: candle-transformers/src/models/paddleocr_vl/config.rs function default_vision_hidden_size (line 8) | fn default_vision_hidden_size() -> usize { function default_vision_intermediate_size (line 12) | fn default_vision_intermediate_size() -> usize { function default_vision_num_hidden_layers (line 16) | fn default_vision_num_hidden_layers() -> usize { function default_vision_num_attention_heads (line 20) | fn default_vision_num_attention_heads() -> usize { function default_vision_num_channels (line 24) | fn default_vision_num_channels() -> usize { function default_vision_image_size (line 28) | fn default_vision_image_size() -> usize { function default_vision_patch_size (line 32) | fn default_vision_patch_size() -> usize { function default_vision_hidden_act (line 36) | fn default_vision_hidden_act() -> Activation { function default_vision_layer_norm_eps (line 40) | fn default_vision_layer_norm_eps() -> f64 { function default_vision_attention_dropout (line 44) | fn default_vision_attention_dropout() -> f64 { function default_vision_spatial_merge_size (line 48) | fn default_vision_spatial_merge_size() -> usize { type VisionConfig (line 56) | pub struct VisionConfig { method head_dim (line 110) | pub fn head_dim(&self) -> usize { method default (line 92) | fn default() -> Self { function default_vocab_size (line 115) | fn default_vocab_size() -> usize { function default_hidden_size (line 119) | fn default_hidden_size() -> usize { function default_intermediate_size (line 123) | fn default_intermediate_size() -> usize { function default_num_hidden_layers (line 127) | fn default_num_hidden_layers() -> usize { function default_num_attention_heads (line 131) | fn default_num_attention_heads() -> usize { function default_num_key_value_heads (line 135) | fn default_num_key_value_heads() -> usize { function default_hidden_act (line 139) | fn default_hidden_act() -> Activation { function default_max_position_embeddings (line 143) | fn default_max_position_embeddings() -> usize { function default_rms_norm_eps (line 147) | fn default_rms_norm_eps() -> f64 { function default_rope_theta (line 151) | fn default_rope_theta() -> f64 { function default_head_dim (line 155) | fn default_head_dim() -> usize { function default_use_bias (line 159) | fn default_use_bias() -> bool { function default_tie_word_embeddings (line 163) | fn default_tie_word_embeddings() -> bool { function default_image_token_id (line 167) | fn default_image_token_id() -> u32 { function default_video_token_id (line 171) | fn default_video_token_id() -> u32 { function default_vision_start_token_id (line 175) | fn default_vision_start_token_id() -> u32 { function default_vision_end_token_id (line 179) | fn default_vision_end_token_id() -> u32 { function default_tokens_per_second (line 183) | fn default_tokens_per_second() -> usize { type RopeScaling (line 189) | pub struct RopeScaling { function default_mrope_section (line 200) | fn default_mrope_section() -> Vec { method default (line 205) | fn default() -> Self { type Config (line 218) | pub struct Config { method default (line 286) | fn default() -> Self { type TextConfig (line 315) | pub struct TextConfig { method from (line 334) | fn from(cfg: &Config) -> Self { FILE: candle-transformers/src/models/paddleocr_vl/mod.rs type GenerateDebugOutput (line 40) | pub type GenerateDebugOutput = (Vec, Vec Result { method encode_image (line 92) | pub fn encode_image(&self, pixel_values: &Tensor, grid_thw: &Tensor) -... method encode_image_debug (line 97) | pub fn encode_image_debug(&self, pixel_values: &Tensor, grid_thw: &Ten... method encode_image_with_export (line 104) | pub fn encode_image_with_export( method encode_images_multi (line 120) | pub fn encode_images_multi( method encode_images_separate (line 139) | pub fn encode_images_separate( method forward (line 164) | pub fn forward( method forward_multi_image (line 275) | pub fn forward_multi_image( method forward_multi_image_separate (line 392) | pub fn forward_multi_image_separate( method generate (line 511) | pub fn generate( method generate_multi_image (line 572) | pub fn generate_multi_image( method generate_multi_image_separate (line 637) | pub fn generate_multi_image_separate( method forward_video (line 703) | pub fn forward_video( method generate_video (line 814) | pub fn generate_video( method clear_kv_cache (line 896) | pub fn clear_kv_cache(&mut self) { method forward_with_decoder_export (line 908) | pub fn forward_with_decoder_export( method generate_debug (line 1003) | pub fn generate_debug( FILE: candle-transformers/src/models/paddleocr_vl/text.rs type RotaryEmbedding (line 24) | pub struct RotaryEmbedding { method new (line 35) | pub fn new(cfg: &TextConfig, device: &Device, dtype: DType) -> Result<... method apply_multimodal_rotary_emb (line 74) | pub fn apply_multimodal_rotary_emb( method compute_3d_rope_embeddings (line 109) | fn compute_3d_rope_embeddings(&self, position_ids: &Tensor) -> Result<... method apply_mrope_sections (line 158) | fn apply_mrope_sections(&self, cos_3d: &Tensor, sin_3d: &Tensor) -> Re... method apply_rope_to_tensor (line 194) | fn apply_rope_to_tensor(&self, x: &Tensor, cos: &Tensor, sin: &Tensor)... method apply_multimodal_rotary_emb_with_export (line 212) | pub fn apply_multimodal_rotary_emb_with_export( type ImageGrid (line 258) | pub struct ImageGrid { function compute_mrope_position_ids_multi (line 288) | pub fn compute_mrope_position_ids_multi( function compute_mrope_position_ids (line 422) | pub fn compute_mrope_position_ids( type VideoGrid (line 509) | pub struct VideoGrid { function compute_mrope_position_ids_video (line 541) | pub fn compute_mrope_position_ids_video( type Mlp (line 665) | struct Mlp { method new (line 673) | fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method forward (line 687) | fn forward(&self, xs: &Tensor) -> Result { method forward_with_export (line 694) | fn forward_with_export( type Attention (line 726) | struct Attention { method new (line 741) | fn new(rotary_emb: Arc, cfg: &TextConfig, vb: VarBuil... method forward_with_mrope (line 789) | fn forward_with_mrope( method compute_attention (line 829) | fn compute_attention( method forward_with_mrope_export (line 888) | pub fn forward_with_mrope_export( method clear_kv_cache (line 992) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 998) | struct DecoderLayer { method new (line 1006) | fn new(rotary_emb: Arc, cfg: &TextConfig, vb: VarBuil... method forward_with_mrope (line 1025) | fn forward_with_mrope( method forward_with_mrope_export (line 1045) | fn forward_with_mrope_export( method clear_kv_cache (line 1092) | fn clear_kv_cache(&mut self) { type TextModel (line 1098) | pub struct TextModel { method new (line 1109) | pub fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method embed_tokens (line 1143) | pub fn embed_tokens(&self, input_ids: &Tensor) -> Result { method prepare_causal_attention_mask (line 1148) | fn prepare_causal_attention_mask( method forward_embeds_with_mrope (line 1172) | pub fn forward_embeds_with_mrope( method clear_kv_cache (line 1200) | pub fn clear_kv_cache(&mut self) { method forward_embeds_with_mrope_export (line 1210) | pub fn forward_embeds_with_mrope_export( FILE: candle-transformers/src/models/paddleocr_vl/vision.rs constant DEFAULT_POS_EMBED_CACHE_SIZE (line 13) | const DEFAULT_POS_EMBED_CACHE_SIZE: usize = 16; type PosEmbedCache (line 20) | struct PosEmbedCache { method new (line 30) | fn new(max_size: usize) -> Self { method get (line 39) | fn get(&mut self, key: (usize, usize)) -> Option { method insert (line 49) | fn insert(&mut self, key: (usize, usize), tensor: Tensor) { method clear (line 72) | fn clear(&mut self) { type PatchEmbedding (line 88) | struct PatchEmbedding { method new (line 100) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method interpolate_pos_encoding (line 143) | fn interpolate_pos_encoding(&self, target_h: usize, target_w: usize) -... method forward (line 234) | fn forward(&self, xs: &Tensor) -> Result { type VisionRotaryEmbedding (line 253) | struct VisionRotaryEmbedding { constant THETA (line 258) | const THETA: f32 = 10000.0; method new (line 260) | fn new(dim: usize, device: &Device) -> Result { method make_embeds (line 271) | fn make_embeds(&self, seqlen: usize) -> Result { function rotate_half (line 278) | fn rotate_half(xs: &Tensor) -> Result { function apply_rotary_pos_emb_vision (line 285) | fn apply_rotary_pos_emb_vision( constant ATTENTION_TILE_SIZE (line 301) | const ATTENTION_TILE_SIZE: usize = 512; function chunked_attention (line 318) | fn chunked_attention(q: &Tensor, k: &Tensor, v: &Tensor, scale: f64) -> ... type VisionMlp (line 390) | struct VisionMlp { method new (line 397) | fn new( method forward (line 410) | fn forward(&self, xs: &Tensor) -> Result { type VisionAttention (line 423) | struct VisionAttention { method new (line 434) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 449) | fn forward( method forward_with_debug (line 460) | fn forward_with_debug( method forward_impl (line 471) | fn forward_impl( type VisionBlock (line 575) | struct VisionBlock { method new (line 583) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 601) | fn forward( method forward_with_debug (line 616) | fn forward_with_debug( type Projector (line 673) | pub struct Projector { method new (line 682) | pub fn new(cfg: &VisionConfig, text_hidden_size: usize, vb: VarBuilder... method forward (line 711) | pub fn forward(&self, xs: &Tensor, grid_thw: &Tensor) -> Result { method forward_multi (line 786) | pub fn forward_multi(&self, xs: &Tensor, grid_thw: &Tensor) -> Result<... type VisionModel (line 853) | pub struct VisionModel { method new (line 864) | pub fn new( method rot_pos_emb (line 909) | fn rot_pos_emb(&self, grid_thw: &Tensor) -> Result { method build_cu_seqlens (line 959) | fn build_cu_seqlens(&self, grid_thw: &Tensor) -> Result> { method forward (line 982) | pub fn forward(&self, pixel_values: &Tensor, grid_thw: &Tensor) -> Res... method forward_with_debug (line 987) | pub fn forward_with_debug( method forward_multi (line 1077) | pub fn forward_multi(&self, pixel_values: &Tensor, grid_thw: &Tensor) ... method forward_with_export (line 1114) | pub fn forward_with_export( FILE: candle-transformers/src/models/paligemma.rs type Config (line 22) | pub struct Config { method paligemma_3b_224 (line 29) | pub fn paligemma_3b_224() -> Self { method paligemma_3b_448 (line 53) | pub fn paligemma_3b_448() -> Self { type MultiModalProjector (line 78) | pub struct MultiModalProjector { method new (line 83) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 94) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 100) | pub struct Model { method new (line 108) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method setup (line 124) | pub fn setup(&mut self, pixel_values: &Tensor, input_ids: &Tensor) -> ... method forward (line 137) | pub fn forward(&mut self, input_ids: &Tensor) -> Result { method forward_without_projection (line 144) | pub fn forward_without_projection(&mut self, input_ids: &Tensor) -> Re... method setup_without_projection (line 150) | pub fn setup_without_projection( method clear_kv_cache (line 166) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/parler_tts.rs type DecoderConfig (line 24) | pub struct DecoderConfig { type Config (line 45) | pub struct Config { type Attention (line 55) | pub struct Attention { method new (line 70) | fn new( method forward (line 101) | fn forward( method clear_kv_cache (line 158) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 164) | pub struct DecoderLayer { method new (line 176) | fn new(cfg: &DecoderConfig, vb: VarBuilder) -> Result { method forward (line 201) | fn forward( method clear_kv_cache (line 232) | fn clear_kv_cache(&mut self) { type Decoder (line 239) | pub struct Decoder { method new (line 251) | pub fn new(cfg: &DecoderConfig, vb: VarBuilder) -> Result { method forward (line 289) | pub fn forward( method clear_kv_cache (line 331) | pub fn clear_kv_cache(&mut self) { type Model (line 339) | pub struct Model { method new (line 350) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method generate (line 383) | pub fn generate( method prepare_causal_mask (line 454) | fn prepare_causal_mask( FILE: candle-transformers/src/models/persimmon.rs constant DTYPE (line 18) | pub const DTYPE: DType = DType::F32; type PositionEmbeddingType (line 22) | pub enum PositionEmbeddingType { type Config (line 29) | pub struct Config { method base_8b (line 49) | pub fn base_8b() -> Self { FILE: candle-transformers/src/models/phi.rs type Config (line 27) | pub struct Config { method num_key_value_heads (line 44) | fn num_key_value_heads(&self) -> usize { method head_dim (line 48) | fn head_dim(&self) -> usize { type RotaryEmbedding (line 54) | struct RotaryEmbedding { method new (line 61) | fn new(cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb (line 80) | fn apply_rotary_emb(&self, xs: &Tensor, seqlen_offset: usize) -> Resul... type MLP (line 93) | struct MLP { method new (line 100) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 114) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 120) | struct Attention { method new (line 151) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method repeat_kv (line 186) | fn repeat_kv(&self, xs: Tensor) -> Result { method forward (line 190) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { function masked_fill (line 143) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type DecoderLayer (line 271) | struct DecoderLayer { method new (line 279) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 295) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 344) | pub fn forward(&mut self, xs: &Tensor) -> Result { method clear_kv_cache (line 362) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/phi3.rs type RopeScalingType (line 28) | pub enum RopeScalingType { type RopeScaling (line 34) | pub struct RopeScaling { type Config (line 43) | pub struct Config { method head_dim (line 64) | pub fn head_dim(&self) -> usize { type RotaryEmbedding (line 70) | pub struct RotaryEmbedding { method new (line 77) | pub fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method rope (line 140) | fn rope(&self, xs: &Tensor, cos: &Tensor, sin: &Tensor) -> Result, cfg: &Config, vb: VarBuilder)... method forward (line 200) | fn forward( method clear_kv_cache (line 263) | fn clear_kv_cache(&mut self) { type Mlp (line 269) | struct Mlp { method new (line 277) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 292) | fn forward(&self, xs: &Tensor) -> Result { type DecoderLayer (line 302) | struct DecoderLayer { method new (line 310) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 328) | fn forward( method clear_kv_cache (line 343) | fn clear_kv_cache(&mut self) { type Model (line 349) | pub struct Model { method new (line 359) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 386) | fn prepare_decoder_attention_mask( method forward (line 406) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 423) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/pixtral/llava.rs type Config (line 8) | pub struct Config { type MultiModalProjector (line 17) | pub struct MultiModalProjector { method new (line 24) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 37) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 45) | pub struct Model { method new (line 55) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 75) | pub fn clear_kv_cache(&mut self) { method encode_image (line 80) | pub fn encode_image(&self, image: &Tensor) -> Result { method lm_forward (line 85) | pub fn lm_forward(&mut self, input_ids: &Tensor) -> Result { method lm_forward_embeds (line 92) | pub fn lm_forward_embeds(&mut self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/pixtral/vision_model.rs function default_act (line 4) | fn default_act() -> candle_nn::Activation { function default_hidden_size (line 8) | fn default_hidden_size() -> usize { function default_intermediate_size (line 12) | fn default_intermediate_size() -> usize { function default_num_channels (line 16) | fn default_num_channels() -> usize { function default_num_hidden_layers (line 20) | fn default_num_hidden_layers() -> usize { function default_num_attention_heads (line 24) | fn default_num_attention_heads() -> usize { type Config (line 29) | pub struct Config { method pixtral_12b_2409 (line 49) | pub fn pixtral_12b_2409() -> Self { method head_dim (line 65) | fn head_dim(&self) -> usize { type Attention (line 72) | struct Attention { method new (line 83) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 103) | fn forward( type Mlp (line 139) | struct Mlp { method new (line 147) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 162) | fn forward(&self, xs: &Tensor) -> Result { type AttentionLayer (line 169) | struct AttentionLayer { method new (line 177) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 190) | fn forward( type Transformer (line 212) | struct Transformer { method new (line 217) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 227) | fn forward( type RotaryEmbedding (line 243) | struct RotaryEmbedding { method new (line 249) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method apply_rotary_emb_qkv (line 280) | fn apply_rotary_emb_qkv( type Model (line 301) | pub struct Model { method new (line 310) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method position_ids_in_meshgrid (line 336) | pub fn position_ids_in_meshgrid( method forward (line 351) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/quantized_blip.rs type VisionConfig (line 23) | pub type VisionConfig = super::blip::VisionConfig; type Config (line 24) | pub type Config = super::blip::Config; type VisionEmbeddings (line 27) | struct VisionEmbeddings { method new (line 34) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 69) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 85) | struct Attention { method new (line 93) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 108) | fn forward(&self, xs: &Tensor, attn_mask: Option<&Tensor>) -> Result Result { method forward (line 153) | fn forward(&self, xs: &Tensor) -> Result { type EncoderLayer (line 161) | struct EncoderLayer { method new (line 169) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 183) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type Encoder (line 196) | struct Encoder { method new (line 201) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 211) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type VisionModel (line 221) | pub struct VisionModel { method new (line 228) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 242) | fn forward(&self, xs: &Tensor) -> Result { type BlipForConditionalGeneration (line 251) | pub struct BlipForConditionalGeneration { method new (line 257) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method vision_model (line 267) | pub fn vision_model(&self) -> &VisionModel { method text_decoder (line 271) | pub fn text_decoder(&mut self) -> &mut blip_text::TextLMHeadModel { method reset_kv_cache (line 274) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/quantized_blip_text.rs type Config (line 24) | pub type Config = super::blip_text::Config; type TextEmbeddings (line 27) | struct TextEmbeddings { method new (line 35) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 54) | fn forward(&self, xs: &Tensor, past_kv_len: usize) -> Result { type TextSelfAttention (line 64) | struct TextSelfAttention { method new (line 75) | fn new(cfg: &Config, is_cross_attention: bool, vb: VarBuilder) -> Resu... method transpose_for_scores (line 99) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method reset_kv_cache (line 110) | fn reset_kv_cache(&mut self) { method forward (line 114) | fn forward( type TextSelfOutput (line 162) | struct TextSelfOutput { method new (line 168) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 174) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type TextAttention (line 180) | struct TextAttention { method new (line 186) | fn new(cfg: &Config, is_cross_attention: bool, vb: VarBuilder) -> Resu... method reset_kv_cache (line 192) | fn reset_kv_cache(&mut self) { method forward (line 196) | fn forward( type TextIntermediate (line 210) | struct TextIntermediate { method new (line 216) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 226) | fn forward(&self, xs: &Tensor) -> Result { type TextOutput (line 232) | struct TextOutput { method new (line 238) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 244) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type TextLayer (line 250) | struct TextLayer { method new (line 258) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 275) | fn reset_kv_cache(&mut self) { method forward (line 282) | fn forward( type TextEncoder (line 299) | struct TextEncoder { method new (line 304) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method reset_kv_cache (line 314) | fn reset_kv_cache(&mut self) { method forward (line 318) | fn forward( type TextPooler (line 333) | pub struct TextPooler { method new (line 338) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 345) | fn forward(&self, xs: &Tensor) -> Result { type TextPredictionHeadTransform (line 354) | struct TextPredictionHeadTransform { method new (line 361) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 373) | fn forward(&self, xs: &Tensor) -> Result { type TextLMPredictionHead (line 381) | struct TextLMPredictionHead { method new (line 387) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 397) | fn forward(&self, xs: &Tensor) -> Result { type TextOnlyMLMHead (line 403) | struct TextOnlyMLMHead { method new (line 408) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 415) | fn forward(&self, xs: &Tensor) -> Result { type TextModel (line 421) | struct TextModel { method new (line 429) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 439) | fn forward( method reset_kv_cache (line 455) | fn reset_kv_cache(&mut self) { type TextLMHeadModel (line 462) | pub struct TextLMHeadModel { method new (line 468) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 474) | pub fn forward( method reset_kv_cache (line 490) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/quantized_gemma3.rs constant MAX_SEQ_LEN (line 24) | pub const MAX_SEQ_LEN: usize = 131072; constant DEFAULT_SLIDING_WINDOW_TYPE (line 25) | pub const DEFAULT_SLIDING_WINDOW_TYPE: usize = 6; constant DEFAULT_ROPE_FREQUENCY (line 26) | pub const DEFAULT_ROPE_FREQUENCY: f32 = 1_000_000.; constant DEFAULT_ROPE_FREQUENCY_SLIDING (line 27) | pub const DEFAULT_ROPE_FREQUENCY_SLIDING: f32 = 10_000.; constant DEFAULT_ROPE_FREQUENCY_SCALE_FACTOR (line 28) | pub const DEFAULT_ROPE_FREQUENCY_SCALE_FACTOR: f32 = 1.; type QMatMul (line 31) | struct QMatMul { method from_qtensor (line 37) | fn from_qtensor(qtensor: QTensor) -> Result { method forward (line 43) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 50) | struct Mlp { method forward (line 57) | fn forward(&self, xs: &Tensor) -> Result { type RotaryEmbedding (line 67) | struct RotaryEmbedding { method new (line 73) | fn new(head_dim: usize, rope_frequency: f32, device: &Device) -> Resul... method apply_rotary_emb_qkv (line 88) | fn apply_rotary_emb_qkv( type LayerWeights (line 104) | struct LayerWeights { method mask (line 144) | fn mask( method forward_attn (line 180) | fn forward_attn( type ModelWeights (line 250) | pub struct ModelWeights { method from_gguf (line 261) | pub fn from_gguf( method forward (line 439) | pub fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result { function new (line 24) | fn new(ct: gguf_file::Content, reader: R, device: Device) -> Self { function qmatmul (line 28) | fn qmatmul(&mut self, name: &str) -> Result { function rms_norm (line 33) | fn rms_norm(&mut self, name: &str, eps: f64) -> Result { function metadata (line 38) | fn metadata(&self) -> &std::collections::HashMap Result { function unquantized_tensor (line 46) | fn unquantized_tensor(&mut self, name: &str, dtype: DType) -> Option(gg: &mut Gguf, prefix: &str) -> Result { method forward (line 78) | fn forward(&self, xs: &Tensor) -> Result { type RotaryEmbedding (line 93) | pub(crate) struct RotaryEmbedding { method new (line 100) | pub(crate) fn new( method apply (line 131) | pub(crate) fn apply(&self, xs: &Tensor, offset: usize) -> Result( method forward (line 211) | fn forward(&mut self, x: &Tensor, attn_mask: Option<&Tensor>, offset: ... type LayerWeights (line 281) | struct LayerWeights { method new (line 292) | fn new( method forward (line 333) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... type ModelWeights (line 350) | pub struct ModelWeights { method from_gguf (line 362) | pub fn from_gguf( method causal_mask (line 430) | fn causal_mask( method forward (line 457) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result( function get_dequantized (line 23) | fn get_dequantized( type Mlp (line 33) | struct Mlp { method forward (line 40) | fn forward(&self, xs: &Tensor) -> Result { type AttentionLayer (line 48) | struct AttentionLayer { method apply_rotary_emb (line 118) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize) -> Result, index_pos: u... type ShortConvLayer (line 67) | struct ShortConvLayer { method forward (line 185) | fn forward(&mut self, xs: &Tensor, _index_pos: usize) -> Result { type LayerKind (line 77) | enum LayerKind { type LayerWeights (line 83) | struct LayerWeights { function masked_fill (line 91) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: &Tensor) -> Re... function precomput_freqs_cis (line 97) | fn precomput_freqs_cis( type ModelWeights (line 257) | pub struct ModelWeights { method from_gguf (line 310) | pub fn from_gguf( method mask (line 589) | fn mask(&mut self, t: usize, device: &Device) -> Result { method forward (line 602) | pub fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result Result { function read_usize_list (line 286) | fn read_usize_list(v: &gguf_file::Value, len: usize) -> Result Result { method forward (line 43) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 50) | struct Mlp { method forward (line 57) | fn forward(&self, xs: &Tensor) -> Result { type MlpOrMoe (line 66) | enum MlpOrMoe { method forward (line 76) | fn forward(&self, xs: &Tensor) -> Result { type LayerWeights (line 146) | struct LayerWeights { method apply_rotary_emb (line 173) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize) -> Result Re... type ModelWeights (line 262) | pub struct ModelWeights { method from_ggml (line 292) | pub fn from_ggml(mut ct: ggml_file::Content, gqa: usize) -> Result( method mask (line 478) | fn mask(&mut self, t: usize, device: &Device) -> Result { method forward (line 491) | pub fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result Result { type CausalSelfAttention (line 27) | struct CausalSelfAttention { method apply_rotary_emb (line 38) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize, cache: &Cache... method forward (line 55) | fn forward( method repeat_kv (line 104) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 118) | fn load(vb: VarBuilder, cfg: &Config) -> Result { function masked_fill (line 138) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 146) | struct Mlp { method new (line 153) | fn new(c_fc1: Linear, c_fc2: Linear, c_proj: Linear) -> Self { method forward (line 161) | fn forward(&self, x: &Tensor) -> Result { method load (line 166) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Block (line 177) | struct Block { method new (line 185) | fn new(rms_1: RmsNorm, attn: CausalSelfAttention, rms_2: RmsNorm, mlp:... method forward (line 194) | fn forward( method load (line 209) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type QLlama (line 225) | pub struct QLlama { method forward (line 234) | pub fn forward(&self, x: &Tensor, index_pos: usize, cache: &mut Cache)... method load (line 245) | pub fn load(vb: VarBuilder, cfg: Config) -> Result { FILE: candle-transformers/src/models/quantized_metavoice.rs type Config (line 26) | type Config = crate::models::metavoice::transformer::Config; type FeedForward (line 29) | struct FeedForward { method new (line 37) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 52) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 60) | struct Attention { method new (line 73) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 92) | fn forward(&mut self, xs: &Tensor, _pos: usize, mask: &Tensor) -> Resu... method clear_kv_cache (line 136) | fn clear_kv_cache(&mut self) { type Block (line 142) | struct Block { method new (line 151) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 165) | fn forward(&mut self, xs: &Tensor, pos: usize, mask: &Tensor) -> Resul... method clear_kv_cache (line 172) | fn clear_kv_cache(&mut self) { type Model (line 178) | pub struct Model { method new (line 190) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 226) | pub fn clear_kv_cache(&mut self) { method forward (line 232) | pub fn forward(&mut self, xs: &Tensor, spk_emb: &Tensor, pos: usize) -... FILE: candle-transformers/src/models/quantized_mistral.rs type RotaryEmbedding (line 27) | struct RotaryEmbedding { method new (line 33) | fn new(cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 53) | fn apply_rotary_emb_qkv( type MLP (line 70) | struct MLP { method new (line 78) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 94) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 102) | struct Attention { method new (line 117) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 142) | fn forward( method clear_kv_cache (line 200) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 206) | struct DecoderLayer { method new (line 214) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 232) | fn forward( method clear_kv_cache (line 247) | fn clear_kv_cache(&mut self) { type Model (line 253) | pub struct Model { method new (line 263) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 286) | fn prepare_decoder_attention_mask( method forward (line 314) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 332) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/quantized_mixformer.rs constant MAX_SEQ_LEN (line 21) | const MAX_SEQ_LEN: usize = 4096; type Embedding (line 24) | struct Embedding { method new (line 29) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 36) | fn forward(&self, xs: &Tensor) -> Result { function get_mask (line 41) | fn get_mask(size: usize, device: &Device) -> Result { function masked_fill (line 48) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type RotaryEmbedding (line 56) | struct RotaryEmbedding { method new (line 62) | fn new(dim: usize, max_seq_len: usize, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 79) | fn apply_rotary_emb_qkv( type MLP (line 123) | struct MLP { method new (line 130) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 143) | fn forward(&self, xs: &Tensor) -> Result { type CausalLMHead (line 149) | struct CausalLMHead { method new (line 155) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 163) | fn forward(&self, xs: &Tensor) -> Result { type MHA (line 172) | struct MHA { method new (line 184) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 203) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 280) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method new (line 321) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 338) | pub fn forward(&mut self, xs: &Tensor) -> Result { method forward_with_img (line 353) | pub fn forward_with_img( method clear_kv_cache (line 377) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/quantized_moondream.rs function scaled_dot_product_attention (line 22) | fn scaled_dot_product_attention(q: &Tensor, k: &Tensor, v: &Tensor) -> R... type LinearPatchEmbedding (line 30) | struct LinearPatchEmbedding { method new (line 35) | fn new(vb: VarBuilder) -> Result { method forward (line 42) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 48) | struct Attention { method new (line 56) | pub fn new(vb: VarBuilder, dim: usize, num_heads: usize) -> Result Result { type VitBlock (line 88) | struct VitBlock { method new (line 96) | fn new(vb: VarBuilder, dim: usize, num_heads: usize, cfg: &VisionConfi... method forward (line 111) | fn forward(&self, xs: &Tensor) -> Result { type VisionTransformer (line 121) | struct VisionTransformer { method new (line 129) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 155) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 165) | pub struct Encoder { method new (line 170) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 177) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 183) | struct Mlp { method new (line 190) | fn new( method forward (line 204) | fn forward(&self, xs: &Tensor) -> Result { type VisionProjection (line 210) | struct VisionProjection { method new (line 215) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 228) | fn forward(&self, xs: &Tensor) -> Result { type VisionEncoder (line 234) | pub struct VisionEncoder { method new (line 240) | pub fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 251) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 264) | pub struct Model { method new (line 270) | pub fn new(config: &Config, vb: VarBuilder) -> Result { method vision_encoder (line 279) | pub fn vision_encoder(&self) -> &VisionEncoder { method text_model (line 283) | pub fn text_model(&mut self) -> &mut PhiModel { FILE: candle-transformers/src/models/quantized_mpt.rs type GroupedQueryAttention (line 29) | struct GroupedQueryAttention { method new (line 43) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 64) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 138) | fn forward(&self, xs: &Tensor) -> Result { type MPTBlock (line 144) | struct MPTBlock { method new (line 152) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 165) | fn forward(&mut self, xs: &Tensor, mask: Option<&Tensor>) -> Result Result { method forward (line 200) | pub fn forward(&mut self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/quantized_phi.rs constant MAX_SEQ_LEN (line 25) | pub const MAX_SEQ_LEN: usize = 4096; type QLinear (line 28) | struct QLinear { method new (line 35) | fn new( method forward (line 51) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 58) | struct Mlp { method forward (line 64) | fn forward(&self, xs: &Tensor) -> Result { type LayerWeights (line 70) | struct LayerWeights { method apply_rotary_emb (line 94) | fn apply_rotary_emb(&self, xs: &Tensor, index_pos: usize) -> Result Re... type ModelWeights (line 164) | pub struct ModelWeights { method from_gguf (line 201) | pub fn from_gguf( method mask (line 272) | fn mask(&mut self, t: usize, device: &Device) -> Result { method forward (line 285) | pub fn forward(&mut self, xs: &Tensor, index_pos: usize) -> Result Result { FILE: candle-transformers/src/models/quantized_phi3.rs type QLinear (line 24) | struct QLinear { method new (line 30) | fn new( method forward (line 44) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 51) | struct Mlp { method forward (line 58) | fn forward(&self, xs: &Tensor) -> Result { function rms_norm (line 67) | fn rms_norm(w: QTensor, eps: f64) -> Result { type LayerWeights (line 74) | struct LayerWeights { method apply_rotary_emb (line 99) | fn apply_rotary_emb(&self, xs: &Tensor, index_pos: usize) -> Result Re... function flash_attn (line 176) | fn flash_attn( function flash_attn (line 187) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type ModelWeights (line 192) | pub struct ModelWeights { method from_gguf (line 223) | pub fn from_gguf( method mask (line 304) | fn mask(&mut self, t: usize, device: &Device) -> Result { method forward (line 317) | pub fn forward(&mut self, xs: &Tensor, index_pos: usize) -> Result Result { type LayerWeights (line 41) | struct LayerWeights { method apply_rotary_emb (line 71) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize) -> Result Re... type ModelWeights (line 150) | pub struct ModelWeights { method from_gguf (line 181) | pub fn from_gguf( method mask (line 296) | fn mask(&mut self, t: usize, device: &Device) -> Result { method forward (line 309) | pub fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result { function new (line 24) | pub fn new(ct: gguf_file::Content, reader: R, device: Device) -> Self { function qmatmul (line 28) | pub fn qmatmul(&mut self, name: &str) -> Result { function rms_norm (line 33) | pub fn rms_norm(&mut self, name: &str, eps: f64) -> Result { function metadata (line 38) | pub fn metadata(&self) -> &std::collections::HashMap Result { type MlpWeights (line 48) | struct MlpWeights { method new (line 57) | fn new(gg: &mut Gguf, prefix: &str) -> Result { method forward (line 74) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 84) | pub struct RotaryEmbedding { method new (line 90) | pub fn new( method apply (line 116) | pub fn apply(&self, q: &Tensor, k: &Tensor, offset: usize) -> Result<(... type AttentionWeights (line 127) | struct AttentionWeights { method new (line 144) | fn new( method forward (line 184) | fn forward(&mut self, x: &Tensor, attn_mask: Option<&Tensor>, offset: ... method clear_kv_cache (line 237) | fn clear_kv_cache(&mut self) { type LayerWeights (line 243) | struct LayerWeights { method new (line 251) | fn new( method forward (line 282) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 291) | fn clear_kv_cache(&mut self) { type ModelWeights (line 297) | pub struct ModelWeights { method from_gguf (line 309) | pub fn from_gguf( method causal_mask (line 383) | fn causal_mask( method forward (line 410) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Result { type MoeOrMlp (line 28) | enum MoeOrMlp { method forward (line 34) | fn forward(&self, xs: &Tensor, is_prefill: bool) -> Result { type QuantizedAttention (line 42) | pub struct QuantizedAttention { method new (line 63) | pub fn new( method forward (line 125) | pub fn forward( type LayerWeights (line 222) | struct LayerWeights { method forward_attn (line 230) | fn forward_attn(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: ... type GGUFQWenMoE (line 235) | pub struct GGUFQWenMoE { method from_gguf (line 245) | pub fn from_gguf( method causal_mask (line 394) | fn causal_mask( method forward (line 421) | pub fn forward(&mut self, x: &Tensor, offset: usize) -> Result { FILE: candle-transformers/src/models/quantized_recurrent_gemma.rs function rms_norm (line 25) | fn rms_norm(size: usize, eps: f64, vb: VarBuilder) -> Result { type Mlp (line 31) | struct Mlp { method new (line 39) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 55) | fn forward(&self, xs: &Tensor) -> Result { function rglru (line 61) | fn rglru(cfg: &Config, vb: VarBuilder) -> Result { type RecurrentBlock (line 85) | struct RecurrentBlock { method new (line 97) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 129) | pub fn forward(&mut self, xs: &Tensor, pos: usize) -> Result { type SdpaAttention (line 173) | struct SdpaAttention { method new (line 187) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method repeat_kv (line 210) | fn repeat_kv(&self, x: Tensor) -> Result { method forward (line 215) | fn forward( type TemporalBlock (line 278) | enum TemporalBlock { method forward (line 284) | fn forward( type DecoderLayer (line 298) | struct DecoderLayer { method new (line 306) | fn new( method forward (line 334) | fn forward( type Model (line 351) | pub struct Model { method new (line 362) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 389) | fn prepare_decoder_attention_mask( method forward (line 409) | pub fn forward(&mut self, xs: &Tensor, pos: usize) -> Result { FILE: candle-transformers/src/models/quantized_rwkv_v5.rs type SelfAttention (line 28) | struct SelfAttention { method new (line 46) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 104) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type FeedForward (line 167) | struct FeedForward { method new (line 177) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 200) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Block (line 216) | struct Block { method new (line 225) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 245) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Model (line 259) | pub struct Model { method new (line 269) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 290) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { FILE: candle-transformers/src/models/quantized_rwkv_v6.rs type SelfAttention (line 29) | struct SelfAttention { method new (line 53) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 135) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type FeedForward (line 214) | struct FeedForward { method new (line 224) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 247) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Block (line 263) | struct Block { method new (line 272) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 292) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Model (line 306) | pub struct Model { method new (line 316) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 337) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { FILE: candle-transformers/src/models/quantized_stable_lm.rs type MLP (line 27) | struct MLP { method new (line 36) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 53) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 62) | struct Attention { method new (line 80) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 112) | fn forward( type DecoderLayer (line 181) | struct DecoderLayer { method new (line 190) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 212) | fn forward( type Model (line 230) | pub struct Model { method new (line 240) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 263) | fn prepare_decoder_attention_mask( method forward (line 284) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... FILE: candle-transformers/src/models/quantized_t5.rs function default_relative_attention_max_distance (line 27) | fn default_relative_attention_max_distance() -> usize { function default_is_decoder (line 31) | fn default_is_decoder() -> bool { function default_use_cache (line 35) | fn default_use_cache() -> bool { function default_tie_word_embeddings (line 39) | fn default_tie_word_embeddings() -> bool { function get_mask (line 43) | fn get_mask(size: usize, device: &Device) -> Result { function masked_fill (line 50) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Config (line 58) | pub struct Config { method default (line 87) | fn default() -> Self { type T5LayerNorm (line 117) | struct T5LayerNorm { method load (line 124) | fn load(h: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 135) | fn forward(&self, xs: &Tensor) -> Result { type T5DenseActDense (line 149) | struct T5DenseActDense { method load (line 157) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 170) | fn forward(&self, xs: &Tensor) -> Result { type T5DenseGatedActDense (line 180) | struct T5DenseGatedActDense { method load (line 189) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 204) | fn forward(&self, xs: &Tensor) -> Result { type T5LayerFF (line 215) | struct T5LayerFF { method load (line 223) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 247) | fn forward(&self, xs: &Tensor) -> Result { type T5Attention (line 260) | struct T5Attention { method load (line 280) | fn load( method forward (line 321) | fn forward( method clear_kv_cache (line 449) | fn clear_kv_cache(&mut self) { type T5LayerSelfAttention (line 455) | struct T5LayerSelfAttention { method load (line 462) | fn load(h: bool, d: bool, vb: VarBuilder, cfg: &Config) -> Result { method forward (line 473) | fn forward( method clear_kv_cache (line 488) | fn clear_kv_cache(&mut self) { type T5LayerCrossAttention (line 494) | struct T5LayerCrossAttention { method load (line 501) | fn load(decoder: bool, vb: VarBuilder, cfg: &Config) -> Result { method forward (line 512) | fn forward( method clear_kv_cache (line 530) | fn clear_kv_cache(&mut self) { type T5Block (line 536) | struct T5Block { method load (line 544) | fn load( method forward (line 568) | fn forward( method clear_kv_cache (line 600) | fn clear_kv_cache(&mut self) { type T5Stack (line 607) | struct T5Stack { method load (line 615) | fn load(decoder: bool, vb: VarBuilder, shared: &Arc, cfg: &... method forward (line 632) | fn forward( method clear_kv_cache (line 651) | fn clear_kv_cache(&mut self) { type T5EncoderModel (line 657) | pub struct T5EncoderModel { method load (line 664) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 680) | pub fn forward(&mut self, input_ids: &Tensor) -> Result { method device (line 685) | pub fn device(&self) -> &Device { method clear_kv_cache (line 689) | pub fn clear_kv_cache(&mut self) { type T5ForConditionalGeneration (line 695) | pub struct T5ForConditionalGeneration { method load (line 708) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method encode (line 751) | pub fn encode(&mut self, input_ids: &Tensor) -> Result { method decode (line 755) | pub fn decode( method forward (line 786) | pub fn forward(&mut self, input_ids: &Tensor, decoder_input_ids: &Tens... method device (line 791) | pub fn device(&self) -> &Device { method clear_kv_cache (line 795) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/qwen2.rs type Config (line 23) | pub struct Config { type RotaryEmbedding (line 41) | struct RotaryEmbedding { method new (line 47) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 66) | fn apply_rotary_emb_qkv( type MLP (line 83) | struct MLP { method new (line 91) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 107) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 115) | struct Attention { method new (line 130) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 155) | fn forward( method clear_kv_cache (line 212) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 218) | struct DecoderLayer { method new (line 226) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 244) | fn forward( method clear_kv_cache (line 259) | fn clear_kv_cache(&mut self) { type Model (line 265) | pub struct Model { method new (line 275) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_causal_attention_mask (line 297) | fn prepare_causal_attention_mask( method prepare_attention_mask (line 326) | fn prepare_attention_mask(&self, attn_mask: &Tensor) -> Result { method forward (line 340) | pub fn forward( method clear_kv_cache (line 364) | pub fn clear_kv_cache(&mut self) { type ModelForCausalLM (line 372) | pub struct ModelForCausalLM { method new (line 378) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 391) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 399) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/qwen2_moe.rs type Config (line 25) | pub struct Config { type RotaryEmbedding (line 49) | struct RotaryEmbedding { method new (line 55) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 74) | fn apply_rotary_emb_qkv( type MLP (line 91) | struct MLP { method new (line 99) | fn new(intermediate_sz: usize, cfg: &Config, vb: VarBuilder) -> Result... method forward (line 114) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 122) | struct Attention { method new (line 137) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 162) | fn forward( method clear_kv_cache (line 219) | fn clear_kv_cache(&mut self) { type SparseMoeBlock (line 226) | struct SparseMoeBlock { method new (line 236) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 262) | fn forward(&self, xs: &Tensor) -> Result { type MlpOrMoeBlock (line 326) | enum MlpOrMoeBlock { method forward (line 332) | fn forward(&self, xs: &Tensor) -> Result { type DecoderLayer (line 341) | struct DecoderLayer { method new (line 349) | fn new( method forward (line 377) | fn forward( method clear_kv_cache (line 392) | fn clear_kv_cache(&mut self) { type Model (line 398) | pub struct Model { method new (line 409) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 433) | fn prepare_decoder_attention_mask( method forward (line 462) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 479) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/qwen3.rs type Config (line 10) | pub struct Config { type Qwen3RotaryEmbedding (line 30) | pub(crate) struct Qwen3RotaryEmbedding { method new (line 36) | pub(crate) fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result<... method apply (line 56) | pub(crate) fn apply(&self, q: &Tensor, k: &Tensor, offset: usize) -> R... type Qwen3MLP (line 67) | pub(crate) struct Qwen3MLP { method new (line 75) | pub(crate) fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 86) | fn forward(&self, x: &Tensor) -> Result { type Qwen3Attention (line 94) | pub(crate) struct Qwen3Attention { method new (line 115) | pub(crate) fn new( method forward (line 181) | pub(crate) fn forward( method clear_kv_cache (line 238) | pub(crate) fn clear_kv_cache(&mut self) { type DecoderLayer (line 244) | struct DecoderLayer { method new (line 252) | fn new(cfg: &Config, rotary: Arc, vb: VarBuilder... method forward (line 269) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 278) | fn clear_kv_cache(&mut self) { type Model (line 284) | pub struct Model { method new (line 293) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 311) | fn clear_kv_cache(&mut self) { method causal_mask (line 317) | fn causal_mask( method forward (line 344) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Result { method forward (line 378) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Self { type Qwen3MLPExpert (line 62) | struct Qwen3MLPExpert { method new (line 70) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 89) | fn forward(&self, x: &Tensor) -> Result { type Qwen3SparseMoeBlock (line 98) | struct Qwen3SparseMoeBlock { method new (line 106) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 124) | fn forward(&self, xs: &Tensor) -> Result { type Qwen3FeedForward (line 180) | enum Qwen3FeedForward { method forward (line 187) | fn forward(&self, xs: &Tensor, is_prefill: bool) -> Result { type DecoderLayer (line 197) | struct DecoderLayer { method new (line 205) | fn new( method forward (line 250) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 259) | fn clear_kv_cache(&mut self) { type Model (line 265) | pub struct Model { method new (line 274) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 296) | fn clear_kv_cache(&mut self) { method causal_mask (line 302) | fn causal_mask( method forward (line 329) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Result { method forward (line 363) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Self { type Conv3dNoBias (line 25) | pub struct Conv3dNoBias { method new (line 31) | pub fn new( method forward (line 71) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/qwen3_vl/mod.rs type Qwen3VLModel (line 17) | pub struct Qwen3VLModel { method new (line 23) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 29) | fn prepare_decoder_attention_mask( method forward (line 57) | pub fn forward( FILE: candle-transformers/src/models/qwen3_vl/text.rs type RotaryEmbedding (line 12) | pub struct RotaryEmbedding { method new (line 18) | pub fn new( method forward (line 41) | pub fn forward( type Mlp (line 65) | struct Mlp { method new (line 73) | fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method forward (line 87) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 94) | struct Attention { method new (line 111) | fn new(rotary_emb: Arc, cfg: &TextConfig, vb: VarBuil... method forward (line 149) | fn forward( type DecoderLayer (line 205) | pub struct DecoderLayer { method new (line 213) | fn new(rotary_emb: Arc, cfg: &TextConfig, vb: VarBuil... method forward (line 232) | fn forward( type Qwen3VLTextModel (line 252) | pub struct Qwen3VLTextModel { method new (line 262) | pub fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method embed_tokens (line 299) | pub fn embed_tokens(&self, input_ids: &Tensor) -> Result { method forward_embeds (line 303) | pub fn forward_embeds( method deepstack_process (line 341) | fn deepstack_process( FILE: candle-transformers/src/models/qwen3_vl/vision.rs type PatchEmbed (line 13) | struct PatchEmbed { method new (line 23) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 46) | fn forward(&self, xs: &Tensor) -> Result { type VisionMlp (line 61) | struct VisionMlp { method new (line 68) | fn new(dim: usize, hidden_dim: usize, act: Activation, vb: VarBuilder)... method forward (line 76) | fn forward(&self, xs: &Tensor) -> Result { function rotate_half (line 83) | fn rotate_half(xs: &Tensor) -> Result { function apply_rotary_pos_emb_vision (line 90) | fn apply_rotary_pos_emb_vision( type VisionAttention (line 104) | struct VisionAttention { method new (line 112) | fn new(dim: usize, num_heads: usize, vb: VarBuilder) -> Result { method forward (line 121) | fn forward( type VisionBlock (line 178) | struct VisionBlock { method new (line 186) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 208) | fn forward( type PatchMerger (line 223) | struct PatchMerger { method new (line 233) | fn new(cfg: &VisionConfig, use_postshuffle_norm: bool, vb: VarBuilder)... method forward (line 254) | fn forward(&self, xs: &Tensor) -> Result { type VisionRotaryEmbedding (line 281) | struct VisionRotaryEmbedding { constant THETA (line 286) | const THETA: f32 = 10000.; method new (line 288) | fn new(dim: usize, device: &Device) -> Result { method make_embeds (line 299) | fn make_embeds(&self, seqlen: usize) -> Result { type Qwen3VLVisionModel (line 306) | pub struct Qwen3VLVisionModel { method new (line 320) | pub fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method linspace_points (line 373) | fn linspace_points(&self, steps: usize) -> Vec { method fast_pos_embed_interpolate (line 382) | fn fast_pos_embed_interpolate(&self, grid_thw: &Tensor) -> Result Result { method build_cu_seqlens (line 543) | fn build_cu_seqlens(&self, grid_thw: &Tensor) -> Result> { method forward (line 558) | pub fn forward(&self, xs: &Tensor, grid_thw: &Tensor) -> Result<(Tenso... FILE: candle-transformers/src/models/recurrent_gemma.rs type TemporalBlockType (line 26) | pub enum TemporalBlockType { type Config (line 32) | pub struct Config { function default_max_seq_len (line 55) | fn default_max_seq_len() -> usize { type RmsNorm (line 60) | pub(crate) struct RmsNorm { method new (line 66) | pub(crate) fn new(dim: usize, eps: f64, vb: VarBuilder) -> Result { method from_weight (line 71) | pub(crate) fn from_weight(weight: Tensor, eps: f64) -> Self { method forward (line 77) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 94) | pub(crate) struct RotaryEmbedding { method new (line 107) | pub(crate) fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result<... method apply_rotary_emb_qkv (line 130) | pub(crate) fn apply_rotary_emb_qkv( function rotate_half (line 99) | fn rotate_half(xs: &Tensor) -> Result { type Mlp (line 148) | struct Mlp { method new (line 156) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 172) | fn forward(&self, xs: &Tensor) -> Result { type Rglru (line 180) | pub(crate) struct Rglru { method new (line 200) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 224) | pub(crate) fn forward(&mut self, xs: &Tensor, pos: usize) -> Result Result { function softplus (line 195) | fn softplus(xs: &Tensor) -> Result { function rnn_scan (line 272) | fn rnn_scan( type RecurrentBlock (line 320) | struct RecurrentBlock { method new (line 332) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 362) | pub fn forward(&mut self, xs: &Tensor, pos: usize) -> Result { type SdpaAttention (line 406) | struct SdpaAttention { method new (line 420) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method repeat_kv (line 443) | fn repeat_kv(&self, x: Tensor) -> Result { method forward (line 448) | fn forward( type TemporalBlock (line 511) | enum TemporalBlock { method forward (line 517) | fn forward( type DecoderLayer (line 531) | struct DecoderLayer { method new (line 539) | fn new( method forward (line 567) | fn forward( type Model (line 584) | pub struct Model { method new (line 596) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 620) | fn prepare_decoder_attention_mask( method forward (line 640) | pub fn forward(&mut self, xs: &Tensor, pos: usize) -> Result { FILE: candle-transformers/src/models/repvgg.rs constant CHANNELS_PER_STAGE (line 19) | const CHANNELS_PER_STAGE: [usize; 5] = [64, 64, 128, 256, 512]; type Config (line 22) | pub struct Config { method a0 (line 30) | pub fn a0() -> Self { method a1 (line 39) | pub fn a1() -> Self { method a2 (line 48) | pub fn a2() -> Self { method b0 (line 57) | pub fn b0() -> Self { method b1 (line 66) | pub fn b1() -> Self { method b2 (line 75) | pub fn b2() -> Self { method b3 (line 84) | pub fn b3() -> Self { method b1g4 (line 93) | pub fn b1g4() -> Self { method b2g4 (line 102) | pub fn b2g4() -> Self { method b3g4 (line 111) | pub fn b3g4() -> Self { function fuse_conv_bn (line 124) | fn fuse_conv_bn(weights: &Tensor, bn: BatchNorm) -> Result<(Tensor, Tens... function repvgg_layer (line 139) | fn repvgg_layer( function output_channels_per_stage (line 218) | fn output_channels_per_stage(a: f32, b: f32, stage: usize) -> usize { function repvgg_stage (line 233) | fn repvgg_stage(cfg: &Config, idx: usize, vb: VarBuilder) -> Result, vb: VarBuilder... function repvgg (line 308) | pub fn repvgg(cfg: &Config, nclasses: usize, vb: VarBuilder) -> Result Result Result { function resnet18_no_final_layer (line 128) | pub fn resnet18_no_final_layer(vb: VarBuilder) -> Result { function resnet34 (line 133) | pub fn resnet34(num_classes: usize, vb: VarBuilder) -> Result { function resnet34_no_final_layer (line 137) | pub fn resnet34_no_final_layer(vb: VarBuilder) -> Result { function bottleneck_block (line 142) | fn bottleneck_block( function bottleneck_layer (line 171) | fn bottleneck_layer( function bottleneck_resnet (line 193) | fn bottleneck_resnet( function resnet50 (line 235) | pub fn resnet50(num_classes: usize, vb: VarBuilder) -> Result { function resnet50_no_final_layer (line 239) | pub fn resnet50_no_final_layer(vb: VarBuilder) -> Result { function resnet101 (line 243) | pub fn resnet101(num_classes: usize, vb: VarBuilder) -> Result { function resnet101_no_final_layer (line 247) | pub fn resnet101_no_final_layer(vb: VarBuilder) -> Result { function resnet152 (line 251) | pub fn resnet152(num_classes: usize, vb: VarBuilder) -> Result { function resnet152_no_final_layer (line 255) | pub fn resnet152_no_final_layer(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/rwkv_v5.rs function default_num_attention_heads (line 39) | fn default_num_attention_heads() -> usize { type Config (line 45) | pub struct Config { type StatePerLayer (line 58) | pub struct StatePerLayer { type State (line 64) | pub struct State { method new (line 70) | pub fn new(batch_size: usize, cfg: &Config, dev: &Device) -> Result Result Result { type FeedForward (line 218) | struct FeedForward { method new (line 228) | pub fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result Result { type Block (line 263) | struct Block { method new (line 272) | pub fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result Result { type Model (line 306) | pub struct Model { method new (line 316) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 337) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Bytes (line 352) | type Bytes = Vec; type Tokenizer (line 355) | pub struct Tokenizer { method new (line 363) | pub fn new>(p: P) -> Result { method decode_bytes (line 399) | pub fn decode_bytes(&self, tokens: &[u32]) -> Vec { method decode (line 409) | pub fn decode(&self, tokens: &[u32]) -> Result { method encode_bytes (line 414) | pub fn encode_bytes(&self, bytes: &[u8]) -> Result> { method encode (line 438) | pub fn encode(&self, str: &str) -> Result> { FILE: candle-transformers/src/models/rwkv_v6.rs type SelfAttention (line 37) | struct SelfAttention { method new (line 61) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 113) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type FeedForward (line 192) | struct FeedForward { method new (line 202) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 221) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Block (line 237) | struct Block { method new (line 246) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 266) | fn forward(&self, xs: &Tensor, state: &mut State) -> Result { type Model (line 280) | pub struct Model { method new (line 290) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 311) | pub fn forward(&self, xs: &Tensor, state: &mut State) -> Result { FILE: candle-transformers/src/models/rwkv_v7.rs type ModelVersion (line 27) | pub enum ModelVersion { type Config (line 35) | pub struct Config { method n_heads (line 56) | fn n_heads(&self) -> usize { method dim_ffn (line 60) | fn dim_ffn(&self) -> usize { function default_head_size (line 47) | fn default_head_size() -> usize { function default_rescale_every (line 51) | fn default_rescale_every() -> usize { function infer_lora_dims (line 68) | fn infer_lora_dims(vb: &VarBuilder) -> Result<(usize, usize, usize, usiz... type StatePerLayer (line 80) | pub struct StatePerLayer { type DeaState (line 90) | pub struct DeaState { type State (line 102) | pub struct State { method new (line 110) | pub fn new(cfg: &Config, dev: &Device) -> Result { method new_with_dtype (line 118) | pub fn new_with_dtype(cfg: &Config, dev: &Device, dtype: DType) -> Res... function layer_norm (line 164) | fn layer_norm(xs: &Tensor, weight: &Tensor, bias: &Tensor, eps: f64) -> ... type TimeMix (line 194) | struct TimeMix { method new (line 237) | fn new( method forward (line 334) | fn forward( type ChannelMix (line 461) | struct ChannelMix { method new (line 478) | fn new(_layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 509) | fn forward( type DeepEmbed (line 470) | struct DeepEmbed { type DeaAttention (line 552) | struct DeaAttention { method new (line 574) | fn new(layer_id: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 618) | fn forward(&self, x: &Tensor, dea_state: &mut DeaState, token_ids: &[u... type Block (line 727) | struct Block { method new (line 741) | fn new( method forward (line 783) | fn forward( type Model (line 834) | pub struct Model { method new (line 844) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 922) | pub fn forward(&self, xs: &Tensor, state: &mut State, token_ids: &[u32... method forward_seq (line 959) | pub fn forward_seq(&self, token_ids: &[u32], state: &mut State) -> Res... FILE: candle-transformers/src/models/segformer.rs type Config (line 25) | pub struct Config { type SegformerOverlapPatchEmbeddings (line 43) | struct SegformerOverlapPatchEmbeddings { method new (line 49) | fn new( method forward (line 78) | fn forward(&self, x: &Tensor) -> Result { type SegformerEfficientSelfAttention (line 91) | struct SegformerEfficientSelfAttention { method new (line 102) | fn new( method transpose_for_scores (line 153) | fn transpose_for_scores(&self, hidden_states: Tensor) -> Result { method forward (line 168) | fn forward(&self, x: &Tensor) -> Result { type SegformerSelfOutput (line 200) | struct SegformerSelfOutput { method new (line 205) | fn new(hidden_size: usize, vb: VarBuilder) -> Result { method forward (line 212) | fn forward(&self, x: &Tensor) -> Result { type SegformerAttention (line 218) | struct SegformerAttention { method new (line 224) | fn new( method forward (line 244) | fn forward(&self, x: &Tensor) -> Result { type SegformerDWConv (line 251) | struct SegformerDWConv { method new (line 256) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 274) | fn forward(&self, x: &Tensor) -> Result { type SegformerMixFFN (line 280) | struct SegformerMixFFN { method new (line 288) | fn new( method forward (line 309) | fn forward(&self, x: &Tensor) -> Result { type SegformerLayer (line 332) | struct SegformerLayer { method new (line 340) | fn new( method forward (line 374) | fn forward(&self, x: &Tensor) -> Result { type SegformerEncoder (line 392) | struct SegformerEncoder { method new (line 404) | fn new(config: Config, vb: VarBuilder) -> Result { type SegformerModel (line 475) | struct SegformerModel { method new (line 480) | fn new(config: &Config, vb: VarBuilder) -> Result { type SegformerMLP (line 493) | struct SegformerMLP { method new (line 498) | fn new(config: &Config, input_dim: usize, vb: VarBuilder) -> Result Result { type SegformerDecodeHead (line 511) | struct SegformerDecodeHead { method new (line 519) | fn new(config: &Config, num_labels: usize, vb: VarBuilder) -> Result Result { type ModuleWithHiddenStates (line 588) | trait ModuleWithHiddenStates { method forward (line 456) | fn forward(&self, x: &Tensor) -> Result> { method forward (line 487) | fn forward(&self, x: &Tensor) -> Result> { method forward (line 589) | fn forward(&self, xs: &Tensor) -> Result>; type SemanticSegmentationModel (line 593) | pub struct SemanticSegmentationModel { method new (line 599) | pub fn new(config: &Config, num_labels: usize, vb: VarBuilder) -> Resu... method forward (line 610) | fn forward(&self, x: &Tensor) -> Result { type ImageClassificationModel (line 617) | pub struct ImageClassificationModel { method new (line 623) | pub fn new(config: &Config, num_labels: usize, vb: VarBuilder) -> Resu... method forward (line 634) | fn forward(&self, x: &Tensor) -> Result { function test_config_json_load (line 649) | fn test_config_json_load() { FILE: candle-transformers/src/models/segment_anything/image_encoder.rs type PatchEmbed (line 5) | struct PatchEmbed { method new (line 11) | fn new( method forward (line 31) | fn forward(&self, xs: &Tensor) -> Result { type Add3 (line 44) | struct Add3(usize, usize, usize, usize, usize); method name (line 46) | fn name(&self) -> &'static str { method cpu_fwd (line 50) | fn cpu_fwd( type Attention (line 102) | struct Attention { method new (line 115) | fn new( method add_decomposed_rel_pos (line 151) | fn add_decomposed_rel_pos( function get_rel_pos (line 187) | fn get_rel_pos(q_size: usize, k_size: usize, rel_pos: &Tensor) -> Result... method forward (line 213) | fn forward(&self, xs: &Tensor) -> Result { type Block (line 250) | struct Block { method new (line 260) | fn new( function window_partition (line 297) | fn window_partition(xs: Tensor, window_size: usize) -> Result<(Tensor, (... function window_unpartition (line 327) | fn window_unpartition( method forward (line 352) | fn forward(&self, xs: &Tensor) -> Result { type ImageEncoderViT (line 374) | pub struct ImageEncoderViT { method new (line 387) | pub fn new( method forward (line 467) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/segment_anything/mask_decoder.rs type MlpMaskDecoder (line 7) | struct MlpMaskDecoder { method new (line 14) | fn new( method forward (line 44) | fn forward(&self, xs: &Tensor) -> Result { type MaskDecoder (line 62) | pub struct MaskDecoder { method new (line 76) | pub fn new( method forward (line 150) | pub fn forward( method predict_masks (line 178) | fn predict_masks( function repeat_interleave (line 234) | fn repeat_interleave(img: &Tensor, repeats: usize, dim: usize) -> Result... FILE: candle-transformers/src/models/segment_anything/mod.rs function linear (line 43) | pub fn linear(vb: VarBuilder, in_dim: usize, out_dim: usize, bias: bool)... type LayerNorm2d (line 52) | pub struct LayerNorm2d { method new (line 60) | pub fn new(num_channels: usize, eps: f64, vb: VarBuilder) -> Result Result { type MlpBlock (line 84) | pub struct MlpBlock { method new (line 92) | pub fn new( method forward (line 111) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/segment_anything/prompt_encoder.rs type PositionEmbeddingRandom (line 5) | struct PositionEmbeddingRandom { method new (line 10) | fn new(num_pos_feats: usize, vb: VarBuilder) -> Result { method pe_encoding (line 18) | fn pe_encoding(&self, coords: &Tensor) -> Result { method forward (line 25) | fn forward(&self, h: usize, w: usize) -> Result { method forward_with_coords (line 39) | fn forward_with_coords( type PromptEncoder (line 54) | pub struct PromptEncoder { method new (line 71) | pub fn new( method get_dense_pe (line 130) | pub fn get_dense_pe(&self) -> Result { method embed_masks (line 136) | fn embed_masks(&self, masks: &Tensor) -> Result { method embed_points (line 147) | fn embed_points(&self, points: &Tensor, labels: &Tensor, pad: bool) ->... method embed_boxes (line 188) | fn embed_boxes(&self, boxes: &Tensor) -> Result { method forward (line 201) | pub fn forward( FILE: candle-transformers/src/models/segment_anything/sam.rs constant PROMPT_EMBED_DIM (line 9) | const PROMPT_EMBED_DIM: usize = 256; constant IMAGE_SIZE (line 10) | pub const IMAGE_SIZE: usize = 1024; constant VIT_PATCH_SIZE (line 11) | const VIT_PATCH_SIZE: usize = 16; constant PRED_IOU_THRESH (line 12) | const PRED_IOU_THRESH: f32 = 0.88; constant STABILITY_SCORE_OFFSET (line 13) | const STABILITY_SCORE_OFFSET: f32 = 1.0; constant STABILITY_SCORE_THRESHOLD (line 14) | const STABILITY_SCORE_THRESHOLD: f32 = 0.95; constant MODEL_MASK_THRESHOLD (line 15) | const MODEL_MASK_THRESHOLD: f32 = 0.0; constant CROP_NMS_THRESH (line 16) | const CROP_NMS_THRESH: f32 = 0.7; type ImageEncoder (line 19) | enum ImageEncoder { method forward (line 25) | fn forward(&self, xs: &Tensor) -> Result { type Sam (line 34) | pub struct Sam { method new (line 43) | pub fn new( method new_tiny (line 94) | pub fn new_tiny(vb: VarBuilder) -> Result { method embeddings (line 125) | pub fn embeddings(&self, img: &Tensor) -> Result { method forward (line 130) | pub fn forward( method forward_for_embeddings (line 158) | pub fn forward_for_embeddings( method unpreprocess (line 199) | pub fn unpreprocess(&self, img: &Tensor) -> Result { method preprocess (line 207) | pub fn preprocess(&self, img: &Tensor) -> Result { method process_crop (line 220) | fn process_crop( method generate_masks (line 322) | pub fn generate_masks( function min_max_indexes (line 349) | fn min_max_indexes(values: &[u32]) -> Option<(usize, usize)> { type CropBox (line 366) | struct CropBox { method new (line 375) | fn new(x0: usize, y0: usize, x1: usize, y1: usize, layer_idx: usize) -... function generate_crop_boxes (line 386) | fn generate_crop_boxes( function build_point_grid (line 423) | fn build_point_grid(n_per_side: usize) -> Vec<(f64, f64)> { function build_all_layer_point_grids (line 436) | fn build_all_layer_point_grids( FILE: candle-transformers/src/models/segment_anything/tiny_vit.rs constant MBCONV_EXPAND_RATIO (line 6) | const MBCONV_EXPAND_RATIO: usize = 4; constant MLP_RATIO (line 7) | const MLP_RATIO: usize = 4; constant LOCAL_CONV_SIZE (line 8) | const LOCAL_CONV_SIZE: usize = 3; constant IMG_SIZE (line 9) | const IMG_SIZE: usize = 1024; constant IN_CHANNELS (line 10) | const IN_CHANNELS: usize = 3; type Conv2dBN (line 13) | struct Conv2dBN { method new (line 20) | fn new(in_: usize, out: usize, ks: usize, cfg: Conv2dConfig, vb: VarBu... method forward (line 29) | fn forward(&self, xs: &Tensor) -> Result { type PatchEmbed (line 36) | struct PatchEmbed { method new (line 43) | fn new(in_chans: usize, embed_dim: usize, vb: VarBuilder) -> Result Result { type MBConv (line 64) | struct MBConv { method new (line 72) | fn new(in_: usize, out: usize, expand_ratio: usize, vb: VarBuilder) ->... method forward (line 93) | fn forward(&self, xs: &Tensor) -> Result { type PatchMerging (line 107) | struct PatchMerging { method new (line 116) | fn new( method forward (line 144) | fn forward(&self, xs: &Tensor) -> Result { type ConvLayer (line 164) | struct ConvLayer { method new (line 171) | fn new( method forward (line 202) | fn forward(&self, xs: &Tensor) -> Result { type Mlp (line 216) | struct Mlp { method new (line 224) | fn new(in_: usize, hidden: usize, vb: VarBuilder) -> Result { method forward (line 239) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 249) | struct Attention { method new (line 265) | fn new( method forward (line 321) | fn forward(&self, xs: &Tensor) -> Result { type TinyViTBlock (line 358) | struct TinyViTBlock { method new (line 368) | fn new( method forward (line 404) | fn forward(&self, xs: &Tensor) -> Result { type BasicLayer (line 462) | struct BasicLayer { method new (line 470) | fn new( method forward (line 508) | fn forward(&self, xs: &Tensor) -> Result { type TinyViT (line 522) | pub struct TinyViT { method new (line 537) | pub fn new( method forward (line 606) | fn forward(&self, xs: &Tensor) -> Result { function tiny_vit_5m (line 624) | pub fn tiny_vit_5m(vb: VarBuilder) -> Result { FILE: candle-transformers/src/models/segment_anything/transformer.rs type Attention (line 5) | struct Attention { method new (line 14) | fn new( method separate_heads (line 34) | fn separate_heads(&self, x: &Tensor) -> Result { method recombine_heads (line 41) | fn recombine_heads(&self, x: &Tensor) -> Result { method forward (line 47) | fn forward(&self, q: &Tensor, k: &Tensor, v: &Tensor) -> Result { type TwoWayAttentionBlock (line 66) | struct TwoWayAttentionBlock { method new (line 79) | fn new( method forward (line 122) | fn forward( type TwoWayTransformer (line 163) | pub struct TwoWayTransformer { method new (line 170) | pub fn new( method forward (line 198) | pub fn forward( FILE: candle-transformers/src/models/siglip.rs function default_text_vocab_size (line 13) | fn default_text_vocab_size() -> usize { function default_text_hidden_size (line 17) | fn default_text_hidden_size() -> usize { function default_text_intermediate_size (line 21) | fn default_text_intermediate_size() -> usize { function default_text_num_hidden_layers (line 25) | fn default_text_num_hidden_layers() -> usize { function default_text_num_attention_heads (line 29) | fn default_text_num_attention_heads() -> usize { function default_text_max_position_embeddings (line 33) | fn default_text_max_position_embeddings() -> usize { function default_text_layer_norm_eps (line 37) | fn default_text_layer_norm_eps() -> f64 { function default_text_pad_token_id (line 41) | fn default_text_pad_token_id() -> u32 { function default_text_bos_token_id (line 45) | fn default_text_bos_token_id() -> u32 { function default_text_eos_token_id (line 49) | fn default_text_eos_token_id() -> u32 { function default_text_hidden_act (line 53) | fn default_text_hidden_act() -> candle_nn::Activation { type TextConfig (line 59) | pub struct TextConfig { function default_vision_hidden_size (line 84) | fn default_vision_hidden_size() -> usize { function default_vision_intermediate_size (line 88) | fn default_vision_intermediate_size() -> usize { function default_vision_num_hidden_layers (line 92) | fn default_vision_num_hidden_layers() -> usize { function default_vision_num_attention_heads (line 96) | fn default_vision_num_attention_heads() -> usize { function default_vision_num_channels (line 100) | fn default_vision_num_channels() -> usize { function default_vision_image_size (line 104) | fn default_vision_image_size() -> usize { function default_vision_batch_size (line 108) | fn default_vision_batch_size() -> usize { function default_vision_layer_norm_eps (line 112) | fn default_vision_layer_norm_eps() -> f64 { function default_vision_hidden_act (line 116) | fn default_vision_hidden_act() -> candle_nn::Activation { type VisionConfig (line 122) | pub struct VisionConfig { method paligemma_3b_224 (line 195) | pub fn paligemma_3b_224() -> Self { method paligemma_3b_448 (line 211) | pub fn paligemma_3b_448() -> Self { method paligemma_3b_896 (line 227) | pub fn paligemma_3b_896() -> Self { method num_patches (line 243) | pub fn num_patches(&self) -> usize { type TransformerConfig (line 143) | trait TransformerConfig { method hidden_size (line 144) | fn hidden_size(&self) -> usize; method intermediate_size (line 145) | fn intermediate_size(&self) -> usize; method num_attention_heads (line 146) | fn num_attention_heads(&self) -> usize; method num_hidden_layers (line 147) | fn num_hidden_layers(&self) -> usize; method layer_norm_eps (line 148) | fn layer_norm_eps(&self) -> f64; method hidden_act (line 149) | fn hidden_act(&self) -> candle_nn::Activation; method hidden_size (line 153) | fn hidden_size(&self) -> usize { method intermediate_size (line 156) | fn intermediate_size(&self) -> usize { method num_attention_heads (line 159) | fn num_attention_heads(&self) -> usize { method num_hidden_layers (line 162) | fn num_hidden_layers(&self) -> usize { method layer_norm_eps (line 165) | fn layer_norm_eps(&self) -> f64 { method hidden_act (line 168) | fn hidden_act(&self) -> candle_nn::Activation { method hidden_size (line 174) | fn hidden_size(&self) -> usize { method intermediate_size (line 177) | fn intermediate_size(&self) -> usize { method num_attention_heads (line 180) | fn num_attention_heads(&self) -> usize { method num_hidden_layers (line 183) | fn num_hidden_layers(&self) -> usize { method layer_norm_eps (line 186) | fn layer_norm_eps(&self) -> f64 { method hidden_act (line 189) | fn hidden_act(&self) -> candle_nn::Activation { type Config (line 250) | pub struct Config { method base_patch16_224 (line 256) | pub fn base_patch16_224() -> Self { type MultiheadAttention (line 292) | struct MultiheadAttention { method new (line 301) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method separate_heads (line 319) | fn separate_heads(&self, x: &Tensor) -> Result { method recombine_heads (line 326) | fn recombine_heads(&self, x: &Tensor) -> Result { method forward (line 332) | fn forward(&self, q: &Tensor, k: &Tensor, v: &Tensor) -> Result { type MultiheadAttentionPoolingHead (line 351) | struct MultiheadAttentionPoolingHead { method new (line 359) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 374) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 385) | struct Attention { method new (line 396) | fn new(cfg: &C, vb: VarBuilder) -> Result { method forward (line 415) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type Mlp (line 444) | struct Mlp { method new (line 451) | fn new(cfg: &C, vb: VarBuilder) -> Result { method forward (line 465) | fn forward(&self, xs: &candle::Tensor) -> Result { type EncoderLayer (line 474) | struct EncoderLayer { method new (line 482) | fn new(cfg: &C, vb: VarBuilder) -> Result { method forward (line 497) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type Encoder (line 510) | struct Encoder { method new (line 515) | fn new(cfg: &C, vb: VarBuilder) -> Result { method forward (line 525) | fn forward(&self, xs: &Tensor, attention_mask: Option<&Tensor>) -> Res... type VisionEmbeddings (line 535) | struct VisionEmbeddings { method new (line 543) | fn new(cfg: &VisionConfig, vb: VarBuilder) -> Result { method forward (line 580) | fn forward(&self, xs: &Tensor) -> Result { type VisionTransformer (line 605) | struct VisionTransformer { method new (line 613) | fn new(cfg: &VisionConfig, use_head: bool, vb: VarBuilder) -> Result Result { type VisionModel (line 645) | pub struct VisionModel { method new (line 650) | pub fn new(cfg: &VisionConfig, use_head: bool, vb: VarBuilder) -> Resu... method forward (line 657) | fn forward(&self, xs: &Tensor) -> Result { type TextEmbeddings (line 663) | struct TextEmbeddings { method new (line 670) | fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method forward (line 689) | fn forward(&self, input_ids: &Tensor) -> Result { type TextTransformer (line 699) | pub struct TextTransformer { method new (line 707) | fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method forward (line 725) | fn forward(&self, input_ids: &Tensor) -> Result { type TextModel (line 738) | pub struct TextModel { method new (line 743) | pub fn new(cfg: &TextConfig, vb: VarBuilder) -> Result { method forward (line 750) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 756) | pub struct Model { method new (line 764) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method get_text_features (line 777) | pub fn get_text_features(&self, input_ids: &Tensor) -> Result { method get_image_features (line 781) | pub fn get_image_features(&self, pixel_values: &Tensor) -> Result Re... FILE: candle-transformers/src/models/smol/quantized_smollm3.rs constant MAX_SEQ_LEN (line 10) | const MAX_SEQ_LEN: usize = 4096; function reconstruct_qk_weights (line 14) | fn reconstruct_qk_weights(gguf_weight: &Tensor, _num_heads: usize) -> Re... type QuantizedConfig (line 64) | pub struct QuantizedConfig { method from_gguf (line 80) | pub fn from_gguf(ct: &gguf_file::Content) -> Result { method should_skip_rope (line 119) | pub fn should_skip_rope(&self, layer_idx: usize) -> bool { method head_dim (line 126) | pub fn head_dim(&self) -> usize { type RmsNorm (line 132) | struct RmsNorm { method new (line 138) | fn new(weight: Tensor, eps: f64) -> Self { method forward (line 142) | fn forward(&self, x: &Tensor) -> Result { type RotaryEmbedding (line 158) | pub struct RotaryEmbedding { method new (line 164) | pub fn new(dtype: DType, cfg: &QuantizedConfig, dev: &Device) -> Resul... method apply_rotary_emb (line 183) | pub fn apply_rotary_emb( function repeat_kv (line 198) | fn repeat_kv(x: Tensor, n_rep: usize) -> Result { type QuantizedMLP (line 210) | struct QuantizedMLP { method new (line 217) | fn new(vb: VarBuilder, _layer_idx: usize) -> Result { method forward (line 230) | fn forward(&self, x: &Tensor) -> Result { type QuantizedAttention (line 238) | struct QuantizedAttention { method new (line 253) | fn new( method forward (line 312) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 364) | fn clear_kv_cache(&mut self) { type QuantizedDecoderLayer (line 370) | struct QuantizedDecoderLayer { method new (line 378) | fn new( method forward (line 404) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 416) | fn clear_kv_cache(&mut self) { type QuantizedModelForCausalLM (line 422) | pub struct QuantizedModelForCausalLM { method from_gguf (line 432) | pub fn from_gguf>(path: P, device: &Device) ... method forward (line 505) | pub fn forward(&mut self, input_ids: &Tensor, offset: usize) -> Result... method create_causal_mask (line 533) | fn create_causal_mask( method clear_kv_cache (line 558) | pub fn clear_kv_cache(&mut self) { method config (line 564) | pub fn config(&self) -> &QuantizedConfig { FILE: candle-transformers/src/models/smol/smollm3.rs type Config (line 10) | pub struct Config { method should_skip_rope (line 39) | pub fn should_skip_rope(&self, layer_idx: usize) -> bool { method head_dim (line 60) | pub fn head_dim(&self) -> usize { type SmolLM3RotaryEmbedding (line 66) | pub(crate) struct SmolLM3RotaryEmbedding { method new (line 72) | pub(crate) fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result<... method apply (line 92) | pub(crate) fn apply(&self, q: &Tensor, k: &Tensor, offset: usize) -> R... type SmolLM3MLP (line 103) | pub(crate) struct SmolLM3MLP { method new (line 111) | pub(crate) fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 138) | fn forward(&self, x: &Tensor) -> Result { type SmolLM3Attention (line 146) | pub(crate) struct SmolLM3Attention { method new (line 166) | pub(crate) fn new( method forward (line 237) | pub(crate) fn forward( method clear_kv_cache (line 300) | pub fn clear_kv_cache(&mut self) { type DecoderLayer (line 306) | pub(crate) struct DecoderLayer { method new (line 314) | fn new( method forward (line 336) | fn forward(&mut self, x: &Tensor, mask: Option<&Tensor>, offset: usize... method clear_kv_cache (line 345) | pub fn clear_kv_cache(&mut self) { type Model (line 351) | pub struct Model { method new (line 360) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method clear_kv_cache (line 390) | pub fn clear_kv_cache(&mut self) { method causal_mask (line 396) | fn causal_mask( method forward (line 423) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result Result { method forward (line 458) | pub fn forward(&mut self, input: &Tensor, offset: usize) -> Result( function conv1d_weight_norm (line 46) | pub fn conv1d_weight_norm( function conv1d_weight_norm_no_bias (line 67) | pub fn conv1d_weight_norm_no_bias( function conv_transpose1d_weight_norm (line 87) | pub fn conv_transpose1d_weight_norm( type SinusoidalEmbeddings (line 113) | struct SinusoidalEmbeddings { method new (line 121) | fn new(dim: usize, scale_base: f32, use_xpos: bool, dev: &Device) -> R... type LocalMHA (line 144) | struct LocalMHA { method new (line 154) | fn new( method forward (line 183) | fn forward(&self, xs: &Tensor) -> Result { type Snake1d (line 223) | struct Snake1d { method new (line 228) | pub fn new(channels: usize, vb: VarBuilder) -> Result { method forward (line 235) | fn forward(&self, xs: &Tensor) -> Result { type ResidualUnit (line 245) | struct ResidualUnit { method new (line 253) | fn new( method forward (line 282) | fn forward(&self, xs: &Tensor) -> Result { type NoiseBlock (line 298) | struct NoiseBlock { method new (line 303) | fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 310) | fn forward(&self, xs: &Tensor) -> Result { type DecoderBlock (line 321) | struct DecoderBlock { method new (line 331) | fn new( method forward (line 370) | fn forward(&self, xs: &Tensor) -> Result { type EncoderBlock (line 381) | struct EncoderBlock { method new (line 390) | fn new( method forward (line 420) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 430) | pub struct Encoder { method forward (line 438) | fn forward(&self, xs: &Tensor) -> Result { method new (line 448) | fn new( type ConvInit (line 497) | enum ConvInit { type Decoder (line 503) | pub struct Decoder { method new (line 513) | fn new( method forward (line 577) | fn forward(&self, xs: &Tensor) -> Result { function normalize (line 589) | fn normalize(v: &Tensor) -> Result { type VectorQuantizer (line 596) | struct VectorQuantizer { method new (line 604) | fn new( method decode_latents (line 623) | fn decode_latents(&self, latents: &Tensor) -> Result<(Tensor, Tensor)> { method encode (line 639) | fn encode(&self, z: &Tensor) -> Result<(Tensor, Tensor)> { method embed_code (line 659) | fn embed_code(&self, embed_id: &Tensor) -> Result { method decode_code (line 663) | fn decode_code(&self, embed_id: &Tensor) -> Result { type ResidualVectorQuantizer (line 669) | pub struct ResidualVectorQuantizer { method new (line 674) | fn new( method encode (line 690) | fn encode(&self, z: &Tensor) -> Result<(Tensor, Vec)> { method from_codes (line 704) | fn from_codes(&self, codes: &[&Tensor]) -> Result { function gcd (line 723) | fn gcd(mut a: usize, mut b: usize) -> usize { function lcm (line 732) | fn lcm(a: usize, b: usize) -> usize { type Model (line 738) | pub struct Model { method new (line 747) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method preprocess (line 783) | fn preprocess(&self, audio_data: &Tensor) -> Result { method encode (line 795) | pub fn encode(&self, audio_data: &Tensor) -> Result> { method decode (line 802) | pub fn decode(&self, audio_codes: &[&Tensor]) -> Result { method config (line 807) | pub fn config(&self) -> &Config { method num_codebooks (line 811) | pub fn num_codebooks(&self) -> usize { FILE: candle-transformers/src/models/stable_diffusion/attention.rs type GeGlu (line 7) | struct GeGlu { method new (line 13) | fn new(vs: nn::VarBuilder, dim_in: usize, dim_out: usize) -> Result Result { type FeedForward (line 30) | struct FeedForward { method new (line 41) | fn new(vs: nn::VarBuilder, dim: usize, dim_out: Option, mult: u... method forward (line 57) | fn forward(&self, xs: &Tensor) -> Result { function flash_attn (line 65) | fn flash_attn( function flash_attn (line 76) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type CrossAttention (line 81) | pub struct CrossAttention { method new (line 97) | pub fn new( method reshape_heads_to_batch_dim (line 131) | fn reshape_heads_to_batch_dim(&self, xs: &Tensor) -> Result { method reshape_batch_dim_to_heads (line 138) | fn reshape_batch_dim_to_heads(&self, xs: &Tensor) -> Result { method sliced_attention (line 145) | fn sliced_attention( method attention (line 173) | fn attention(&self, query: &Tensor, key: &Tensor, value: &Tensor) -> R... method forward (line 208) | pub fn forward(&self, xs: &Tensor, context: Option<&Tensor>) -> Result... type BasicTransformerBlock (line 235) | struct BasicTransformerBlock { method new (line 246) | fn new( method forward (line 289) | fn forward(&self, xs: &Tensor, context: Option<&Tensor>) -> Result Self { type Proj (line 319) | enum Proj { type SpatialTransformer (line 326) | pub struct SpatialTransformer { method new (line 336) | pub fn new( method forward (line 393) | pub fn forward(&self, xs: &Tensor, context: Option<&Tensor>) -> Result... type AttentionBlockConfig (line 439) | pub struct AttentionBlockConfig { method default (line 447) | fn default() -> Self { type AttentionBlock (line 458) | pub struct AttentionBlock { method new (line 489) | pub fn new(vs: nn::VarBuilder, channels: usize, config: AttentionBlock... method transpose_for_scores (line 517) | fn transpose_for_scores(&self, xs: Tensor) -> Result { function get_qkv_linear (line 475) | fn get_qkv_linear(channels: usize, vs: nn::VarBuilder) -> Result Result { FILE: candle-transformers/src/models/stable_diffusion/clip.rs type Activation (line 12) | pub enum Activation { method forward (line 19) | fn forward(&self, xs: &Tensor) -> Result { type Config (line 29) | pub struct Config { method v1_5 (line 46) | pub fn v1_5() -> Self { method v2_1 (line 61) | pub fn v2_1() -> Self { method sdxl (line 76) | pub fn sdxl() -> Self { method sdxl2 (line 91) | pub fn sdxl2() -> Self { method ssd1b (line 105) | pub fn ssd1b() -> Self { method ssd1b2 (line 109) | pub fn ssd1b2() -> Self { method wuerstchen (line 114) | pub fn wuerstchen() -> Self { method wuerstchen_prior (line 129) | pub fn wuerstchen_prior() -> Self { type ClipTextEmbeddings (line 147) | struct ClipTextEmbeddings { method new (line 154) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method forward (line 173) | fn forward(&self, xs: &Tensor) -> Result { type ClipAttention (line 181) | struct ClipAttention { method new (line 192) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method shape (line 212) | fn shape(&self, xs: &Tensor, seq_len: usize, bsz: usize) -> Result Resu... type ClipMlp (line 255) | struct ClipMlp { method new (line 262) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method forward (line 274) | fn forward(&self, xs: &Tensor) -> Result { type ClipEncoderLayer (line 281) | struct ClipEncoderLayer { method new (line 289) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method forward (line 302) | fn forward(&self, xs: &Tensor, causal_attention_mask: &Tensor) -> Resu... type ClipEncoder (line 316) | struct ClipEncoder { method new (line 321) | fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method forward (line 331) | fn forward(&self, xs: &Tensor, causal_attention_mask: &Tensor) -> Resu... type ClipTextTransformer (line 342) | pub struct ClipTextTransformer { method new (line 349) | pub fn new(vs: candle_nn::VarBuilder, c: &Config) -> Result { method build_causal_attention_mask (line 362) | fn build_causal_attention_mask( method forward_with_mask (line 383) | pub fn forward_with_mask(&self, xs: &Tensor, mask_after: usize) -> Res... method forward_until_encoder_layer (line 392) | pub fn forward_until_encoder_layer( method forward (line 425) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/stable_diffusion/ddim.rs type DDIMSchedulerConfig (line 17) | pub struct DDIMSchedulerConfig { method default (line 39) | fn default() -> Self { method build (line 54) | fn build(&self, inference_steps: usize) -> Result> { type DDIMScheduler (line 61) | pub struct DDIMScheduler { method new (line 74) | fn new(inference_steps: usize, config: DDIMSchedulerConfig) -> Result<... method step (line 130) | fn step(&mut self, model_output: &Tensor, timestep: usize, sample: &Tens... method scale_model_input (line 186) | fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Result<... method timesteps (line 190) | fn timesteps(&self) -> &[usize] { method add_noise (line 194) | fn add_noise(&self, original: &Tensor, noise: Tensor, timestep: usize) -... method init_noise_sigma (line 205) | fn init_noise_sigma(&self) -> f64 { FILE: candle-transformers/src/models/stable_diffusion/ddpm.rs type DDPMVarianceType (line 5) | pub enum DDPMVarianceType { type DDPMSchedulerConfig (line 15) | pub struct DDPMSchedulerConfig { method default (line 33) | fn default() -> Self { type DDPMScheduler (line 46) | pub struct DDPMScheduler { method new (line 55) | pub fn new(inference_steps: usize, config: DDPMSchedulerConfig) -> Res... method get_variance (line 92) | fn get_variance(&self, timestep: usize) -> f64 { method timesteps (line 121) | pub fn timesteps(&self) -> &[usize] { method scale_model_input (line 127) | pub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> T... method step (line 131) | pub fn step(&self, model_output: &Tensor, timestep: usize, sample: &Te... method add_noise (line 187) | pub fn add_noise( method init_noise_sigma (line 197) | pub fn init_noise_sigma(&self) -> f64 { FILE: candle-transformers/src/models/stable_diffusion/embeddings.rs type TimestepEmbedding (line 6) | pub struct TimestepEmbedding { method new (line 13) | pub fn new(vs: nn::VarBuilder, channel: usize, time_embed_dim: usize) ... method forward (line 21) | fn forward(&self, xs: &Tensor) -> Result { type Timesteps (line 28) | pub struct Timesteps { method new (line 35) | pub fn new(num_channels: usize, flip_sin_to_cos: bool, downscale_freq_... method forward (line 45) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/stable_diffusion/euler_ancestral_discrete.rs type EulerAncestralDiscreteSchedulerConfig (line 16) | pub struct EulerAncestralDiscreteSchedulerConfig { method default (line 36) | fn default() -> Self { method build (line 50) | fn build(&self, inference_steps: usize) -> Result> { type EulerAncestralDiscreteScheduler (line 60) | pub struct EulerAncestralDiscreteScheduler { method new (line 72) | pub fn new( method timesteps (line 151) | fn timesteps(&self) -> &[usize] { method scale_model_input (line 159) | fn scale_model_input(&self, sample: Tensor, timestep: usize) -> Result f64 { FILE: candle-transformers/src/models/stable_diffusion/mod.rs type StableDiffusionConfig (line 62) | pub struct StableDiffusionConfig { method v1_5 (line 73) | pub fn v1_5( method v2_1_ (line 141) | fn v2_1_( method v2_1 (line 211) | pub fn v2_1( method sdxl_ (line 225) | fn sdxl_( method sdxl_turbo_ (line 294) | fn sdxl_turbo_( method sdxl (line 366) | pub fn sdxl( method sdxl_turbo (line 380) | pub fn sdxl_turbo( method ssd1b (line 394) | pub fn ssd1b( method build_vae (line 461) | pub fn build_vae>( method build_unet (line 474) | pub fn build_unet>( method build_unet_sharded (line 494) | pub fn build_unet_sharded>( method build_scheduler (line 513) | pub fn build_scheduler(&self, n_steps: usize) -> Result>( FILE: candle-transformers/src/models/stable_diffusion/resnet.rs type ResnetBlock2DConfig (line 15) | pub struct ResnetBlock2DConfig { method default (line 34) | fn default() -> Self { type ResnetBlock2D (line 48) | pub struct ResnetBlock2D { method new (line 60) | pub fn new( method forward (line 120) | pub fn forward(&self, xs: &Tensor, temb: Option<&Tensor>) -> Result Result>; type Scheduler (line 13) | pub trait Scheduler { method timesteps (line 14) | fn timesteps(&self) -> &[usize]; method add_noise (line 16) | fn add_noise(&self, original: &Tensor, noise: Tensor, timestep: usize)... method init_noise_sigma (line 18) | fn init_noise_sigma(&self) -> f64; method scale_model_input (line 20) | fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Resul... method step (line 22) | fn step(&mut self, model_output: &Tensor, timestep: usize, sample: &Te... type BetaSchedule (line 28) | pub enum BetaSchedule { type PredictionType (line 38) | pub enum PredictionType { type TimestepSpacing (line 48) | pub enum TimestepSpacing { function betas_for_alpha_bar (line 60) | pub(crate) fn betas_for_alpha_bar(num_diffusion_timesteps: usize, max_be... FILE: candle-transformers/src/models/stable_diffusion/unet_2d.rs type BlockConfig (line 13) | pub struct BlockConfig { type UNet2DConditionModelConfig (line 22) | pub struct UNet2DConditionModelConfig { method default (line 38) | fn default() -> Self { type UNetDownBlock (line 78) | pub(crate) enum UNetDownBlock { type UNetUpBlock (line 84) | enum UNetUpBlock { type UNet2DConditionModel (line 90) | pub struct UNet2DConditionModel { method new (line 104) | pub fn new( method forward (line 299) | pub fn forward( method forward_with_additional_residuals (line 309) | pub fn forward_with_additional_residuals( FILE: candle-transformers/src/models/stable_diffusion/unet_2d_blocks.rs type Downsample2D (line 12) | struct Downsample2D { method new (line 19) | fn new( method forward (line 47) | fn forward(&self, xs: &Tensor) -> Result { type Upsample2D (line 67) | struct Upsample2D { method new (line 73) | fn new(vs: nn::VarBuilder, in_channels: usize, out_channels: usize) ->... method forward (line 85) | fn forward(&self, xs: &Tensor, size: Option<(usize, usize)>) -> Result... type DownEncoderBlock2DConfig (line 99) | pub struct DownEncoderBlock2DConfig { method default (line 109) | fn default() -> Self { type DownEncoderBlock2D (line 122) | pub struct DownEncoderBlock2D { method new (line 130) | pub fn new( method forward (line 176) | fn forward(&self, xs: &Tensor) -> Result { type UpDecoderBlock2DConfig (line 190) | pub struct UpDecoderBlock2DConfig { method default (line 199) | fn default() -> Self { type UpDecoderBlock2D (line 211) | pub struct UpDecoderBlock2D { method new (line 219) | pub fn new( method forward (line 260) | fn forward(&self, xs: &Tensor) -> Result { type UNetMidBlock2DConfig (line 274) | pub struct UNetMidBlock2DConfig { method default (line 284) | fn default() -> Self { type UNetMidBlock2D (line 296) | pub struct UNetMidBlock2D { method new (line 304) | pub fn new( method forward (line 348) | pub fn forward(&self, xs: &Tensor, temb: Option<&Tensor>) -> Result Self { type UNetMidBlock2DCrossAttn (line 389) | pub struct UNetMidBlock2DCrossAttn { method new (line 397) | pub fn new( method forward (line 451) | pub fn forward( type DownBlock2DConfig (line 467) | pub struct DownBlock2DConfig { method default (line 479) | fn default() -> Self { type DownBlock2D (line 492) | pub struct DownBlock2D { method new (line 500) | pub fn new( method forward (line 542) | pub fn forward(&self, xs: &Tensor, temb: Option<&Tensor>) -> Result<(T... type CrossAttnDownBlock2DConfig (line 563) | pub struct CrossAttnDownBlock2DConfig { method default (line 574) | fn default() -> Self { type CrossAttnDownBlock2D (line 587) | pub struct CrossAttnDownBlock2D { method new (line 595) | pub fn new( method forward (line 640) | pub fn forward( type UpBlock2DConfig (line 667) | pub struct UpBlock2DConfig { method default (line 678) | fn default() -> Self { type UpBlock2D (line 690) | pub struct UpBlock2D { method new (line 698) | pub fn new( method forward (line 746) | pub fn forward( type CrossAttnUpBlock2DConfig (line 768) | pub struct CrossAttnUpBlock2DConfig { method default (line 779) | fn default() -> Self { type CrossAttnUpBlock2D (line 792) | pub struct CrossAttnUpBlock2D { method new (line 800) | pub fn new( method forward (line 847) | pub fn forward( FILE: candle-transformers/src/models/stable_diffusion/uni_pc.rs type SigmaSchedule (line 28) | pub enum SigmaSchedule { method sigma_t (line 34) | fn sigma_t(&self, t: f64) -> f64 { method default (line 43) | fn default() -> Self { type KarrasSigmaSchedule (line 49) | pub struct KarrasSigmaSchedule { method sigma_t (line 56) | fn sigma_t(&self, t: f64) -> f64 { method default (line 67) | fn default() -> Self { type ExponentialSigmaSchedule (line 77) | pub struct ExponentialSigmaSchedule { method sigma_t (line 83) | fn sigma_t(&self, t: f64) -> f64 { method default (line 89) | fn default() -> Self { type SolverType (line 98) | pub enum SolverType { type AlgorithmType (line 105) | pub enum AlgorithmType { type FinalSigmasType (line 112) | pub enum FinalSigmasType { type TimestepSchedule (line 119) | pub enum TimestepSchedule { method timesteps (line 127) | fn timesteps( type CorrectorConfiguration (line 174) | pub enum CorrectorConfiguration { method new (line 188) | pub fn new(disabled_steps: impl IntoIterator) -> Self { method default (line 180) | fn default() -> Self { type UniPCSchedulerConfig (line 196) | pub struct UniPCSchedulerConfig { method default (line 222) | fn default() -> Self { method build (line 240) | fn build(&self, inference_steps: usize) -> Result> { type State (line 248) | struct State { method new (line 256) | fn new(solver_order: usize) -> Self { method lower_order_nums (line 265) | fn lower_order_nums(&self) -> usize { method update_lower_order_nums (line 269) | fn update_lower_order_nums(&mut self, n: usize) { method model_outputs (line 273) | fn model_outputs(&self) -> &[Option] { method update_model_output (line 277) | fn update_model_output(&mut self, idx: usize, output: Option) { method last_sample (line 281) | fn last_sample(&self) -> Option<&Tensor> { method update_last_sample (line 285) | fn update_last_sample(&mut self, sample: Tensor) { method order (line 289) | fn order(&self) -> usize { method update_order (line 293) | fn update_order(&mut self, order: usize) { type EdmDpmMultistepScheduler (line 298) | pub struct EdmDpmMultistepScheduler { method new (line 305) | pub fn new(config: UniPCSchedulerConfig, num_inference_steps: usize) -... method step_index (line 320) | fn step_index(&self, timestep: usize) -> usize { method timestep (line 337) | fn timestep(&self, step_idx: usize) -> usize { method convert_model_output (line 345) | fn convert_model_output( method threshold_sample (line 369) | fn threshold_sample(&self, sample: Tensor) -> Result { method multistep_uni_p_bh_update (line 383) | fn multistep_uni_p_bh_update(&self, sample: &Tensor, timestep: usize) ... method multistep_uni_c_bh_update (line 485) | fn multistep_uni_c_bh_update( method step (line 602) | fn step(&mut self, model_output: &Tensor, timestep: usize, sample: &Tens... method scale_model_input (line 653) | fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Result<... method timesteps (line 657) | fn timesteps(&self) -> &[usize] { method add_noise (line 661) | fn add_noise(&self, original: &Tensor, noise: Tensor, timestep: usize) -... method init_noise_sigma (line 670) | fn init_noise_sigma(&self) -> f64 { type Schedule (line 676) | struct Schedule { method new (line 685) | fn new( method timesteps (line 703) | fn timesteps(&self) -> &[usize] { method num_training_steps (line 707) | fn num_training_steps(&self) -> usize { method t (line 711) | fn t(&self, step: usize) -> f64 { method alpha_t (line 715) | fn alpha_t(&self, t: usize) -> f64 { method sigma_t (line 719) | fn sigma_t(&self, t: usize) -> f64 { method lambda_t (line 723) | fn lambda_t(&self, t: usize) -> f64 { type Quantile (line 734) | pub struct Quantile { method new (line 743) | pub fn new(p: f64) -> Quantile { method max (line 754) | pub fn max(&self) -> f64 { method p (line 758) | fn p(&self) -> f64 { method parabolic (line 762) | fn parabolic(&self, i: usize, d: f64) -> f64 { method linear (line 774) | fn linear(&self, i: usize, d: f64) -> f64 { method quantile (line 779) | pub fn quantile(&self) -> f64 { method len (line 807) | fn len(&self) -> u64 { method is_empty (line 811) | fn is_empty(&self) -> bool { method add (line 815) | pub fn add(&mut self, x: f64) { method with_samples (line 870) | pub fn with_samples(mut self, samples: impl IntoIterator) ... function sort_floats (line 879) | fn sort_floats(v: &mut [f64]) { function inverse (line 887) | pub fn inverse(m: &Tensor) -> Result { function adjoint (line 891) | pub fn adjoint(m: &Tensor) -> Result { function cofactor (line 895) | pub fn cofactor(m: &Tensor) -> Result { function determinant (line 924) | pub fn determinant(m: &Tensor) -> Result { function minors (line 939) | pub fn minors(m: &Tensor) -> Result { type TensordotGeneral (line 960) | pub struct TensordotGeneral { method eval (line 968) | pub fn eval(&self, lhs: &Tensor, rhs: &Tensor) -> Result { type TensordotFixedPosition (line 979) | pub struct TensordotFixedPosition { method eval (line 987) | fn eval(&self, lhs: &Tensor, rhs: &Tensor) -> Result { type Permutation (line 996) | pub struct Permutation { method eval (line 1001) | fn eval(&self, tensor: &Tensor) -> Result { FILE: candle-transformers/src/models/stable_diffusion/utils.rs function linspace (line 3) | pub fn linspace(start: f64, stop: f64, steps: usize) -> Result { type LinearInterpolator (line 18) | struct LinearInterpolator<'x, 'y> { function accel_find (line 25) | fn accel_find(&mut self, x: f64) -> usize { function eval (line 38) | fn eval(&mut self, x: f64) -> f64 { function interp (line 58) | pub fn interp(x: &[f64], xp: &[f64], fp: &[f64]) -> Vec { FILE: candle-transformers/src/models/stable_diffusion/vae.rs type EncoderConfig (line 16) | struct EncoderConfig { method default (line 25) | fn default() -> Self { type Encoder (line 36) | struct Encoder { method new (line 47) | fn new( method forward (line 134) | fn forward(&self, xs: &Tensor) -> Result { type DecoderConfig (line 148) | struct DecoderConfig { method default (line 156) | fn default() -> Self { type Decoder (line 166) | struct Decoder { method new (line 177) | fn new( method forward (line 261) | fn forward(&self, xs: &Tensor) -> Result { type AutoEncoderKLConfig (line 273) | pub struct AutoEncoderKLConfig { method default (line 283) | fn default() -> Self { type DiagonalGaussianDistribution (line 295) | pub struct DiagonalGaussianDistribution { method new (line 301) | pub fn new(parameters: &Tensor) -> Result { method sample (line 309) | pub fn sample(&self) -> Result { type AutoEncoderKL (line 319) | pub struct AutoEncoderKL { method new (line 328) | pub fn new( method encode (line 386) | pub fn encode(&self, xs: &Tensor) -> Result Result { FILE: candle-transformers/src/models/stable_lm.rs type Config (line 24) | pub struct Config { method stablelm_3b_4e1t (line 44) | pub fn stablelm_3b_4e1t(use_flash_attn: bool) -> Self { method head_dim (line 63) | pub fn head_dim(&self) -> usize { method rotary_ndims (line 67) | pub fn rotary_ndims(&self) -> usize { method num_kv_groups (line 71) | pub fn num_kv_groups(&self) -> usize { method set_use_flash_attn (line 75) | pub fn set_use_flash_attn(&mut self, use_flash_attn: bool) { type RotaryEmbedding (line 81) | pub(crate) struct RotaryEmbedding { method new (line 92) | pub(crate) fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result<... method apply_rotary_emb_qkv (line 112) | pub(crate) fn apply_rotary_emb_qkv( function rotate_half (line 86) | fn rotate_half(xs: &Tensor) -> Result { type MLP (line 131) | struct MLP { method new (line 140) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 157) | fn forward(&self, xs: &Tensor) -> Result { function flash_attn (line 166) | fn flash_attn( function flash_attn (line 177) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... type Attention (line 182) | struct Attention { method new (line 201) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 235) | fn forward( type DecoderLayer (line 311) | struct DecoderLayer { method new (line 320) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 342) | fn forward( type Model (line 360) | pub struct Model { method new (line 371) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 395) | fn prepare_decoder_attention_mask( method forward (line 416) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... FILE: candle-transformers/src/models/starcoder2.rs type Config (line 23) | pub struct Config { type RotaryEmbedding (line 39) | struct RotaryEmbedding { method new (line 52) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 72) | fn apply_rotary_emb_qkv( function rotate_half (line 44) | fn rotate_half(xs: &Tensor) -> Result { type MLP (line 91) | struct MLP { method new (line 98) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 111) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 117) | struct Attention { method new (line 132) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 158) | fn forward( method clear_kv_cache (line 212) | fn clear_kv_cache(&mut self) { type DecoderLayer (line 218) | struct DecoderLayer { method new (line 226) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 244) | fn forward( method clear_kv_cache (line 259) | fn clear_kv_cache(&mut self) { type Model (line 265) | pub struct Model { method new (line 276) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 300) | fn prepare_decoder_attention_mask( method forward (line 329) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... method clear_kv_cache (line 346) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/stella_en_v5.rs type ModelVariant (line 25) | pub enum ModelVariant { type Config (line 34) | pub struct Config { method new_1_5_b_v5 (line 96) | pub fn new_1_5_b_v5(embed_dim: EmbedDim) -> Self { method new_400_m_v5 (line 117) | pub fn new_400_m_v5(embed_dim: EmbedDim) -> Self { type EmbedHead (line 57) | pub struct EmbedHead { type EmbedDim (line 65) | pub enum EmbedDim { method config (line 77) | pub fn config(&self, in_features: usize) -> EmbedHead { type RotaryEmbedding (line 138) | struct RotaryEmbedding { method new (line 144) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 192) | fn apply_rotary_emb_qkv(&self, q: &Tensor, k: &Tensor) -> Result<(Tens... type MLP (line 205) | struct MLP { method new (line 214) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 246) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 274) | struct Attention { method new (line 287) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 343) | fn forward(&mut self, xs: &Tensor, attention_mask: Option<&Tensor>) ->... type NormType (line 431) | enum NormType { type Layer (line 437) | struct Layer { method new (line 448) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 501) | fn forward(&mut self, xs: &Tensor, attention_mask: Option<&Tensor>) ->... type Embeddings (line 567) | pub struct Embeddings { method new (line 579) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 635) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 668) | pub struct Model { method new (line 677) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_attention_mask (line 712) | fn prepare_attention_mask(&self, attn_mask: &Tensor) -> Result { method forward (line 726) | pub fn forward(&mut self, input_ids: &Tensor, mask: &Tensor) -> Result... type EmbeddingModel (line 749) | pub struct EmbeddingModel { method new (line 755) | pub fn new(cfg: &Config, base_vb: VarBuilder, embed_vb: VarBuilder) ->... method forward (line 769) | pub fn forward(&mut self, input_ids: &Tensor, mask: &Tensor) -> Result... method forward_norm (line 778) | pub fn forward_norm(&mut self, input_ids: &Tensor, mask: &Tensor) -> R... method pool (line 784) | fn pool(&self, x: &Tensor, mask: &Tensor) -> Result { FILE: candle-transformers/src/models/t5.rs type Linear (line 69) | pub struct Linear { function linear_no_bias (line 74) | pub fn linear_no_bias(d1: usize, d2: usize, vb: VarBuilder) -> Result Result { function default_relative_attention_max_distance (line 94) | fn default_relative_attention_max_distance() -> usize { function default_is_decoder (line 98) | fn default_is_decoder() -> bool { function default_use_cache (line 102) | fn default_use_cache() -> bool { function default_tie_word_embeddings (line 106) | fn default_tie_word_embeddings() -> bool { function get_mask (line 110) | fn get_mask(size: usize, device: &Device) -> Result { function masked_fill (line 117) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type ActivationWithOptionalGating (line 125) | pub struct ActivationWithOptionalGating { function deserialize_feed_forward_proj_activation (line 130) | pub fn deserialize_feed_forward_proj_activation<'de, D>( type Config (line 156) | pub struct Config { method musicgen_small (line 216) | pub fn musicgen_small() -> Self { method default (line 185) | fn default() -> Self { type T5LayerNorm (line 246) | struct T5LayerNorm { method load (line 253) | fn load(h: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 264) | fn forward(&self, xs: &Tensor) -> Result { type T5DenseActDense (line 278) | struct T5DenseActDense { method load (line 286) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 299) | fn forward(&self, xs: &Tensor) -> Result { type T5DenseGatedActDense (line 309) | struct T5DenseGatedActDense { method load (line 318) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 333) | fn forward(&self, xs: &Tensor) -> Result { type T5LayerFF (line 344) | struct T5LayerFF { method load (line 352) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 376) | fn forward(&self, xs: &Tensor) -> Result { type T5Attention (line 389) | struct T5Attention { method load (line 409) | fn load( method forward (line 450) | fn forward( method clear_kv_cache (line 579) | fn clear_kv_cache(&mut self) { type T5LayerSelfAttention (line 585) | struct T5LayerSelfAttention { method load (line 592) | fn load(h: bool, d: bool, vb: VarBuilder, cfg: &Config) -> Result { method forward (line 603) | fn forward( method clear_kv_cache (line 618) | fn clear_kv_cache(&mut self) { type T5LayerCrossAttention (line 624) | struct T5LayerCrossAttention { method load (line 631) | fn load(decoder: bool, vb: VarBuilder, cfg: &Config) -> Result { method forward (line 642) | fn forward( method clear_kv_cache (line 660) | fn clear_kv_cache(&mut self) { type T5Block (line 666) | struct T5Block { method load (line 674) | fn load( method forward (line 698) | fn forward( method clear_kv_cache (line 730) | fn clear_kv_cache(&mut self) { type T5Stack (line 737) | struct T5Stack { method load (line 745) | fn load(decoder: bool, vb: VarBuilder, shared: &Arc, cfg: &... method forward (line 762) | fn forward( method forward_dt (line 770) | fn forward_dt( method clear_kv_cache (line 794) | fn clear_kv_cache(&mut self) { type T5EncoderModel (line 800) | pub struct T5EncoderModel { method load (line 807) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 825) | pub fn forward(&mut self, input_ids: &Tensor) -> Result { method forward_dt (line 830) | pub fn forward_dt(&mut self, input_ids: &Tensor, dtype: Option)... method device (line 835) | pub fn device(&self) -> &Device { method clear_kv_cache (line 839) | pub fn clear_kv_cache(&mut self) { type T5ForConditionalGeneration (line 845) | pub struct T5ForConditionalGeneration { method load (line 858) | pub fn load(vb: VarBuilder, cfg: &Config) -> Result { method encode (line 905) | pub fn encode(&mut self, input_ids: &Tensor) -> Result { method decode (line 909) | pub fn decode( method forward (line 940) | pub fn forward(&mut self, input_ids: &Tensor, decoder_input_ids: &Tens... method device (line 945) | pub fn device(&self) -> &Device { method clear_kv_cache (line 949) | pub fn clear_kv_cache(&mut self) { FILE: candle-transformers/src/models/trocr.rs function default_tie_word_embeddings (line 23) | fn default_tie_word_embeddings() -> bool { function default_use_learned_position_embeddings (line 26) | fn default_use_learned_position_embeddings() -> bool { type TrOCRConfig (line 31) | pub struct TrOCRConfig { method default (line 59) | fn default() -> Self { type TrOCRLearnedPositionalEmbedding (line 88) | struct TrOCRLearnedPositionalEmbedding { method load (line 94) | fn load(vb: VarBuilder, cfg: &TrOCRConfig) -> Result { method new_sinusoidal (line 103) | fn new_sinusoidal(vb: VarBuilder, cfg: &TrOCRConfig) -> Result { method forward (line 135) | fn forward(&mut self, input_ids: &Tensor, past_key_values_length: u32)... type TrOCRAttention (line 152) | struct TrOCRAttention { method load (line 165) | fn load( method reset_kv_cache (line 195) | fn reset_kv_cache(&mut self) { method _shape (line 199) | fn _shape(&self, tensor: &Tensor, bsz: usize) -> Result { method forward (line 206) | fn forward( type TrOCRDecoderLayer (line 259) | struct TrOCRDecoderLayer { method load (line 271) | fn load(vb: VarBuilder, cfg: &TrOCRConfig) -> Result { method reset_kv_cache (line 298) | fn reset_kv_cache(&mut self) { method forward (line 302) | fn forward( type TrOCRDecoder (line 337) | pub struct TrOCRDecoder { method new (line 345) | fn new(cfg: &TrOCRConfig, vb: VarBuilder) -> Result { method reset_kv_cache (line 374) | fn reset_kv_cache(&mut self) { method forward (line 378) | pub fn forward( type TrOCREncoder (line 403) | pub struct TrOCREncoder { method new (line 410) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 425) | pub fn forward(&self, xs: &Tensor) -> Result { type TrOCRForCausalLM (line 434) | pub struct TrOCRForCausalLM { method new (line 440) | pub fn new(decoder_cfg: &TrOCRConfig, vb: VarBuilder) -> Result { method forward (line 457) | pub fn forward( method reset_kv_cache (line 472) | fn reset_kv_cache(&mut self) { type TrOCRModel (line 478) | pub struct TrOCRModel { method new (line 484) | pub fn new(encoder_cfg: &Config, decoder_cfg: &TrOCRConfig, vb: VarBui... method encoder (line 490) | pub fn encoder(&mut self) -> &mut TrOCREncoder { method decoder (line 494) | pub fn decoder(&mut self) -> &mut TrOCRForCausalLM { method decode (line 498) | pub fn decode( method reset_kv_cache (line 514) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/vgg.rs type Models (line 20) | pub enum Models { type Vgg (line 28) | pub struct Vgg<'a> { type PreLogitConfig (line 33) | struct PreLogitConfig { function new (line 42) | pub fn new(vb: VarBuilder<'a>, model: Models) -> Result { method forward_t (line 54) | fn forward_t(&self, xs: &Tensor, train: bool) -> Result { function conv2d_block (line 65) | fn conv2d_block(convs: &[(usize, usize, &str)], vb: &VarBuilder) -> Resu... function fully_connected (line 95) | fn fully_connected( function get_weights_and_biases (line 128) | fn get_weights_and_biases( function vgg13_blocks (line 146) | fn vgg13_blocks(vb: VarBuilder) -> Result> { function vgg16_blocks (line 172) | fn vgg16_blocks(vb: VarBuilder) -> Result> { function vgg19_blocks (line 219) | fn vgg19_blocks(vb: VarBuilder) -> Result> { FILE: candle-transformers/src/models/vit.rs type Config (line 24) | pub struct Config { method vit_base_patch16_224 (line 39) | pub fn vit_base_patch16_224() -> Self { method microsoft_trocr_base_handwritten (line 54) | pub fn microsoft_trocr_base_handwritten() -> Self { type PatchEmbeddings (line 71) | struct PatchEmbeddings { method new (line 77) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 100) | fn forward(&self, pixel_values: &Tensor) -> Result { type Embeddings (line 110) | pub struct Embeddings { method new (line 119) | pub fn new(cfg: &Config, use_mask_token: bool, vb: VarBuilder) -> Resu... method interpolate_pos_encoding (line 140) | fn interpolate_pos_encoding( method forward (line 149) | pub fn forward( type SelfAttention (line 181) | struct SelfAttention { method new (line 190) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method transpose_for_scores (line 213) | fn transpose_for_scores(&self, xs: &Tensor) -> Result { method forward (line 226) | fn forward(&self, xs: &Tensor) -> Result { type SelfOutput (line 247) | struct SelfOutput { method new (line 252) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 259) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 265) | struct Attention { method new (line 271) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 279) | fn forward(&self, xs: &Tensor) -> Result { type Intermediate (line 285) | struct Intermediate { method new (line 291) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 301) | fn forward(&self, xs: &Tensor) -> Result { type Output (line 307) | struct Output { method new (line 312) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 317) | fn forward(&self, xs: &Tensor, input_tensor: &Tensor) -> Result { type Layer (line 323) | struct Layer { method new (line 332) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 350) | fn forward(&self, xs: &Tensor) -> Result { type Encoder (line 358) | pub struct Encoder { method new (line 363) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 375) | fn forward(&self, xs: &Tensor) -> Result { type Model (line 385) | pub struct Model { method new (line 394) | pub fn new(cfg: &Config, num_labels: usize, vb: VarBuilder) -> Result<... method forward (line 408) | pub fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/voxtral/audio.rs function pcm_to_mel (line 5) | pub fn pcm_to_mel(samples: &[T], filters: &[T]) -> Vec { function extract_features (line 17) | pub fn extract_features(audio: &[f32], filters: &[f32], device: &Device)... FILE: candle-transformers/src/models/voxtral/mod.rs constant N_FFT (line 12) | pub const N_FFT: usize = 400; constant HOP_LENGTH (line 13) | pub const HOP_LENGTH: usize = 160; constant N_MELS (line 14) | pub const N_MELS: usize = 128; FILE: candle-transformers/src/models/voxtral/model.rs type VoxtralEncoderConfig (line 9) | pub struct VoxtralEncoderConfig { method with_whisper_compatibility (line 74) | pub fn with_whisper_compatibility(mut self) -> Self { type VoxtralConfig (line 30) | pub struct VoxtralConfig { method default (line 38) | fn default() -> Self { method default (line 49) | fn default() -> Self { type VoxtralCache (line 84) | pub struct VoxtralCache { method new (line 114) | pub fn new( method reset (line 128) | pub fn reset(&mut self) { type VoxtralGenerationConfig (line 92) | pub struct VoxtralGenerationConfig { method new (line 102) | pub fn new(device: Device) -> Self { function safe_clamp (line 139) | fn safe_clamp(x: &Tensor) -> Result { function replace_audio_tokens (line 155) | pub fn replace_audio_tokens( function find_audio_token_positions (line 234) | pub fn find_audio_token_positions( type VoxtralAttention (line 260) | struct VoxtralAttention { method new (line 272) | fn new(cfg: &VoxtralEncoderConfig, vb: VarBuilder) -> Result { method reshape_for_scores (line 306) | fn reshape_for_scores(&self, x: &Tensor, seq_len: usize, bsz: usize) -... method forward (line 314) | fn forward(&self, x: &Tensor) -> Result { type VoxtralEncoderLayer (line 352) | struct VoxtralEncoderLayer { method new (line 364) | fn new(cfg: &VoxtralEncoderConfig, vb: VarBuilder) -> Result { method get_fc1_out_dim (line 397) | pub fn get_fc1_out_dim(&self) -> usize { method forward (line 403) | fn forward(&self, x: &Tensor, training: bool) -> Result { type VoxtralEncoder (line 427) | pub struct VoxtralEncoder { method new (line 438) | pub fn new(cfg: &VoxtralEncoderConfig, vb: VarBuilder) -> Result { method forward (line 497) | pub fn forward(&self, input_features: &Tensor) -> Result { method forward_with_training (line 501) | pub fn forward_with_training(&self, input_features: &Tensor, training:... method forward_layer_with_dropout (line 598) | fn forward_layer_with_dropout( method get_intermediate_size (line 621) | pub fn get_intermediate_size(&self) -> usize { method process_long_audio (line 631) | pub fn process_long_audio( type VoxtralMultiModalProjector (line 683) | pub struct VoxtralMultiModalProjector { method new (line 690) | pub fn new(cfg: &VoxtralConfig, vb: VarBuilder) -> Result { method forward (line 719) | pub fn forward(&self, audio_features: &Tensor) -> Result { type VoxtralForConditionalGeneration (line 727) | pub struct VoxtralForConditionalGeneration { method new (line 737) | pub fn new(cfg: &VoxtralConfig, vb: VarBuilder) -> Result { method audio_token_id (line 754) | pub fn audio_token_id(&self) -> usize { method text_config (line 759) | pub fn text_config(&self) -> &VoxtralLlamaConfig { method audio_config (line 764) | pub fn audio_config(&self) -> &VoxtralEncoderConfig { method get_audio_embeds (line 769) | pub fn get_audio_embeds(&self, input_features: &Tensor) -> Result Result<... FILE: candle-transformers/src/models/voxtral/voxtral_llama.rs constant DEFAULT_MAX_SEQ_LEN (line 7) | pub const DEFAULT_MAX_SEQ_LEN: usize = 4096; type VoxtralLlamaConfig (line 10) | pub struct VoxtralLlamaConfig { method voxtral_3b (line 27) | pub fn voxtral_3b() -> Self { method voxtral_24b (line 45) | pub fn voxtral_24b() -> Self { type VoxtralLlamaCache (line 64) | pub struct VoxtralLlamaCache { method new (line 84) | pub fn new( method mask (line 113) | fn mask(&mut self, t: usize) -> Result { function calculate_default_inv_freq (line 73) | fn calculate_default_inv_freq(cfg: &VoxtralLlamaConfig) -> Vec { type CausalSelfAttention (line 128) | struct CausalSelfAttention { method apply_rotary_emb (line 159) | fn apply_rotary_emb( method forward (line 186) | fn forward( method repeat_kv (line 278) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 282) | fn load(vb: VarBuilder, cfg: &VoxtralLlamaConfig) -> Result { function flash_attn (line 143) | fn flash_attn( function flash_attn (line 154) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... function masked_fill (line 314) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 322) | struct Mlp { method forward (line 330) | fn forward(&self, x: &Tensor) -> Result { method load (line 336) | fn load(vb: VarBuilder, cfg: &VoxtralLlamaConfig) -> Result { type Block (line 353) | struct Block { method forward (line 362) | fn forward( method load (line 378) | fn load(vb: VarBuilder, cfg: &VoxtralLlamaConfig) -> Result { type VoxtralLlama (line 399) | pub struct VoxtralLlama { method embed (line 408) | pub fn embed(&self, x: &Tensor) -> Result { method forward_input_embed (line 412) | pub fn forward_input_embed( method forward (line 435) | pub fn forward( method load (line 452) | pub fn load(vb: VarBuilder, cfg: &VoxtralLlamaConfig) -> Result { FILE: candle-transformers/src/models/whisper/audio.rs type Float (line 8) | pub trait Float: function fft (line 17) | fn fft(inp: &[T]) -> Vec { function dft (line 63) | fn dft(inp: &[T]) -> Vec { function log_mel_spectrogram_w (line 90) | fn log_mel_spectrogram_w( function log_mel_spectrogram_ (line 170) | pub fn log_mel_spectrogram_( function pcm_to_mel (line 268) | pub fn pcm_to_mel(cfg: &super::Config, samples: &[T], filters:... function test_fft (line 284) | fn test_fft() { function test_dft (line 303) | fn test_dft() { function test_log_mel_spectrogram (line 322) | fn test_log_mel_spectrogram() { function test_tiny_log_mel_spectrogram (line 330) | fn test_tiny_log_mel_spectrogram() { FILE: candle-transformers/src/models/whisper/mod.rs type Config (line 22) | pub struct Config { constant DTYPE (line 37) | pub const DTYPE: candle::DType = candle::DType::F32; constant SAMPLE_RATE (line 40) | pub const SAMPLE_RATE: usize = 16000; constant N_FFT (line 41) | pub const N_FFT: usize = 400; constant HOP_LENGTH (line 42) | pub const HOP_LENGTH: usize = 160; constant CHUNK_LENGTH (line 43) | pub const CHUNK_LENGTH: usize = 30; constant N_SAMPLES (line 44) | pub const N_SAMPLES: usize = CHUNK_LENGTH * SAMPLE_RATE; constant N_FRAMES (line 45) | pub const N_FRAMES: usize = N_SAMPLES / HOP_LENGTH; constant NO_SPEECH_THRESHOLD (line 47) | pub const NO_SPEECH_THRESHOLD: f64 = 0.6; constant LOGPROB_THRESHOLD (line 48) | pub const LOGPROB_THRESHOLD: f64 = -1.0; constant TEMPERATURES (line 49) | pub const TEMPERATURES: [f64; 6] = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]; constant COMPRESSION_RATIO_THRESHOLD (line 50) | pub const COMPRESSION_RATIO_THRESHOLD: f64 = 2.4; constant SOT_TOKEN (line 53) | pub const SOT_TOKEN: &str = "<|startoftranscript|>"; constant TRANSCRIBE_TOKEN (line 54) | pub const TRANSCRIBE_TOKEN: &str = "<|transcribe|>"; constant TRANSLATE_TOKEN (line 55) | pub const TRANSLATE_TOKEN: &str = "<|translate|>"; constant NO_TIMESTAMPS_TOKEN (line 56) | pub const NO_TIMESTAMPS_TOKEN: &str = "<|notimestamps|>"; constant EOT_TOKEN (line 57) | pub const EOT_TOKEN: &str = "<|endoftext|>"; constant NO_SPEECH_TOKENS (line 58) | pub const NO_SPEECH_TOKENS: [&str; 2] = ["<|nocaptions|>", "<|nospeech|>"]; FILE: candle-transformers/src/models/whisper/model.rs function conv1d (line 6) | fn conv1d( function layer_norm (line 18) | fn layer_norm(size: usize, vb: VarBuilder) -> Result { type MultiHeadAttention (line 26) | struct MultiHeadAttention { method load (line 39) | fn load(n_state: usize, n_head: usize, vb: VarBuilder) -> Result { method forward (line 60) | fn forward( method reshape_head (line 94) | fn reshape_head(&self, x: &Tensor) -> Result { method qkv_attention (line 100) | fn qkv_attention( method reset_kv_cache (line 133) | fn reset_kv_cache(&mut self) { type ResidualAttentionBlock (line 140) | struct ResidualAttentionBlock { method load (line 151) | fn load(n_state: usize, n_head: usize, ca: bool, vb: VarBuilder) -> Re... method forward (line 177) | fn forward( method reset_kv_cache (line 201) | fn reset_kv_cache(&mut self) { function sinusoids (line 209) | fn sinusoids(length: usize, channels: usize, device: &Device) -> Result<... type AudioEncoder (line 227) | pub struct AudioEncoder { method load (line 239) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 281) | pub fn forward(&mut self, x: &Tensor, flush_kv_cache: bool) -> Result<... type TextDecoder (line 305) | pub struct TextDecoder { method load (line 316) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 345) | pub fn forward(&mut self, x: &Tensor, xa: &Tensor, flush_kv_cache: boo... method final_linear (line 357) | pub fn final_linear(&self, x: &Tensor) -> Result { method reset_kv_cache (line 367) | pub fn reset_kv_cache(&mut self) { type Whisper (line 376) | pub struct Whisper { method load (line 383) | pub fn load(vb: &VarBuilder, config: Config) -> Result { method reset_kv_cache (line 393) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/whisper/quantized_model.rs function conv1d (line 7) | fn conv1d( type MultiHeadAttention (line 23) | struct MultiHeadAttention { method load (line 36) | fn load(n_state: usize, n_head: usize, vb: VarBuilder) -> Result { method forward (line 57) | fn forward( method reshape_head (line 91) | fn reshape_head(&self, x: &Tensor) -> Result { method qkv_attention (line 97) | fn qkv_attention( method reset_kv_cache (line 130) | fn reset_kv_cache(&mut self) { type ResidualAttentionBlock (line 137) | struct ResidualAttentionBlock { method load (line 148) | fn load(n_state: usize, n_head: usize, ca: bool, vb: VarBuilder) -> Re... method forward (line 174) | fn forward( method reset_kv_cache (line 197) | fn reset_kv_cache(&mut self) { function sinusoids (line 205) | fn sinusoids(length: usize, channels: usize, device: &Device) -> Result<... type AudioEncoder (line 223) | pub struct AudioEncoder { method load (line 235) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 277) | pub fn forward(&mut self, x: &Tensor, flush_kv_cache: bool) -> Result<... method reset_kv_cache (line 298) | pub fn reset_kv_cache(&mut self) { type TextDecoder (line 307) | pub struct TextDecoder { method load (line 318) | fn load(vb: VarBuilder, cfg: &Config) -> Result { method forward (line 349) | pub fn forward(&mut self, x: &Tensor, xa: &Tensor, flush_kv_cache: boo... method final_linear (line 361) | pub fn final_linear(&self, x: &Tensor) -> Result { method reset_kv_cache (line 371) | pub fn reset_kv_cache(&mut self) { type Whisper (line 380) | pub struct Whisper { method load (line 387) | pub fn load(vb: &VarBuilder, config: Config) -> Result { method reset_kv_cache (line 397) | pub fn reset_kv_cache(&mut self) { FILE: candle-transformers/src/models/with_tracing.rs type Embedding (line 5) | pub struct Embedding { method new (line 11) | pub fn new(d1: usize, d2: usize, vb: VarBuilder) -> Result { method from_weights (line 17) | pub fn from_weights(weights: Tensor) -> Result { method embeddings (line 24) | pub fn embeddings(&self) -> &Tensor { method forward (line 30) | fn forward(&self, xs: &Tensor) -> Result { type Linear (line 37) | pub struct Linear { method from_weights (line 43) | pub fn from_weights(weights: Tensor, bias: Option) -> Self { function linear_b (line 50) | pub fn linear_b(d1: usize, d2: usize, b: bool, vb: VarBuilder) -> Result... function linear (line 56) | pub fn linear(d1: usize, d2: usize, vb: VarBuilder) -> Result { function linear_no_bias (line 62) | pub fn linear_no_bias(d1: usize, d2: usize, vb: VarBuilder) -> Result Result { type Conv2d (line 77) | pub struct Conv2d { method forward (line 83) | fn forward(&self, x: &Tensor) -> Result { function conv2d (line 89) | pub fn conv2d( type QMatMul (line 103) | pub struct QMatMul { method new (line 109) | pub fn new( method from_weights (line 120) | pub fn from_weights(ws: std::sync::Arc) ->... method fmt (line 135) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { method forward (line 128) | fn forward(&self, xs: &Tensor) -> Result { type LayerNorm (line 141) | pub struct LayerNorm { method new (line 147) | pub fn new(weight: Tensor, bias: Tensor, eps: f64) -> Self { method forward (line 155) | fn forward(&self, xs: &Tensor) -> Result { function layer_norm (line 161) | pub fn layer_norm>( type RmsNorm (line 172) | pub struct RmsNorm { method new (line 178) | pub fn new(size: usize, eps: f64, vb: VarBuilder) -> Result { method forward_diff (line 184) | pub fn forward_diff(&self, x: &Tensor) -> Result { method forward (line 191) | fn forward(&self, x: &Tensor) -> Result { FILE: candle-transformers/src/models/wuerstchen/attention_processor.rs type Attention (line 7) | pub struct Attention { method new (line 34) | pub fn new( method batch_to_head_dim (line 58) | fn batch_to_head_dim(&self, xs: &Tensor) -> Result { method head_to_batch_dim (line 65) | fn head_to_batch_dim(&self, xs: &Tensor) -> Result { method get_attention_scores (line 72) | fn get_attention_scores(&self, query: &Tensor, key: &Tensor) -> Result... method forward (line 77) | pub fn forward(&self, xs: &Tensor, encoder_hidden_states: &Tensor) -> ... function flash_attn (line 18) | fn flash_attn( function flash_attn (line 29) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... FILE: candle-transformers/src/models/wuerstchen/common.rs type WLayerNorm (line 6) | pub struct WLayerNorm { method new (line 11) | pub fn new(_size: usize) -> Result { method forward (line 17) | fn forward(&self, xs: &Tensor) -> Result { type LayerNormNoWeights (line 38) | pub struct LayerNormNoWeights { method new (line 43) | pub fn new(_size: usize) -> Result { method forward (line 49) | fn forward(&self, xs: &Tensor) -> Result { type TimestepBlock (line 66) | pub struct TimestepBlock { method new (line 71) | pub fn new(c: usize, c_timestep: usize, vb: VarBuilder) -> Result { method forward (line 76) | pub fn forward(&self, xs: &Tensor, t: &Tensor) -> Result { type GlobalResponseNorm (line 88) | pub struct GlobalResponseNorm { method new (line 94) | pub fn new(dim: usize, vb: VarBuilder) -> Result { method forward (line 102) | fn forward(&self, xs: &Tensor) -> Result { type ResBlock (line 114) | pub struct ResBlock { method new (line 123) | pub fn new(c: usize, c_skip: usize, ksize: usize, vb: VarBuilder) -> R... method forward (line 143) | pub fn forward(&self, xs: &Tensor, x_skip: Option<&Tensor>) -> Result<... type AttnBlock (line 164) | pub struct AttnBlock { method new (line 172) | pub fn new( method forward (line 191) | pub fn forward(&self, xs: &Tensor, kv: &Tensor) -> Result { FILE: candle-transformers/src/models/wuerstchen/ddpm.rs type DDPMWSchedulerConfig (line 4) | pub struct DDPMWSchedulerConfig { method default (line 10) | fn default() -> Self { type DDPMWScheduler (line 18) | pub struct DDPMWScheduler { method new (line 26) | pub fn new(inference_steps: usize, config: DDPMWSchedulerConfig) -> Re... method timesteps (line 41) | pub fn timesteps(&self) -> &[f64] { method alpha_cumprod (line 45) | fn alpha_cumprod(&self, t: f64) -> f64 { method previous_timestep (line 62) | fn previous_timestep(&self, ts: f64) -> f64 { method scale_model_input (line 76) | pub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> T... method step (line 80) | pub fn step(&self, model_output: &Tensor, ts: f64, sample: &Tensor) ->... method init_noise_sigma (line 100) | pub fn init_noise_sigma(&self) -> f64 { FILE: candle-transformers/src/models/wuerstchen/diffnext.rs type ResBlockStageB (line 6) | pub struct ResBlockStageB { method new (line 15) | pub fn new(c: usize, c_skip: usize, ksize: usize, vb: VarBuilder) -> R... method forward (line 35) | pub fn forward(&self, xs: &Tensor, x_skip: Option<&Tensor>) -> Result<... type SubBlock (line 55) | struct SubBlock { type DownBlock (line 62) | struct DownBlock { type UpBlock (line 69) | struct UpBlock { type WDiffNeXt (line 76) | pub struct WDiffNeXt { method new (line 92) | pub fn new( method gen_r_embedding (line 285) | fn gen_r_embedding(&self, r: &Tensor) -> Result { method gen_c_embeddings (line 303) | fn gen_c_embeddings(&self, clip: &Tensor) -> Result { method forward (line 307) | pub fn forward( FILE: candle-transformers/src/models/wuerstchen/paella_vq.rs type MixingResidualBlock (line 6) | pub struct MixingResidualBlock { method new (line 16) | pub fn new(inp: usize, embed_dim: usize, vb: VarBuilder) -> Result Result { type PaellaVQ (line 65) | pub struct PaellaVQ { method new (line 76) | pub fn new(vb: VarBuilder) -> Result { method encode (line 179) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 191) | pub fn decode(&self, xs: &Tensor) -> Result { method forward (line 208) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/models/wuerstchen/prior.rs type Block (line 6) | struct Block { type WPrior (line 13) | pub struct WPrior { method new (line 25) | pub fn new( method gen_r_embedding (line 69) | pub fn gen_r_embedding(&self, r: &Tensor) -> Result { method forward (line 87) | pub fn forward(&self, xs: &Tensor, r: &Tensor, c: &Tensor) -> Result Result { method forward (line 65) | fn forward(&self, input_ids: &Tensor, token_type_ids: &Tensor) -> Resu... type XLMRobertaSelfAttention (line 90) | struct XLMRobertaSelfAttention { method new (line 100) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method transpose_for_scores (line 113) | fn transpose_for_scores(&self, x: &Tensor) -> Result { method forward (line 121) | fn forward( type XLMRobertaSelfOutput (line 183) | struct XLMRobertaSelfOutput { method new (line 189) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 196) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type XLMRobertaAttention (line 203) | struct XLMRobertaAttention { method new (line 209) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 218) | fn forward( type XLMRobertaOutput (line 238) | struct XLMRobertaOutput { method new (line 244) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 251) | fn forward(&self, hidden_states: &Tensor, input_tensor: &Tensor) -> Re... type XLMRobertaIntermediate (line 258) | struct XLMRobertaIntermediate { method new (line 264) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 273) | fn forward(&self, hidden_states: &Tensor) -> Result { type XLMRobertaLayer (line 280) | struct XLMRobertaLayer { method new (line 287) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 298) | fn forward( type XLMRobertaEncoder (line 323) | struct XLMRobertaEncoder { method new (line 328) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 335) | fn forward( type XLMRobertaModel (line 358) | pub struct XLMRobertaModel { method new (line 364) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 373) | pub fn forward( type XLMRobertaLMHead (line 396) | struct XLMRobertaLMHead { method new (line 402) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 409) | fn forward(&self, hidden_states: &Tensor, shared_embeddings: &Tensor) ... type XLMRobertaForMaskedLM (line 418) | pub struct XLMRobertaForMaskedLM { method new (line 424) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 430) | pub fn forward( type XLMRobertaClassificationHead (line 461) | struct XLMRobertaClassificationHead { method new (line 467) | fn new(num_labels: usize, cfg: &Config, vb: VarBuilder) -> Result { method forward (line 473) | fn forward(&self, hidden_states: &Tensor) -> Result { type XLMRobertaForSequenceClassification (line 484) | pub struct XLMRobertaForSequenceClassification { method new (line 490) | pub fn new(num_labels: usize, cfg: &Config, vb: VarBuilder) -> Result<... method forward (line 499) | pub fn forward( function prepare_4d_attention_mask (line 512) | fn prepare_4d_attention_mask( function get_dtype_min_val (line 532) | fn get_dtype_min_val(dtype: DType) -> f64 { FILE: candle-transformers/src/models/yi.rs type Config (line 24) | pub struct Config { method config_6b (line 38) | pub fn config_6b() -> Self { method config_34b (line 53) | pub fn config_34b() -> Self { type RotaryEmbedding (line 70) | struct RotaryEmbedding { method new (line 83) | fn new(dtype: DType, cfg: &Config, dev: &Device) -> Result { method apply_rotary_emb_qkv (line 103) | fn apply_rotary_emb_qkv( function rotate_half (line 75) | fn rotate_half(xs: &Tensor) -> Result { type MLP (line 122) | struct MLP { method new (line 130) | fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 146) | fn forward(&self, xs: &Tensor) -> Result { type Attention (line 154) | struct Attention { method new (line 169) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 194) | fn forward( type DecoderLayer (line 252) | struct DecoderLayer { method new (line 260) | fn new(rotary_emb: Arc, cfg: &Config, vb: VarBuilder)... method forward (line 277) | fn forward( type Model (line 294) | pub struct Model { method new (line 304) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method prepare_decoder_attention_mask (line 327) | fn prepare_decoder_attention_mask( method forward (line 348) | pub fn forward(&mut self, input_ids: &Tensor, seqlen_offset: usize) ->... FILE: candle-transformers/src/models/z_image/preprocess.rs type PreparedInputs (line 12) | pub struct PreparedInputs { function compute_padding_len (line 25) | pub fn compute_padding_len(ori_len: usize) -> usize { function pad_text_embeddings (line 40) | pub fn pad_text_embeddings( function prepare_inputs (line 105) | pub fn prepare_inputs( function create_attention_mask (line 126) | pub fn create_attention_mask( function batch_text_embedding (line 148) | pub fn batch_text_embedding(text_embedding: &Tensor, batch_size: usize) ... function batch_mask (line 164) | pub fn batch_mask(mask: &Tensor, batch_size: usize) -> Result { FILE: candle-transformers/src/models/z_image/sampling.rs function get_noise (line 16) | pub fn get_noise( function get_schedule (line 34) | pub fn get_schedule(num_steps: usize, mu: f64) -> Vec { function postprocess_image (line 56) | pub fn postprocess_image(image: &Tensor) -> Result { type CfgConfig (line 64) | pub struct CfgConfig { method default (line 74) | fn default() -> Self { function apply_cfg (line 90) | pub fn apply_cfg( function scale_noise (line 131) | pub fn scale_noise(noise: &Tensor, sigma: f64) -> Result { FILE: candle-transformers/src/models/z_image/scheduler.rs type SchedulerConfig (line 9) | pub struct SchedulerConfig { method z_image_turbo (line 37) | pub fn z_image_turbo() -> Self { function default_num_train_timesteps (line 18) | fn default_num_train_timesteps() -> usize { function default_shift (line 21) | fn default_shift() -> f64 { method default (line 26) | fn default() -> Self { type FlowMatchEulerDiscreteScheduler (line 48) | pub struct FlowMatchEulerDiscreteScheduler { method new (line 64) | pub fn new(config: SchedulerConfig) -> Self { method set_timesteps (line 109) | pub fn set_timesteps(&mut self, num_inference_steps: usize, mu: Option... method current_sigma (line 160) | pub fn current_sigma(&self) -> f64 { method current_timestep_normalized (line 166) | pub fn current_timestep_normalized(&self) -> f64 { method step (line 179) | pub fn step(&mut self, model_output: &Tensor, sample: &Tensor) -> Resu... method reset (line 193) | pub fn reset(&mut self) { method num_inference_steps (line 198) | pub fn num_inference_steps(&self) -> usize { method step_index (line 203) | pub fn step_index(&self) -> usize { method is_complete (line 208) | pub fn is_complete(&self) -> bool { function calculate_shift (line 221) | pub fn calculate_shift( constant BASE_IMAGE_SEQ_LEN (line 234) | pub const BASE_IMAGE_SEQ_LEN: usize = 256; constant MAX_IMAGE_SEQ_LEN (line 235) | pub const MAX_IMAGE_SEQ_LEN: usize = 4096; constant BASE_SHIFT (line 236) | pub const BASE_SHIFT: f64 = 0.5; constant MAX_SHIFT (line 237) | pub const MAX_SHIFT: f64 = 1.15; FILE: candle-transformers/src/models/z_image/text_encoder.rs type TextEncoderConfig (line 15) | pub struct TextEncoderConfig { method z_image (line 87) | pub fn z_image() -> Self { function default_vocab_size (line 42) | fn default_vocab_size() -> usize { function default_hidden_size (line 45) | fn default_hidden_size() -> usize { function default_intermediate_size (line 48) | fn default_intermediate_size() -> usize { function default_num_hidden_layers (line 51) | fn default_num_hidden_layers() -> usize { function default_num_attention_heads (line 54) | fn default_num_attention_heads() -> usize { function default_num_key_value_heads (line 57) | fn default_num_key_value_heads() -> usize { function default_head_dim (line 60) | fn default_head_dim() -> usize { function default_rms_norm_eps (line 63) | fn default_rms_norm_eps() -> f64 { function default_rope_theta (line 66) | fn default_rope_theta() -> f64 { function default_attention_bias (line 69) | fn default_attention_bias() -> bool { function default_hidden_act (line 72) | fn default_hidden_act() -> Activation { function default_max_position_embeddings (line 75) | fn default_max_position_embeddings() -> usize { method default (line 80) | fn default() -> Self { type RotaryEmbedding (line 108) | struct RotaryEmbedding { method new (line 114) | fn new(dtype: DType, cfg: &TextEncoderConfig, dev: &Device) -> Result<... method apply (line 134) | fn apply(&self, q: &Tensor, k: &Tensor, offset: usize) -> Result<(Tens... type Mlp (line 147) | struct Mlp { method new (line 155) | fn new(cfg: &TextEncoderConfig, vb: VarBuilder) -> Result { method forward (line 178) | fn forward(&self, x: &Tensor) -> Result { function repeat_kv (line 187) | fn repeat_kv(x: Tensor, n_rep: usize) -> Result { type Attention (line 199) | struct Attention { method new (line 215) | fn new( method forward (line 271) | fn forward(&self, x: &Tensor, attn_mask: Option<&Tensor>, offset: usiz... type DecoderLayer (line 324) | struct DecoderLayer { method new (line 332) | fn new(cfg: &TextEncoderConfig, rotary: Arc, vb: VarB... method forward (line 349) | fn forward(&self, x: &Tensor, mask: Option<&Tensor>, offset: usize) ->... type ZImageTextEncoder (line 366) | pub struct ZImageTextEncoder { method new (line 375) | pub fn new(cfg: &TextEncoderConfig, vb: VarBuilder) -> Result { method causal_mask (line 403) | fn causal_mask(&self, b: usize, tgt: usize, offset: usize) -> Result Result { method hidden_size (line 449) | pub fn hidden_size(&self) -> usize { FILE: candle-transformers/src/models/z_image/transformer.rs function flash_attn (line 14) | fn flash_attn( function flash_attn (line 26) | fn flash_attn(_: &Tensor, _: &Tensor, _: &Tensor, _: f32, _: bool) -> Re... constant ADALN_EMBED_DIM (line 33) | pub const ADALN_EMBED_DIM: usize = 256; constant SEQ_MULTI_OF (line 35) | pub const SEQ_MULTI_OF: usize = 32; constant FREQUENCY_EMBEDDING_SIZE (line 37) | pub const FREQUENCY_EMBEDDING_SIZE: usize = 256; constant MAX_PERIOD (line 39) | pub const MAX_PERIOD: f64 = 10000.0; type Config (line 45) | pub struct Config { method z_image_turbo (line 134) | pub fn z_image_turbo() -> Self { method set_use_accelerated_attn (line 156) | pub fn set_use_accelerated_attn(&mut self, enabled: bool) { method head_dim (line 161) | pub fn head_dim(&self) -> usize { method hidden_dim (line 167) | pub fn hidden_dim(&self) -> usize { function default_use_accelerated_attn (line 82) | fn default_use_accelerated_attn() -> bool { function default_patch_size (line 86) | fn default_patch_size() -> Vec { function default_f_patch_size (line 89) | fn default_f_patch_size() -> Vec { function default_in_channels (line 92) | fn default_in_channels() -> usize { function default_dim (line 95) | fn default_dim() -> usize { function default_n_layers (line 98) | fn default_n_layers() -> usize { function default_n_refiner_layers (line 101) | fn default_n_refiner_layers() -> usize { function default_n_heads (line 104) | fn default_n_heads() -> usize { function default_n_kv_heads (line 107) | fn default_n_kv_heads() -> usize { function default_norm_eps (line 110) | fn default_norm_eps() -> f64 { function default_qk_norm (line 113) | fn default_qk_norm() -> bool { function default_cap_feat_dim (line 116) | fn default_cap_feat_dim() -> usize { function default_rope_theta (line 119) | fn default_rope_theta() -> f64 { function default_t_scale (line 122) | fn default_t_scale() -> f64 { function default_axes_dims (line 125) | fn default_axes_dims() -> Vec { function default_axes_lens (line 128) | fn default_axes_lens() -> Vec { type TimestepEmbedder (line 176) | pub struct TimestepEmbedder { method new (line 183) | pub fn new(out_size: usize, mid_size: usize, vb: VarBuilder) -> Result... method timestep_embedding (line 193) | fn timestep_embedding(&self, t: &Tensor, device: &Device, dtype: DType... method forward (line 205) | pub fn forward(&self, t: &Tensor) -> Result { type FeedForward (line 217) | pub struct FeedForward { method new (line 224) | pub fn new(dim: usize, hidden_dim: usize, vb: VarBuilder) -> Result Result { type QkNorm (line 244) | pub struct QkNorm { method new (line 250) | pub fn new(head_dim: usize, eps: f64, vb: VarBuilder) -> Result { method forward (line 256) | pub fn forward(&self, q: &Tensor, k: &Tensor) -> Result<(Tensor, Tenso... type RopeEmbedder (line 268) | pub struct RopeEmbedder { method new (line 281) | pub fn new( method forward (line 319) | pub fn forward(&self, ids: &Tensor) -> Result<(Tensor, Tensor)> { function apply_rotary_emb (line 341) | pub fn apply_rotary_emb(x: &Tensor, cos: &Tensor, sin: &Tensor) -> Resul... type ZImageAttention (line 368) | pub struct ZImageAttention { method new (line 380) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 408) | pub fn forward( method attention_dispatch (line 456) | fn attention_dispatch( method attention_cuda (line 483) | fn attention_cuda( method attention_metal (line 517) | fn attention_metal( method attention_basic (line 535) | fn attention_basic( method prepare_sdpa_mask (line 559) | fn prepare_sdpa_mask(&self, mask: Option<&Tensor>, q: &Tensor) -> Resu... type ZImageTransformerBlock (line 581) | pub struct ZImageTransformerBlock { method new (line 592) | pub fn new(cfg: &Config, modulation: bool, vb: VarBuilder) -> Result Self { method forward (line 691) | fn forward(&self, x: &Tensor) -> Result { type FinalLayer (line 711) | pub struct FinalLayer { method new (line 718) | pub fn new(hidden_size: usize, out_channels: usize, vb: VarBuilder) ->... method forward (line 732) | pub fn forward(&self, x: &Tensor, c: &Tensor) -> Result { function patchify (line 748) | pub fn patchify( function unpatchify (line 801) | pub fn unpatchify( function create_coordinate_grid (line 852) | pub fn create_coordinate_grid( type ZImageTransformer2DModel (line 878) | pub struct ZImageTransformer2DModel { method new (line 896) | pub fn new(cfg: &Config, vb: VarBuilder) -> Result { method forward (line 993) | pub fn forward( method config (line 1084) | pub fn config(&self) -> &Config { FILE: candle-transformers/src/models/z_image/vae.rs type VaeConfig (line 18) | pub struct VaeConfig { method z_image (line 70) | pub fn z_image() -> Self { function default_in_channels (line 37) | fn default_in_channels() -> usize { function default_out_channels (line 40) | fn default_out_channels() -> usize { function default_latent_channels (line 43) | fn default_latent_channels() -> usize { function default_block_out_channels (line 46) | fn default_block_out_channels() -> Vec { function default_layers_per_block (line 49) | fn default_layers_per_block() -> usize { function default_scaling_factor (line 52) | fn default_scaling_factor() -> f64 { function default_shift_factor (line 55) | fn default_shift_factor() -> f64 { function default_norm_num_groups (line 58) | fn default_norm_num_groups() -> usize { method default (line 63) | fn default() -> Self { function scaled_dot_product_attention (line 86) | fn scaled_dot_product_attention(q: &Tensor, k: &Tensor, v: &Tensor) -> R... type Attention (line 98) | struct Attention { method new (line 107) | fn new(channels: usize, num_groups: usize, vb: VarBuilder) -> Result Result { type ResnetBlock2D (line 166) | struct ResnetBlock2D { method new (line 175) | fn new( method forward (line 214) | fn forward(&self, xs: &Tensor) -> Result { type Downsample2D (line 233) | struct Downsample2D { method new (line 238) | fn new(channels: usize, vb: VarBuilder) -> Result { method forward (line 250) | fn forward(&self, xs: &Tensor) -> Result { type DownEncoderBlock2D (line 259) | struct DownEncoderBlock2D { method new (line 265) | fn new( method forward (line 303) | fn forward(&self, xs: &Tensor) -> Result { type Upsample2D (line 318) | struct Upsample2D { method new (line 323) | fn new(channels: usize, vb: VarBuilder) -> Result { method forward (line 334) | fn forward(&self, xs: &Tensor) -> Result { type UpDecoderBlock2D (line 341) | struct UpDecoderBlock2D { method new (line 347) | fn new( method forward (line 379) | fn forward(&self, xs: &Tensor) -> Result { type UNetMidBlock2D (line 394) | struct UNetMidBlock2D { method new (line 401) | fn new(channels: usize, num_groups: usize, vb: VarBuilder) -> Result Result { type Encoder (line 427) | pub struct Encoder { method new (line 436) | pub fn new(cfg: &VaeConfig, vb: VarBuilder) -> Result { method forward (line 497) | fn forward(&self, xs: &Tensor) -> Result { type Decoder (line 513) | pub struct Decoder { method new (line 522) | pub fn new(cfg: &VaeConfig, vb: VarBuilder) -> Result { method forward (line 586) | fn forward(&self, xs: &Tensor) -> Result { type DiagonalGaussian (line 601) | pub struct DiagonalGaussian { method new (line 606) | pub fn new(sample: bool) -> Self { method forward (line 612) | fn forward(&self, xs: &Tensor) -> Result { type AutoEncoderKL (line 630) | pub struct AutoEncoderKL { method new (line 639) | pub fn new(cfg: &VaeConfig, vb: VarBuilder) -> Result { method encode (line 656) | pub fn encode(&self, xs: &Tensor) -> Result { method decode (line 664) | pub fn decode(&self, xs: &Tensor) -> Result { method scale_factor (line 670) | pub fn scale_factor(&self) -> f64 { method shift_factor (line 675) | pub fn shift_factor(&self) -> f64 { method forward (line 681) | fn forward(&self, xs: &Tensor) -> Result { FILE: candle-transformers/src/object_detection.rs type Bbox (line 9) | pub struct Bbox { type KeyPoint (line 19) | pub struct KeyPoint { function iou (line 26) | pub fn iou(b1: &Bbox, b2: &Bbox) -> f32 { function non_maximum_suppression (line 37) | pub fn non_maximum_suppression(bboxes: &mut [Vec>], threshold... function update_confidences (line 61) | fn update_confidences( function soft_non_maximum_suppression (line 84) | pub fn soft_non_maximum_suppression( FILE: candle-transformers/src/quantized_nn.rs type Embedding (line 13) | pub struct Embedding { method new (line 19) | pub fn new(d1: usize, d2: usize, vb: VarBuilder) -> Result { method embeddings (line 26) | pub fn embeddings(&self) -> &Tensor { method forward (line 32) | fn forward(&self, xs: &Tensor) -> Result { type Linear (line 39) | pub struct Linear { method from_arc (line 45) | pub fn from_arc(weight: std::sync::Arc, bias: Option)... method from_weights (line 50) | pub fn from_weights(weight: QMatMul, bias: Option) -> Self { method forward (line 56) | fn forward(&self, x: &Tensor) -> candle::Result { function linear_b (line 65) | pub fn linear_b(in_dim: usize, out_dim: usize, bias: bool, vb: VarBuilde... function linear (line 75) | pub fn linear(in_dim: usize, out_dim: usize, vb: VarBuilder) -> Result Result Resu... function linear_no_bias (line 95) | pub fn linear_no_bias(in_dim: usize, out_dim: usize, vb: VarBuilder) -> ... type RmsNorm (line 101) | pub struct RmsNorm { method new (line 108) | pub fn new(size: usize, eps: f64, vb: VarBuilder) -> Result { method from_qtensor (line 114) | pub fn from_qtensor(weight: QTensor, eps: f64) -> Result { method forward (line 122) | fn forward(&self, x: &Tensor) -> Result { FILE: candle-transformers/src/quantized_var_builder.rs type VarBuilder (line 13) | pub struct VarBuilder { method from_gguf (line 20) | pub fn from_gguf>(p: P, device: &Device) -> ... method from_gguf_buffer (line 35) | pub fn from_gguf_buffer(buffer: &[u8], device: &Device) -> Result { method pp (line 50) | pub fn pp(&self, s: S) -> Self { method path (line 60) | fn path(&self, tensor_name: &str) -> String { method get (line 68) | pub fn get>(&self, s: S, name: &str) -> Result Result> { method device (line 97) | pub fn device(&self) -> &Device { method contains_key (line 101) | pub fn contains_key(&self, key: &str) -> bool { FILE: candle-transformers/src/utils.rs function apply_repeat_penalty (line 5) | pub fn apply_repeat_penalty(logits: &Tensor, penalty: f32, context: &[u3... function repeat_kv (line 28) | pub fn repeat_kv(xs: Tensor, n_rep: usize) -> Result { FILE: candle-transformers/tests/generation_tests.rs function sample_with_zero_temperature (line 5) | fn sample_with_zero_temperature() -> Result<()> { function sample_with_temperature (line 14) | fn sample_with_temperature() -> Result<()> { function sample_with_top_p (line 23) | fn sample_with_top_p() -> Result<()> { function sample_with_top_k (line 32) | fn sample_with_top_k() -> Result<()> { function sample_gumbel (line 59) | fn sample_gumbel() -> Result<()> { FILE: candle-transformers/tests/nms_tests.rs function nms_basic (line 7) | fn nms_basic() -> Result<()> { function softnms_basic_functionality (line 45) | fn softnms_basic_functionality() -> Result<()> { function softnms_confidence_decay (line 83) | fn softnms_confidence_decay() -> Result<()> { function softnms_confidence_threshold (line 112) | fn softnms_confidence_threshold() -> Result<()> { function softnms_no_overlap (line 142) | fn softnms_no_overlap() -> Result<()> { function softnms_no_bbox (line 171) | fn softnms_no_bbox() -> Result<()> { function softnms_single_bbox (line 179) | fn softnms_single_bbox() -> Result<()> { function softnms_equal_confidence_overlap (line 194) | fn softnms_equal_confidence_overlap() -> Result<()> { FILE: candle-wasm-examples/bert/bertWorker.js function fetchArrayBuffer (line 4) | async function fetchArrayBuffer(url) { class Bert (line 16) | class Bert { method getInstance (line 19) | static async getInstance(weightsURL, tokenizerURL, configURL, modelID) { FILE: candle-wasm-examples/bert/src/bin/m.rs type Model (line 9) | pub struct Model { method load (line 17) | pub fn load(weights: Vec, tokenizer: Vec, config: Vec) -> ... method get_embeddings (line 30) | pub fn get_embeddings(&mut self, input: JsValue) -> Result Re... method reset_kv_cache (line 30) | fn reset_kv_cache(&mut self) { type Model (line 38) | pub struct Model { method load (line 47) | pub fn load( method generate_caption_from_image (line 77) | pub fn generate_caption_from_image(&mut self, image: Vec) -> Resul... method load_image (line 125) | fn load_image(&self, image: Vec) -> Result { constant SEP_TOKEN_ID (line 42) | const SEP_TOKEN_ID: u32 = 102; function main (line 146) | fn main() { FILE: candle-wasm-examples/blip/src/lib.rs function log (line 9) | pub fn log(s: &str); FILE: candle-wasm-examples/blip/src/token_output_stream.rs type TokenOutputStream (line 5) | pub struct TokenOutputStream { method new (line 13) | pub fn new(tokenizer: tokenizers::Tokenizer) -> Self { method into_inner (line 22) | pub fn into_inner(self) -> tokenizers::Tokenizer { method decode (line 26) | fn decode(&self, tokens: &[u32]) -> Result { method next_token (line 34) | pub fn next_token(&mut self, token: u32) -> Result> { method decode_rest (line 53) | pub fn decode_rest(&self) -> Result> { method decode_all (line 69) | pub fn decode_all(&self) -> Result { method get_token (line 73) | pub fn get_token(&self, token_s: &str) -> Option { method tokenizer (line 77) | pub fn tokenizer(&self) -> &tokenizers::Tokenizer { method clear (line 81) | pub fn clear(&mut self) { FILE: candle-wasm-examples/chat-template/src/lib.rs type Message (line 50) | pub struct Message { method new (line 59) | pub fn new(role: &str, content: &str) -> Self { method role (line 68) | pub fn role(&self) -> String { method content (line 74) | pub fn content(&self) -> String { method system (line 82) | pub fn system(content: impl Into) -> Self { method user (line 90) | pub fn user(content: impl Into) -> Self { method assistant (line 98) | pub fn assistant(content: impl Into) -> Self { type ChatTemplateOptions (line 108) | pub struct ChatTemplateOptions { method for_generation (line 119) | pub fn for_generation() -> Self { method for_training (line 127) | pub fn for_training() -> Self { method with_thinking (line 135) | pub fn with_thinking(mut self) -> Self { method thinking (line 141) | pub fn thinking(mut self, enabled: bool) -> Self { type TokenConfig (line 153) | pub struct TokenConfig { type StringOrToken (line 169) | pub enum StringOrToken { method as_str (line 175) | pub fn as_str(&self) -> &str { method default (line 184) | fn default() -> Self { type ChatTemplateConfig (line 192) | pub enum ChatTemplateConfig { type NamedTemplate (line 199) | pub struct NamedTemplate { type ChatTemplate (line 214) | pub struct ChatTemplate { method new (line 222) | pub fn new( method from_config_json (line 250) | pub fn from_config_json(json: &str) -> Result { method chatml (line 294) | pub fn chatml() -> Self { method chatml_with_thinking (line 310) | pub fn chatml_with_thinking() -> Self { method llama2 (line 336) | pub fn llama2() -> Self { method llama3 (line 368) | pub fn llama3() -> Self { method mistral (line 392) | pub fn mistral() -> Self { method gemma (line 414) | pub fn gemma() -> Self { method phi3 (line 431) | pub fn phi3() -> Self { method apply (line 454) | pub fn apply( method apply_for_generation (line 479) | pub fn apply_for_generation(&self, messages: &[Message]) -> Result &str { method bos_token (line 489) | pub fn bos_token(&self) -> &str { type Conversation (line 501) | pub struct Conversation { method new (line 509) | pub fn new(template: ChatTemplate, system_prompt: impl Into) -... method without_system (line 518) | pub fn without_system(template: ChatTemplate) -> Self { method with_options (line 527) | pub fn with_options(mut self, options: ChatTemplateOptions) -> Self { method set_options (line 533) | pub fn set_options(&mut self, options: ChatTemplateOptions) { method options (line 538) | pub fn options(&self) -> &ChatTemplateOptions { method user_turn (line 545) | pub fn user_turn(&mut self, content: impl Into) -> Result) { method add_message (line 556) | pub fn add_message(&mut self, message: Message) { method messages (line 561) | pub fn messages(&self) -> &[Message] { method len (line 566) | pub fn len(&self) -> usize { method is_empty (line 571) | pub fn is_empty(&self) -> bool { method clear (line 576) | pub fn clear(&mut self) { method reset (line 589) | pub fn reset(&mut self) { method format_history (line 594) | pub fn format_history(&self) -> Result { method to_json (line 600) | pub fn to_json(&self) -> String { method from_json (line 605) | pub fn from_json(template: ChatTemplate, json: &str) -> Result) -> std::fmt::Result { function test_chatml_basic (line 659) | fn test_chatml_basic() { function test_multi_turn_conversation (line 671) | fn test_multi_turn_conversation() { function test_thinking_mode_enabled (line 686) | fn test_thinking_mode_enabled() { function test_thinking_mode_disabled (line 702) | fn test_thinking_mode_disabled() { function test_llama3_format (line 715) | fn test_llama3_format() { function test_from_json_config (line 727) | fn test_from_json_config() { function test_conversation_clear_keeps_system (line 742) | fn test_conversation_clear_keeps_system() { function test_conversation_json_roundtrip (line 756) | fn test_conversation_json_roundtrip() { FILE: candle-wasm-examples/llama2-c/llama2cWorker.js function fetchArrayBuffer (line 3) | async function fetchArrayBuffer(url) { class Llama2C (line 15) | class Llama2C { method getInstance (line 18) | static async getInstance(weightsURL, modelID, tokenizerURL) { function generate (line 46) | async function generate(data) { FILE: candle-wasm-examples/llama2-c/src/app.rs function fetch_url (line 9) | async fn fetch_url(url: &str) -> Result, JsValue> { type Msg (line 30) | pub enum Msg { type CurrentDecode (line 39) | pub struct CurrentDecode { type App (line 43) | pub struct App { function model_data_load (line 55) | async fn model_data_load() -> Result { function performance_now (line 62) | fn performance_now() -> Option { type Message (line 69) | type Message = Msg; type Properties (line 70) | type Properties = (); method create (line 72) | fn create(ctx: &Context) -> Self { method rendered (line 92) | fn rendered(&mut self, ctx: &Context, first_render: bool) { method update (line 106) | fn update(&mut self, ctx: &Context, msg: Self::Message) -> bool { method view (line 178) | fn view(&self, ctx: &Context) -> Html { FILE: candle-wasm-examples/llama2-c/src/bin/app.rs function main (line 1) | fn main() { FILE: candle-wasm-examples/llama2-c/src/bin/m.rs type Model (line 7) | pub struct Model { method process (line 15) | fn process(&mut self, tokens: &[u32]) -> candle::Result { method new (line 45) | pub fn new(weights: Vec, tokenizer: Vec) -> Result usize { method init_with_prompt (line 68) | pub fn init_with_prompt( method next_token (line 106) | pub fn next_token(&mut self) -> Result { function main (line 115) | fn main() {} FILE: candle-wasm-examples/llama2-c/src/bin/worker.rs function main (line 2) | fn main() { FILE: candle-wasm-examples/llama2-c/src/model.rs type Config (line 9) | pub struct Config { type Cache (line 21) | pub struct Cache { method new (line 32) | pub fn new(use_kv_cache: bool, cfg: &Config, vb: VarBuilder) -> Result... method mask (line 47) | fn mask(&self, t: usize) -> Result { type CausalSelfAttention (line 62) | struct CausalSelfAttention { method apply_rotary_emb (line 74) | fn apply_rotary_emb(&self, x: &Tensor, index_pos: usize) -> Result R... method repeat_kv (line 131) | fn repeat_kv(&self, x: Tensor) -> Result { method load (line 145) | fn load(vb: VarBuilder, cache: &Cache, cfg: &Config) -> Result { function masked_fill (line 166) | fn masked_fill(on_false: &Tensor, mask: &Tensor, on_true: f32) -> Result... type Mlp (line 173) | struct Mlp { method new (line 180) | fn new(c_fc1: Linear, c_fc2: Linear, c_proj: Linear) -> Self { method forward (line 188) | fn forward(&self, x: &Tensor) -> Result { method load (line 193) | fn load(vb: VarBuilder, cfg: &Config) -> Result { type Block (line 203) | struct Block { method new (line 211) | fn new(rms_1: RmsNorm, attn: CausalSelfAttention, rms_2: RmsNorm, mlp:... method forward (line 220) | fn forward(&self, x: &Tensor, index_pos: usize, block_idx: usize) -> R... method load (line 229) | fn load(vb: VarBuilder, cache: &Cache, cfg: &Config) -> Result { type Llama (line 244) | pub struct Llama { method new (line 252) | fn new(wte: Embedding, blocks: Vec, ln_f: RmsNorm, lm_head: Lin... method forward (line 261) | pub fn forward(&self, x: &Tensor, index_pos: usize) -> Result { method load (line 273) | pub fn load(vb: VarBuilder, cache: &Cache, cfg: &Config) -> Result(r: &mut R) -> Result { function read_tensor (line 40) | fn read_tensor>( type Model (line 52) | pub struct Model { method run (line 60) | fn run( method load (line 250) | pub fn load(md: ModelData) -> Result { method from_reader (line 113) | fn from_reader(r: &mut R) -> Result { method head_size (line 133) | pub fn head_size(&self) -> usize { type TransformerWeights (line 138) | struct TransformerWeights { method from_reader (line 161) | fn from_reader(r: &mut R, c: &Config, dev: &Device) ... method var_builder (line 193) | fn var_builder(&self, cfg: &Config, device: &Device) -> Result; type Reach (line 291) | type Reach = Public; method create (line 293) | fn create(link: WorkerLink) -> Self { method update (line 297) | fn update(&mut self, _msg: Self::Message) { method handle_input (line 301) | fn handle_input(&mut self, msg: Self::Input, id: HandlerId) { method name_of_resource (line 329) | fn name_of_resource() -> &'static str { method resource_path_is_relative (line 333) | fn resource_path_is_relative() -> bool { type WorkerInput (line 275) | pub enum WorkerInput { type WorkerOutput (line 281) | pub enum WorkerOutput { FILE: candle-wasm-examples/moondream/code.js constant MODELS (line 4) | const MODELS = { function generateSequence (line 19) | async function generateSequence(controller) { function drawImageCanvas (line 216) | async function drawImageCanvas(imgURL) { function clearImageCanvas (line 237) | function clearImageCanvas() { function startRunning (line 246) | function startRunning() { function stopRunning (line 252) | function stopRunning() { FILE: candle-wasm-examples/moondream/moondreamWorker.js function fetchArrayBuffer (line 3) | async function fetchArrayBuffer(url, cacheModel = true) { function concatenateArrayBuffers (line 18) | async function concatenateArrayBuffers(urls) { class Moondream (line 37) | class Moondream { method getInstance (line 42) | static async getInstance(weightsURL, modelID, tokenizerURL, quantized) { method setImageEmbeddings (line 66) | static setImageEmbeddings(imageArrayU8) { method getSimpleHash (line 84) | static getSimpleHash(imageArrayU8) { function generate (line 104) | async function generate(data) { FILE: candle-wasm-examples/moondream/src/bin/m.rs type SelectedModel (line 13) | enum SelectedModel { type Model (line 19) | pub struct Model { method load (line 50) | pub fn load(weights: Vec, tokenizer: Vec, quantized: bool) -> ... method set_image_embeddings (line 89) | pub fn set_image_embeddings(&mut self, image: Vec) -> Result<(), J... method init_with_image_prompt (line 111) | pub fn init_with_image_prompt(&mut self, input: JsValue) -> Result Result { method load_image (line 197) | fn load_image(&self, image: Vec) -> Result { method process (line 216) | fn process(&mut self, tokens: &[u32]) -> Result { type Output (line 32) | struct Output { type InitInput (line 37) | struct InitInput { function main (line 277) | fn main() { FILE: candle-wasm-examples/moondream/src/lib.rs function log (line 8) | pub fn log(s: &str); FILE: candle-wasm-examples/phi/phiWorker.js function fetchArrayBuffer (line 3) | async function fetchArrayBuffer(url) { function concatenateArrayBuffers (line 15) | async function concatenateArrayBuffers(urls) { class Phi (line 29) | class Phi { method getInstance (line 32) | static async getInstance( function generate (line 72) | async function generate(data) { FILE: candle-wasm-examples/phi/src/bin/m.rs type SelectedModel (line 12) | enum SelectedModel { type Model (line 18) | pub struct Model { method load (line 36) | pub fn load( method init_with_prompt (line 83) | pub fn init_with_prompt( method next_token (line 118) | pub fn next_token(&mut self) -> Result { method process (line 128) | fn process(&mut self, tokens: &[u32]) -> candle::Result { type ModelName (line 29) | pub struct ModelName { function main (line 161) | fn main() { FILE: candle-wasm-examples/phi/src/lib.rs function log (line 8) | pub fn log(s: &str); FILE: candle-wasm-examples/quant-qwen3/serve.py function download_with_progress (line 38) | def download_with_progress(repo_id, filename, cache_dir): function find_or_download_model (line 55) | def find_or_download_model(model_key, custom_path=None): function find_or_download_tokenizer (line 85) | def find_or_download_tokenizer(): class CustomHandler (line 107) | class CustomHandler(SimpleHTTPRequestHandler): method end_headers (line 116) | def end_headers(self): method do_GET (line 122) | def do_GET(self): method send_file (line 133) | def send_file(self, filepath, content_type): method log_message (line 145) | def log_message(self, format, *args): function main (line 150) | def main(): FILE: candle-wasm-examples/quant-qwen3/src/lib.rs function log (line 6) | pub fn log(s: &str); FILE: candle-wasm-examples/quant-qwen3/src/m.rs type Model (line 14) | pub struct Model { method load (line 45) | pub fn load(weights: Vec, tokenizer: Vec, _config: Vec) ->... method start_conversation (line 115) | pub fn start_conversation(&mut self, system_prompt: Option, en... method start_conversation_from_config (line 154) | pub fn start_conversation_from_config( method chat (line 195) | pub fn chat( method end_turn (line 314) | pub fn end_turn(&mut self) { method clear_conversation (line 339) | pub fn clear_conversation(&mut self) { method get_conversation_json (line 353) | pub fn get_conversation_json(&self) -> String { method get_message_count (line 362) | pub fn get_message_count(&self) -> usize { method get_cached_token_count (line 371) | pub fn get_cached_token_count(&self) -> usize { method next_token (line 381) | pub fn next_token(&mut self) -> Result { method is_eos (line 402) | pub fn is_eos(&self) -> bool { method get_token_count (line 410) | pub fn get_token_count(&self) -> usize { method generate_tokens (line 416) | pub fn generate_tokens(&mut self, count: usize) -> Result candle::Res... FILE: candle-wasm-examples/quant-qwen3/src/profiler.rs type ProfileEntry (line 14) | pub struct ProfileEntry { type Profiler (line 24) | pub struct Profiler { method new (line 40) | fn new() -> Self { method start (line 48) | fn start(&mut self, name: &str) { method end (line 56) | fn end(&mut self, name: &str) { method get_entries (line 93) | fn get_entries(&self) -> Vec { method reset (line 112) | fn reset(&mut self) { method set_enabled (line 117) | fn set_enabled(&mut self, enabled: bool) { type ProfileData (line 31) | struct ProfileData { function profile_start (line 123) | pub fn profile_start(name: &str) { function profile_end (line 127) | pub fn profile_end(name: &str) { function profile_reset (line 131) | pub fn profile_reset() { function profile_set_enabled (line 135) | pub fn profile_set_enabled(enabled: bool) { type ProfileGuard (line 140) | pub struct ProfileGuard { method new (line 145) | pub fn new(name: &str) -> Self { method drop (line 154) | fn drop(&mut self) { type ProfileStats (line 169) | pub struct ProfileStats { method json (line 176) | pub fn json(&self) -> String { function profile_get_stats (line 182) | pub fn profile_get_stats() -> ProfileStats { function profile_print_stats (line 188) | pub fn profile_print_stats() { function profile_enable (line 235) | pub fn profile_enable(enabled: bool) { function profile_clear (line 245) | pub fn profile_clear() { function get_memory_info (line 252) | pub fn get_memory_info() -> String { function log_memory (line 286) | pub fn log_memory() { function get_wasm_memory_info (line 292) | pub fn get_wasm_memory_info() -> String { function log_wasm_memory (line 309) | pub fn log_wasm_memory() { FILE: candle-wasm-examples/segment-anything/samWorker.js function fetchArrayBuffer (line 4) | async function fetchArrayBuffer(url, cacheModel = true) { class SAMModel (line 18) | class SAMModel { method getInstance (line 25) | static async getInstance(modelURL, modelID) { method setImageEmbeddings (line 47) | static setImageEmbeddings(imageArrayU8) { method getSimpleHash (line 65) | static getSimpleHash(imageArrayU8) { function createImageCanvas (line 75) | async function createImageCanvas( FILE: candle-wasm-examples/segment-anything/src/bin/m.rs type Embeddings (line 6) | struct Embeddings { type Model (line 15) | pub struct Model { method new (line 23) | pub fn new(weights: Vec, use_tiny: bool) -> Result { method set_image_embeddings (line 38) | pub fn set_image_embeddings(&mut self, image_data: Vec) -> Result<... method mask_for_point (line 76) | pub fn mask_for_point(&self, input: JsValue) -> Result Result { type ModelConditionalGeneration (line 19) | pub struct ModelConditionalGeneration { method load (line 28) | pub fn load( method decode (line 47) | pub fn decode(&mut self, input: JsValue) -> Result { type ConditionalGenerationOutput (line 180) | struct ConditionalGenerationOutput { type DecoderOutput (line 185) | struct DecoderOutput { type DecoderParams (line 190) | pub struct DecoderParams { type ConditionalGenerationParams (line 195) | pub struct ConditionalGenerationParams { function main (line 204) | fn main() { FILE: candle-wasm-examples/t5/src/bin/m.rs type ModelEncoder (line 9) | pub struct ModelEncoder { method load (line 122) | pub fn load( method decode (line 139) | pub fn decode(&mut self, input: JsValue) -> Result { type ModelConditionalGeneration (line 15) | pub struct ModelConditionalGeneration { method load (line 24) | pub fn load( method decode (line 44) | pub fn decode(&mut self, input: JsValue) -> Result { type ConditionalGenerationOutput (line 178) | struct ConditionalGenerationOutput { type DecoderOutput (line 183) | struct DecoderOutput { type DecoderParams (line 188) | pub struct DecoderParams { type ConditionalGenerationParams (line 193) | pub struct ConditionalGenerationParams { function main (line 202) | fn main() { FILE: candle-wasm-examples/t5/src/lib.rs function log (line 8) | pub fn log(s: &str); FILE: candle-wasm-examples/t5/utils.js function extractEmbeddings (line 1) | async function extractEmbeddings( function generateText (line 35) | async function generateText( constant MODELS (line 69) | const MODELS = { function getModelInfo (line 194) | function getModelInfo(id, taskID) { FILE: candle-wasm-examples/whisper/main.js function main (line 2) | async function main() { FILE: candle-wasm-examples/whisper/src/app.rs constant SAMPLE_NAMES (line 9) | const SAMPLE_NAMES: [&str; 6] = [ function fetch_url (line 18) | async fn fetch_url(url: &str) -> Result, JsValue> { type Msg (line 39) | pub enum Msg { type CurrentDecode (line 47) | pub struct CurrentDecode { type App (line 51) | pub struct App { function model_data_load (line 59) | async fn model_data_load() -> Result { function performance_now (line 103) | fn performance_now() -> Option { type Message (line 110) | type Message = Msg; type Properties (line 111) | type Properties = (); method create (line 113) | fn create(ctx: &Context) -> Self { method rendered (line 129) | fn rendered(&mut self, ctx: &Context, first_render: bool) { method update (line 143) | fn update(&mut self, ctx: &Context, msg: Self::Message) -> bool { method view (line 208) | fn view(&self, ctx: &Context) -> Html { FILE: candle-wasm-examples/whisper/src/audio.rs type Float (line 5) | pub trait Float: num_traits::Float + num_traits::FloatConst + num_traits... function fft (line 11) | fn fft(inp: &[T]) -> Vec { function dft (line 57) | fn dft(inp: &[T]) -> Vec { function log_mel_spectrogram_w (line 84) | fn log_mel_spectrogram_w( function log_mel_spectrogram_ (line 149) | fn log_mel_spectrogram_( function pcm_to_mel (line 201) | pub fn pcm_to_mel( FILE: candle-wasm-examples/whisper/src/bin/app.rs function main (line 1) | fn main() { FILE: candle-wasm-examples/whisper/src/bin/m.rs type Decoder (line 5) | pub struct Decoder { method new (line 13) | pub fn new( method decode (line 43) | pub fn decode(&mut self, wav_input: Vec) -> Result { function main (line 53) | fn main() {} FILE: candle-wasm-examples/whisper/src/bin/worker.rs function main (line 2) | fn main() { FILE: candle-wasm-examples/whisper/src/languages.rs constant LANGUAGES (line 1) | pub const LANGUAGES: [(&str, &str); 99] = [ FILE: candle-wasm-examples/whisper/src/lib.rs constant WITH_TIMER (line 1) | pub const WITH_TIMER: bool = true; FILE: candle-wasm-examples/whisper/src/worker.rs function log (line 17) | pub fn log(s: &str); constant DTYPE (line 27) | pub const DTYPE: DType = DType::F32; type Model (line 29) | pub enum Model { method config (line 36) | pub fn config(&self) -> &Config { method encoder_forward (line 43) | pub fn encoder_forward(&mut self, x: &Tensor, flush: bool) -> candle::... method decoder_forward (line 50) | pub fn decoder_forward( method decoder_final_linear (line 62) | pub fn decoder_final_linear(&self, x: &Tensor) -> candle::Result anyhow::Result anyhow::Result... method run (line 280) | fn run(&mut self, mel: &Tensor) -> anyhow::Result> { method load (line 306) | pub fn load(md: ModelData) -> anyhow::Result { method convert_and_run (line 345) | pub fn convert_and_run(&mut self, wav_input: &[u8]) -> anyhow::Result<... function detect_language (line 373) | pub fn detect_language(model: &mut Model, tokenizer: &Tokenizer, mel: &T... function token_id (line 408) | pub fn token_id(tokenizer: &Tokenizer, token: &str) -> candle::Result; type Reach (line 456) | type Reach = Public; method create (line 458) | fn create(link: WorkerLink) -> Self { method update (line 465) | fn update(&mut self, _msg: Self::Message) { method handle_input (line 469) | fn handle_input(&mut self, msg: Self::Input, id: HandlerId) { method name_of_resource (line 489) | fn name_of_resource() -> &'static str { method resource_path_is_relative (line 493) | fn resource_path_is_relative() -> bool { type WorkerInput (line 441) | pub enum WorkerInput { type WorkerOutput (line 447) | pub enum WorkerOutput { FILE: candle-wasm-examples/whisper/whisperWorker.js function fetchArrayBuffer (line 4) | async function fetchArrayBuffer(url) { class Whisper (line 16) | class Whisper { method getInstance (line 20) | static async getInstance(params) { FILE: candle-wasm-examples/yolo/src/app.rs function fetch_url (line 8) | async fn fetch_url(url: &str) -> Result, JsValue> { type Msg (line 30) | pub enum Msg { type CurrentDecode (line 39) | pub struct CurrentDecode { type App (line 43) | pub struct App { function model_data_load (line 51) | async fn model_data_load() -> Result { function performance_now (line 61) | fn performance_now() -> Option { function draw_bboxes (line 67) | fn draw_bboxes(bboxes: Vec>) -> Result<(), JsVal... type Message (line 112) | type Message = Msg; type Properties (line 113) | type Properties = (); method create (line 115) | fn create(ctx: &Context) -> Self { method rendered (line 131) | fn rendered(&mut self, ctx: &Context, first_render: bool) { method update (line 145) | fn update(&mut self, ctx: &Context, msg: Self::Message) -> bool { method view (line 232) | fn view(&self, ctx: &Context) -> Html { FILE: candle-wasm-examples/yolo/src/bin/app.rs function main (line 1) | fn main() { FILE: candle-wasm-examples/yolo/src/bin/m.rs type Model (line 8) | pub struct Model { method new (line 15) | pub fn new(data: Vec, model_size: &str) -> Result { method run (line 21) | pub fn run( type ModelPose (line 41) | pub struct ModelPose { method new (line 48) | pub fn new(data: Vec, model_size: &str) -> Result Self { method s (line 25) | pub fn s() -> Self { method m (line 32) | pub fn m() -> Self { method l (line 39) | pub fn l() -> Self { method x (line 46) | pub fn x() -> Self { method filters (line 54) | fn filters(&self) -> (usize, usize, usize) { type Upsample (line 63) | struct Upsample { method new (line 68) | fn new(scale_factor: usize) -> Result { method forward (line 74) | fn forward(&self, xs: &Tensor) -> candle::Result { type ConvBlock (line 81) | struct ConvBlock { method load (line 87) | fn load( method forward (line 110) | fn forward(&self, xs: &Tensor) -> Result { type Bottleneck (line 117) | struct Bottleneck { method load (line 124) | fn load(vb: VarBuilder, c1: usize, c2: usize, shortcut: bool) -> Resul... method forward (line 135) | fn forward(&self, xs: &Tensor) -> Result { type C2f (line 146) | struct C2f { method load (line 153) | fn load(vb: VarBuilder, c1: usize, c2: usize, n: usize, shortcut: bool... method forward (line 171) | fn forward(&self, xs: &Tensor) -> Result { type Sppf (line 183) | struct Sppf { method load (line 190) | fn load(vb: VarBuilder, c1: usize, c2: usize, k: usize) -> Result { method forward (line 199) | fn forward(&self, xs: &Tensor) -> Result { type Dfl (line 219) | struct Dfl { method load (line 225) | fn load(vb: VarBuilder, num_classes: usize) -> Result { method forward (line 232) | fn forward(&self, xs: &Tensor) -> Result { type DarkNet (line 243) | struct DarkNet { method load (line 257) | fn load(vb: VarBuilder, m: Multiples) -> Result { method forward (line 340) | fn forward(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> { type YoloV8Neck (line 353) | struct YoloV8Neck { method load (line 364) | fn load(vb: VarBuilder, m: Multiples) -> Result { method forward (line 423) | fn forward(&self, p3: &Tensor, p4: &Tensor, p5: &Tensor) -> Result<(Te... type DetectionHead (line 441) | struct DetectionHead { method load (line 505) | fn load(vb: VarBuilder, nc: usize, filters: (usize, usize, usize)) -> ... method load_cv3 (line 530) | fn load_cv3( method load_cv2 (line 542) | fn load_cv2( method forward (line 554) | fn forward(&self, xs0: &Tensor, xs1: &Tensor, xs2: &Tensor) -> Result<... type PoseHead (line 450) | struct PoseHead { method load (line 600) | fn load( method load_cv4 (line 617) | fn load_cv4( method forward (line 629) | fn forward(&self, xs0: &Tensor, xs1: &Tensor, xs2: &Tensor) -> Result<... function make_anchors (line 456) | fn make_anchors( type DetectionHeadOut (line 487) | struct DetectionHeadOut { function dist2bbox (line 493) | fn dist2bbox(distance: &Tensor, anchor_points: &Tensor) -> Result { type YoloV8 (line 654) | pub struct YoloV8 { method load (line 661) | pub fn load(vb: VarBuilder, m: Multiples, num_classes: usize) -> Resul... method forward (line 670) | fn forward(&self, xs: &Tensor) -> Result { type YoloV8Pose (line 678) | pub struct YoloV8Pose { method load (line 685) | pub fn load( method forward (line 699) | fn forward(&self, xs: &Tensor) -> Result { type KeyPoint (line 707) | pub struct KeyPoint { type Bbox (line 714) | pub struct Bbox { function iou (line 724) | fn iou(b1: &Bbox, b2: &Bbox) -> f32 { function report_detect (line 735) | pub fn report_detect( function non_maximum_suppression (line 792) | fn non_maximum_suppression(bboxes: &mut [Vec], threshold: f32) { function report_pose (line 815) | pub fn report_pose( FILE: candle-wasm-examples/yolo/src/worker.rs function log (line 13) | pub fn log(s: &str); type ModelData (line 26) | pub struct ModelData { type RunData (line 32) | pub struct RunData { type Model (line 38) | pub struct Model { method run (line 43) | pub fn run( method load_ (line 95) | pub fn load_(weights: Vec, model_size: &str) -> Result { method load (line 112) | pub fn load(md: ModelData) -> Result { type ModelPose (line 117) | pub struct ModelPose { method run (line 122) | pub fn run( method load_ (line 174) | pub fn load_(weights: Vec, model_size: &str) -> Result { method load (line 191) | pub fn load(md: ModelData) -> Result { type Worker (line 196) | pub struct Worker { type Input (line 214) | type Input = WorkerInput; type Message (line 215) | type Message = (); type Output (line 216) | type Output = std::result::Result; type Reach (line 217) | type Reach = Public; method create (line 219) | fn create(link: WorkerLink) -> Self { method update (line 223) | fn update(&mut self, _msg: Self::Message) { method handle_input (line 227) | fn handle_input(&mut self, msg: Self::Input, id: HandlerId) { method name_of_resource (line 249) | fn name_of_resource() -> &'static str { method resource_path_is_relative (line 253) | fn resource_path_is_relative() -> bool { type WorkerInput (line 202) | pub enum WorkerInput { type WorkerOutput (line 208) | pub enum WorkerOutput { FILE: candle-wasm-examples/yolo/yoloWorker.js function fetchArrayBuffer (line 4) | async function fetchArrayBuffer(url) { class Yolo (line 17) | class Yolo { method getInstance (line 21) | static async getInstance(modelID, modelURL, modelSize) { FILE: candle-wasm-tests/src/lib.rs function add (line 1) | pub fn add(left: usize, right: usize) -> usize { function it_works (line 10) | fn it_works() { FILE: candle-wasm-tests/tests/quantized_tests.rs function quantized_matmul_neg (line 12) | fn quantized_matmul_neg() -> Result<()> { function create_ggml_like_vector (line 60) | fn create_ggml_like_vector(offset: f32) -> Vec { function vec_dot_reference (line 68) | fn vec_dot_reference(a: &[f32], b: &[f32]) -> f32 { function ggml_reference_matmul_error (line 73) | fn ggml_reference_matmul_error(dtype: GgmlDType) -> Result { function ggml_matmul_error_test (line 95) | fn ggml_matmul_error_test() -> Result<()> { function quantized_matmul_q40 (line 142) | fn quantized_matmul_q40() -> Result<()> { function quantized_matmul_q50 (line 148) | fn quantized_matmul_q50() -> Result<()> { function quantized_matmul_q80 (line 154) | fn quantized_matmul_q80() -> Result<()> { function quantized_matmul_q2k (line 160) | fn quantized_matmul_q2k() -> Result<()> { function quantized_matmul_q3k (line 166) | fn quantized_matmul_q3k() -> Result<()> { function quantized_matmul_q4k (line 172) | fn quantized_matmul_q4k() -> Result<()> { function quantized_matmul_q5k (line 178) | fn quantized_matmul_q5k() -> Result<()> { function quantized_matmul_q6k (line 184) | fn quantized_matmul_q6k() -> Result<()> { function quantized_matmul_q8k (line 190) | fn quantized_matmul_q8k() -> Result<()> { FILE: tensor-tools/src/main.rs type QuantizationMode (line 7) | enum QuantizationMode { method quantize (line 14) | fn quantize(&self, name: &str, tensor: QTensor, dtype: GgmlDType) -> R... type Quantization (line 35) | enum Quantization { method dtype (line 59) | fn dtype(&self) -> GgmlDType { type Format (line 80) | enum Format { method infer (line 90) | fn infer>(p: P) -> Option { type Command (line 107) | enum Command { type Args (line 166) | struct Args { function run_print (line 171) | fn run_print( function run_ls (line 299) | fn run_ls( function run_quantize_safetensors (line 398) | fn run_quantize_safetensors( function run_dequantize (line 435) | fn run_dequantize( function run_quantize (line 452) | fn run_quantize( function main (line 509) | fn main() -> anyhow::Result<()> {