Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Narsil/smelte-rs
/ functions
Functions
212 in github.com/Narsil/smelte-rs
⨍
Functions
212
◇
Types & classes
58
↓ 1 callers
Function
unsplit
(ctx: &mut Gpt2Context<F32CudaTensor>)
src/nn/models/gpt2.rs:359
Function
add
tensor elementwise addition. b += a. a is automatically broadcasted.
src/cpu/f16/ops.rs:180
Method
add
(x: &Self, y: &mut Self)
src/gpu/f32/traits.rs:35
Method
add
(x: &Self, y: &mut Self)
src/cpu/f32/traits.rs:34
Function
apply
Applies `func` to every item of the tensor
src/cpu/f16/ops.rs:371
Method
attention
( query: &Linear<F32Tensor>, key: &Linear<F32Tensor>, value: &Linear<F32Te
src/nn/models/bert.rs:152
Method
attention
( qkv: &LinearT<F32Tensor>, ctx: &mut Gpt2Context<F32Tensor>, i: usize,
src/nn/models/gpt2.rs:301
Function
bench_gelu
(b: &mut Bencher)
benches/ops.rs:8
Function
bench_normalize
(b: &mut Bencher)
benches/ops.rs:17
Function
bench_softmax
(b: &mut Bencher)
benches/ops.rs:26
Method
bias
TODO
src/nn/layers/linear.rs:30
Method
borrowed
Creates a new borrowed tensor with given shape. Can fail if data doesn't match the shape ``` use smelte_rs::cpu::f32::Tensor; let tensor = Tensor::bo
src/cpu/f32/tensor.rs:80
Method
borrowed
Creates a new borrowed tensor with given shape. Can fail if data doesn't match the shape ``` use smelte-rs::cpu::f16::Tensor; let data = [1.0, 2.0, 3
src/cpu/f16/tensor.rs:66
Method
broadcast_add
(x: &Self, y: &mut Self)
src/gpu/f32/traits.rs:38
Method
broadcast_add
(x: &Self, y: &mut Self)
src/cpu/f32/traits.rs:37
Method
broadcast_mul
(x: &Self, y: &mut Self)
src/gpu/f32/traits.rs:47
Method
broadcast_mul
(x: &Self, y: &mut Self)
src/cpu/f32/traits.rs:46
Method
copy
(src: &Self, dst: &mut Self)
src/gpu/f32/traits.rs:29
Method
copy
(src: &Self, dst: &mut Self)
src/cpu/f32/traits.rs:28
Method
cpu_data
A slice to the underlying tensor data. Exists uniquely for symetry with gpu Tensor. ``` use smelte_rs::cpu::f32::Tensor; let tensor = Tensor::zeros(v
src/cpu/f32/tensor.rs:46
Method
cpu_data
(&self)
src/nn/models/bert.rs:164
Method
cpu_data
(&self)
src/nn/models/gpt2.rs:312
Method
device
(&self)
src/gpu/f32/traits.rs:16
Method
device
(&self)
src/cpu/f32/traits.rs:15
Function
faster_gelu
(v: f32)
src/cpu/f32/ops.rs:418
Function
faster_gelu
(v: f16)
src/cpu/f16/ops.rs:345
Method
from
(cublas: CublasError)
src/gpu/f32/ops.rs:29
Method
from_cpu
Creates a tensor from a cpu [Vec].
src/gpu/f32/tensor.rs:98
Method
from_cpu
Creates a new tensor with given shape. Can fail if data doesn't match the shape Exists only for symetry with gpu tensor. ``` use smelte_rs::cpu::f32::
src/cpu/f32/tensor.rs:115
Method
from_tensors
(tensors: &'a SafeTensors<'a>, device: &Device)
examples/bert.rs:125
Method
from_tensors
(tensors: &'a SafeTensors<'a>, device: &Device)
examples/gpt2.rs:181
Function
g_matmul
( a: &Tensor, b: &Tensor, c: &mut Tensor, )
src/gpu/f32/ops.rs:97
Function
g_matmul
( a: &Tensor, b: &Tensor, c: &mut Tensor, )
src/cpu/f32/ops.rs:58
Function
g_matmul
( a: &Tensor, b: &Tensor, c: &mut Tensor, )
src/cpu/f16/ops.rs:70
Function
g_softmax
( x: &mut Tensor, past_sequence_length: usize, )
src/gpu/f32/ops.rs:377
Function
g_softmax
( x: &mut Tensor, past_sequence_length: usize, )
src/cpu/f32/ops.rs:313
Function
g_softmax
( x: &mut Tensor, past_sequence_length: usize, )
src/cpu/f16/ops.rs:250
Function
gelu
(v: f32)
src/cpu/f32/ops.rs:426
Function
gelu
(v: f16)
src/cpu/f16/ops.rs:359
Method
gelu
(x: &mut Tensor)
src/gpu/f32/traits.rs:77
Method
gelu
(x: &mut Tensor)
src/cpu/f32/traits.rs:76
Function
main
()
build.rs:191
Function
main
()
examples/bert.rs:409
Function
main
()
examples/gpt2.rs:285
Method
matmul
(x: &Self, y: &Self, out: &mut Self)
src/gpu/f32/traits.rs:59
Method
matmul
(x: &Self, y: &Self, out: &mut Self)
src/cpu/f32/traits.rs:58
Method
matmul_t
(x: &Self, y: &Self, out: &mut Self)
src/gpu/f32/traits.rs:65
Method
matmul_t
(x: &Self, y: &Self, out: &mut Self)
src/cpu/f32/traits.rs:64
Function
mul
tensor elementwise multiplication. b *= a. a is automatically broadcasted.
src/cpu/f16/ops.rs:206
Method
mul
(x: &Self, y: &mut Self)
src/gpu/f32/traits.rs:44
Method
mul
(x: &Self, y: &mut Self)
src/cpu/f32/traits.rs:43
Method
new
TODO
src/gpu/f32/tensor.rs:24
Method
new
Creates a new tensor with given shape. Can fail if data doesn't match the shape ``` use smelte_rs::cpu::f32::Tensor; let data = vec![1.0, 2.0, 3.0, 4
src/cpu/f32/tensor.rs:92
Method
new
Creates a new tensor with given shape. Can fail if data doesn't match the shape ``` use smelte-rs::cpu::f16::Tensor; let data = vec![1.0, 2.0, 3.0, 4
src/cpu/f16/tensor.rs:78
Method
new
Linear layer creation
src/nn/layers/linear.rs:13
Method
new
TODO
src/nn/layers/embedding.rs:12
Method
new
TODO
src/nn/layers/layer_norm.rs:14
Method
new
TODO
src/nn/models/bert.rs:340
Method
new
TODO
src/nn/models/gpt2.rs:48
Method
normalize
(x: &mut Self, epsilon: f32)
src/gpu/f32/traits.rs:53
Method
normalize
(x: &mut Self, epsilon: f32)
src/cpu/f32/traits.rs:52
Method
probs
TODO
src/nn/models/bert.rs:64
Method
probs
TODO
src/nn/models/gpt2.rs:183
Method
run
TODO
src/nn/models/gpt2.rs:644
Method
select
(x: &[usize], weight: &Self, out: &mut Self)
src/gpu/f32/traits.rs:71
Method
select
(x: &[usize], weight: &Self, out: &mut Self)
src/cpu/f32/traits.rs:70
Method
set_num_heads
TODO
src/nn/models/gpt2.rs:590
Method
shape
(&self)
src/gpu/f32/traits.rs:12
Method
shape
(&self)
src/cpu/f32/traits.rs:11
Function
simple_add
()
src/gpu/f32/ops.rs:568
Function
simple_broadcast_add
()
src/gpu/f32/ops.rs:581
Function
simple_broadcast_add
()
src/cpu/f32/ops.rs:442
Function
simple_causal_softmax
()
src/gpu/f32/ops.rs:620
Function
simple_causal_softmax
()
src/cpu/f32/ops.rs:534
Function
simple_causal_softmax
()
src/cpu/f16/ops.rs:463
Function
simple_matmul
()
src/gpu/f32/ops.rs:479
Function
simple_matmul
()
src/cpu/f32/ops.rs:450
Function
simple_matmul
()
src/cpu/f16/ops.rs:381
Function
simple_matmul_t
()
src/gpu/f32/ops.rs:525
Function
simple_matmul_t
()
src/cpu/f32/ops.rs:490
Function
simple_matmul_t
()
src/cpu/f16/ops.rs:419
Function
simple_mul
()
src/gpu/f32/ops.rs:595
Function
simple_normalize
()
src/gpu/f32/ops.rs:678
Function
simple_normalize
()
src/cpu/f32/ops.rs:590
Function
simple_normalize
()
src/cpu/f16/ops.rs:519
Function
simple_select
()
src/gpu/f32/ops.rs:665
Function
simple_select
()
src/cpu/f32/ops.rs:578
Function
simple_select
()
src/cpu/f16/ops.rs:507
Function
simple_softmax
()
src/gpu/f32/ops.rs:608
Function
simple_softmax
()
src/cpu/f32/ops.rs:523
Function
simple_softmax
()
src/cpu/f16/ops.rs:452
Function
simplify
(data: &[f32])
src/lib.rs:169
Method
softmax
(x: &mut Tensor)
src/gpu/f32/traits.rs:91
Method
softmax
(x: &mut Tensor)
src/cpu/f32/traits.rs:90
Function
special_argmax
Argmax of the last dimension of tensor `x `.
src/cpu/f32/ops.rs:367
Function
special_argmax
Argmax of the last dimension of tensor `x `.
src/cpu/f16/ops.rs:304
Function
suggest_setvars_cmd
(root: &str)
build.rs:101
Method
tanh
(x: &mut Tensor)
src/gpu/f32/traits.rs:84
Method
tanh
(x: &mut Tensor)
src/cpu/f32/traits.rs:83
Function
test_cuda_split_heads
()
src/nn/models/bert.rs:696
← previous
next →
101–200 of 212, ranked by callers