MCPcopy Create free account

hub / github.com/Gadersd/llama2-burn / functions

Functions66 in github.com/Gadersd/llama2-burn

↓ 8 callersFunctionload_linear
( path: &str, device: &B::Device, )
src/model.rs:517
↓ 8 callersFunctionsave_linear
(linear, path)
llama-py/dump.py:18
↓ 8 callersFunctionsave_scalar
(s, name, path)
llama-py/dump.py:7
↓ 4 callersMethod__init__
(self, dim: int, eps: float = 1e-6)
llama-py/model.py:34
↓ 4 callersMethoddecode
(&self, tokens: &[i64], skip_special_tokens: bool)
src/token.rs:53
↓ 4 callersMethodencode
(&self, text: &str, include_bos: bool, include_eos: bool)
src/token.rs:23
↓ 4 callersMethodforward
(&self, x: Tensor<B, 2, Int>)
src/model.rs:80
↓ 4 callersFunctionsave_tensor
(tensor, name, path)
llama-py/dump.py:11
↓ 3 callersMethoddecode
(self, t: List[int])
llama-py/tokenizer.py:31
↓ 3 callersFunctionload_rmsnorm
(path: &str, device: &B::Device)
src/model.rs:532
↓ 3 callersFunctionsave_rmsnorm
(norm, path)
llama-py/dump.py:26
↓ 2 callersFunctionattn_decoder_mask
Generates a strictly upper triangular matrix filled with -inf that when added to an attention weight matrix prevents vectors from attending to other v
src/model.rs:333
↓ 2 callersMethodencode
(self, s: str, bos: bool, eos: bool)
llama-py/tokenizer.py:22
↓ 2 callersMethodforward
(self, x)
llama-py/model.py:42
↓ 2 callersMethodinit
(&self, device: &B::Device)
src/model.rs:25
↓ 2 callersFunctionload_llama_dump
( path: &str, device: &B::Device, )
src/model.rs:604
↓ 2 callersFunctionrepeat_kv
torch.repeat_interleave(x, dim=2, repeats=n_rep)
llama-py/model.py:76
↓ 2 callersFunctionrepeat_kv
For a tensor of size (n_batch, n_ctx, n_kv_head, n_hstate), repeats the head keys or values in an interleaving manner so that the number of heads is e
src/model.rs:321
↓ 1 callersMethod_norm
(self, x)
llama-py/model.py:39
↓ 1 callersFunctionapply_rotary_emb
( xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor, )
llama-py/model.py:63
↓ 1 callersFunctionconcat_weights
(models)
llama-py/test.py:38
↓ 1 callersFunctionconcat_weights
(models)
llama-py/dump_model.py:37
↓ 1 callersFunctionconvert
(name)
llama-py/test.py:39
↓ 1 callersFunctionconvert
(name)
llama-py/dump_model.py:38
↓ 1 callersFunctionload_attention
( path: &str, device: &B::Device, )
src/model.rs:544
↓ 1 callersFunctionload_feedforward
(path: &str, device: &B::Device)
src/model.rs:568
↓ 1 callersFunctionload_llama
(model_name: &str, device: &B::Device)
src/bin/sample/main.rs:21
↓ 1 callersFunctionload_llama_model_file
( config: &LlamaConfig, filename: &str, device: &B::Device )
src/bin/sample/main.rs:28
↓ 1 callersFunctionload_model
(model_dir, tokenizer_path)
llama-py/test.py:11
↓ 1 callersFunctionload_model
(model_dir, tokenizer_path)
llama-py/dump_model.py:10
↓ 1 callersFunctionload_tensor
( name: &str, path: &str, device: &B::Device, )
src/model.rs:486
↓ 1 callersFunctionload_transformer_block
( path: &str, device: &B::Device, )
src/model.rs:583
↓ 1 callersFunctionnumpy_to_tensor
( numpy_data: NpyData<f32>, device: &B::Device, )
src/model.rs:474
↓ 1 callersFunctionpowto
(base: f64, x: Tensor<B, D>)
src/model.rs:388
↓ 1 callersFunctionprecompute_freqs_cis
(dim: int, end: int, theta: float = 10000.0)
llama-py/model.py:47
↓ 1 callersFunctionqkv_attention_rotary
( q: Tensor<B, 3>, k: Tensor<B, 3>, v: Tensor<B, 3>, mask: Option<Tensor<B, 2>>, n_head: u
src/model.rs:276
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
llama-py/model.py:55
↓ 1 callersFunctionsample_llama
( llama: &Llama<B>, tokenizer: &LlamaTokenizer, prompt: &str, n_tokens: usize, )
src/bin/sample/main.rs:45
↓ 1 callersFunctionsample_llama
( llama: &Llama<B>, tokenizer: &LlamaTokenizer, prompt: &str, n_tokens: usize, )
src/bin/test/main.rs:18
↓ 1 callersFunctionsave_attention
(attention, path)
llama-py/dump.py:31
↓ 1 callersFunctionsave_embedding
(embedding, path)
llama-py/dump.py:48
↓ 1 callersFunctionsave_feedforward
(feed_forward, path)
llama-py/dump.py:42
↓ 1 callersFunctionsave_llama_model_file
( llama: Llama<B>, name: &str, )
src/bin/convert/main.rs:34
↓ 1 callersFunctionsave_transformer_block
(transformer_block, path)
llama-py/dump.py:52
↓ 1 callersFunctiontest_tokenizer
(tokenizer: &LlamaTokenizer)
src/bin/test/main.rs:54
↓ 1 callersMethodvocab_size
(&self, include_special_tokens: bool)
src/token.rs:58
Method__init__
(self, model_path: str)
llama-py/tokenizer.py:11
Method__init__
(self, args: ModelArgs)
llama-py/model.py:89
Method__init__
( self, dim: int, hidden_dim: int, multiple_of: int, ffn_dim_multiplie
llama-py/model.py:178
Method__init__
(self, layer_id: int, args: ModelArgs)
llama-py/model.py:207
Method__init__
(self, params: ModelArgs)
llama-py/model.py:238
Functionconvert_llama_dump_to_model
( dump_path: &str, model_name: &str, device: &B::Device, )
src/bin/convert/main.rs:21
Methodforward
( self, x: torch.Tensor, start_pos: int, freqs_cis: torch.Tensor, mask
llama-py/model.py:136
Methodforward
(self, x)
llama-py/model.py:202
Methodforward
( self, x: torch.Tensor, start_pos: int, freqs_cis: torch.Tensor, mask
llama-py/model.py:223
Methodforward
(self, tokens: torch.Tensor, start_pos: int)
llama-py/model.py:262
Functionload_f32
(name: &str, path: &str, device: &B::Device)
src/model.rs:505
Functionload_usize
( name: &str, path: &str, device: &B::Device, )
src/model.rs:509
Functionmain
()
src/bin/sample/main.rs:90
Functionmain
()
src/bin/test/main.rs:75
Functionmain
()
src/bin/convert/main.rs:58
Methodnew
()
src/model.rs:457
Methodnew
(tokenizer_path: &str)
src/token.rs:18
Functionsave_llama_model_file
( llama: Llama<B>, name: &str, )
src/bin/sample/main.rs:38
Functionsave_transformer
(transformer, path)
llama-py/dump.py:59
Functiontest_tokenizer
()
src/bin/convert/main.rs:41