Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jittor/JittorLLMs
/ functions
Functions
1,370 in github.com/Jittor/JittorLLMs
⨍
Functions
1,370
◇
Types & classes
194
↳
Endpoints
3
↓ 256 callers
Method
append
(self, other)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:109
↓ 132 callers
Function
print_rank_0
If distributed is initialized print only on rank 0.
models/pangualpha/megatron/__init__.py:36
↓ 130 callers
Method
size
(self, index)
models/pangualpha/megatron/data/indexed_dataset.py:197
↓ 84 callers
Function
get_args
Return arguments.
models/pangualpha/megatron/global_vars.py:34
↓ 52 callers
Method
extend
(self, other)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:122
↓ 34 callers
Method
get
Retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [idx] but get
models/pangualpha/megatron/data/indexed_dataset.py:500
↓ 24 callers
Method
encode
(self, x)
models/chatrwkv/src/utils.py:35
↓ 23 callers
Method
forward
(self, tokens, state, preprocess_only = False)
models/chatrwkv/src/model_run.py:206
↓ 23 callers
Function
get_tokenizer
Return tokenizer.
models/pangualpha/megatron/global_vars.py:40
↓ 22 callers
Method
write
Write timers to a tensorboard writer
models/pangualpha/megatron/global_vars.py:211
↓ 21 callers
Function
splitTensorlIntoPartition
(tensor, tensorNewList, mpPartitions, tensorName, dim)
models/pangualpha/tools/splitMergedCkpt_v0.py:74
↓ 21 callers
Method
start
Start the timer.
models/pangualpha/megatron/global_vars.py:164
↓ 20 callers
Method
tokenize
(self, *text)
models/pangualpha/tools/preprocess_data_pangu.py:54
↓ 18 callers
Method
stop
Stop the timer.
models/pangualpha/megatron/global_vars.py:171
↓ 17 callers
Method
exists
check if the filepath for a text tokenizer exists
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:437
↓ 16 callers
Method
exists
(path)
models/pangualpha/megatron/data/indexed_dataset.py:201
↓ 14 callers
Method
cumsum
(sequence)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:49
↓ 14 callers
Method
decode
(self, x)
models/chatrwkv/src/utils.py:38
↓ 14 callers
Method
layer_norm
(self, x, w)
models/chatrwkv/RWKV_in_150_lines.py:54
↓ 14 callers
Function
set_random_seed
Set random seed for reproducability.
models/pangualpha/megatron/mpu/tests/commons.py:34
↓ 14 callers
Method
update
Updates the cache with the new `key_states` and `value_states` for the layer `layer_idx`. Parameters: key_states (`jt.Va
models/qwen2/qwen2_jt/utils.py:43
↓ 14 callers
Method
write
given a generator of metrics for each of the data points X_i, write the metrics, text, and labels to a csv file
models/pangualpha/megatron/deprecated_data_utils/datasets.py:299
↓ 13 callers
Method
apply
(self, args)
models/pangualpha/megatron/deprecated_data_utils/configure_data.py:31
↓ 13 callers
Function
print_separator
(message)
models/pangualpha/megatron/mpu/tests/commons.py:76
↓ 13 callers
Method
write
(self, sizes, doc_idx)
models/pangualpha/megatron/data/indexed_dataset.py:363
↓ 12 callers
Function
get_model_parallel_group
Get the model parallel group the caller rank belongs to.
models/pangualpha/megatron/mpu/initialize.py:97
↓ 12 callers
Function
get_model_parallel_rank
Return my rank for the model parallel group.
models/pangualpha/megatron/mpu/initialize.py:131
↓ 11 callers
Function
get_checkpoint_name
A unified checkpoint name.
models/pangualpha/megatron/checkpointing.py:61
↓ 11 callers
Function
get_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
models/pangualpha/megatron/checkpointing.py:75
↓ 11 callers
Function
get_model_parallel_world_size
Return world size for the model parallel group.
models/pangualpha/megatron/mpu/initialize.py:117
↓ 11 callers
Function
get_timers
Return timers.
models/pangualpha/megatron/global_vars.py:58
↓ 11 callers
Method
load_state_dict
(self, state_dict, strict=True)
models/pangualpha/megatron/fp16/fp16.py:84
↓ 10 callers
Method
add
Track the rng state.
models/pangualpha/megatron/mpu/random.py:160
↓ 10 callers
Function
save_all_stat
(srv, name, last_out)
models/chatrwkv/chat.py:238
↓ 10 callers
Function
save_all_stat
(srv, name, last_out)
models/chatrwkv/v2/chat.py:149
↓ 10 callers
Method
save_all_stat
(self, srv, name, last_out)
models/chatrwkv/__init__.py:165
↓ 9 callers
Method
__init__
(self, config)
models/atom7b/modeling_llama.py:201
↓ 9 callers
Method
backward
(ctx, *args)
models/pangualpha/megatron/mpu/random.py:292
↓ 9 callers
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
models/pangualpha/megatron/model/distributed.py:78
↓ 8 callers
Method
EncodeAsIds
encode text using text tokenizer and shift Id values for command tokens
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:319
↓ 8 callers
Method
__init__
(self, hidden_size, inner_hidden_size=None, layer_id=None, bias=True, activation_func=gelu, p
models/chatglm/modeling_chatglm.py:502
↓ 8 callers
Function
_compare
(arg_name)
models/pangualpha/megatron/checkpointing.py:36
↓ 8 callers
Function
add_to_logging
(name)
models/pangualpha/megatron/training.py:317
↓ 8 callers
Function
clean_text
Remove new lines and multiple spaces and adjust end of sentence dot.
models/pangualpha/tasks/data_utils.py:22
↓ 8 callers
Method
encode
(self, iterator)
models/pangualpha/tools/preprocess_data_pangu.py:62
↓ 8 callers
Function
run_rnn
(tokens, newline_adj = 0)
models/chatrwkv/chat.py:220
↓ 8 callers
Function
run_rnn
(tokens, newline_adj = 0)
models/chatrwkv/v2/chat.py:131
↓ 8 callers
Method
run_rnn
(self, tokens, newline_adj = 0)
models/chatrwkv/__init__.py:150
↓ 7 callers
Method
__init__
(self, config)
models/qwen2/qwen2_jt/modeling_qwen2.py:123
↓ 7 callers
Method
add
Allocate a chunk of memory from the buffer to tensor and copy the values.
models/pangualpha/megatron/memory.py:89
↓ 7 callers
Function
data_file_path
(prefix_path)
models/pangualpha/megatron/data/indexed_dataset.py:115
↓ 7 callers
Method
decode
(self, t: List[int])
models/llama/llama/tokenizer.py:39
↓ 7 callers
Method
get_command
get command token corresponding to `name`
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:271
↓ 7 callers
Function
rebuild_tokenizer
(args)
models/pangualpha/megatron/global_vars.py:95
↓ 6 callers
Method
SetTokenizer
(self, tokenizer)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:263
↓ 6 callers
Method
encode
(self, text)
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:278
↓ 6 callers
Function
ensure_directory_exists
Build filename's path if it does not already exists.
models/pangualpha/megatron/checkpointing.py:54
↓ 6 callers
Method
fork
Fork the cuda rng state, perform operations, and exit with the original state.
models/pangualpha/megatron/mpu/random.py:178
↓ 6 callers
Function
get_linear_layer
Simple linear layer with weight initialization.
models/pangualpha/megatron/model/utils.py:45
↓ 6 callers
Function
index_file_path
(prefix_path)
models/pangualpha/megatron/data/indexed_dataset.py:111
↓ 6 callers
Function
init_method_normal
Init method based on N(0, sigma).
models/pangualpha/megatron/model/utils.py:27
↓ 6 callers
Function
initialize_megatron
Set global variables, initialize distributed, and set autoresume and random seeds. `allow_no_cuda` should not be set unless using megatron for
models/pangualpha/megatron/initialize.py:31
↓ 6 callers
Function
load_all_stat
(srv, name)
models/chatrwkv/chat.py:245
↓ 6 callers
Function
load_all_stat
(srv, name)
models/chatrwkv/v2/chat.py:156
↓ 6 callers
Method
load_all_stat
(self, srv, name)
models/chatrwkv/__init__.py:172
↓ 6 callers
Function
load_checkpoint
Load a model checkpoint and return the iteration.
models/pangualpha/megatron/checkpointing.py:131
↓ 6 callers
Method
load_state_dict
Customized load.
models/pangualpha/megatron/model/language_model.py:199
↓ 6 callers
Method
log
Log a group of timers.
models/pangualpha/megatron/global_vars.py:221
↓ 6 callers
Method
sample_logits
(self, logits, x, ctx_len, temperature=1.0, top_p=1.0)
models/chatrwkv/src/utils.py:41
↓ 6 callers
Function
scaled_init_method_normal
Init method based on N(0, sigma/sqrt(2*num_layers).
models/pangualpha/megatron/model/utils.py:35
↓ 6 callers
Method
state_dict
(self, destination=None, prefix='', keep_vars=False)
models/pangualpha/megatron/fp16/fp16.py:76
↓ 5 callers
Method
LN
(self, x, w)
models/chatrwkv/src/model_run.py:108
↓ 5 callers
Method
__init__
(self, init_method, output_layer_init_method)
models/pangualpha/megatron/model/transformer.py:66
↓ 5 callers
Method
_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them.
models/pangualpha/megatron/learning_rates.py:93
↓ 5 callers
Function
_ensure_var_is_not_initialized
Make sure the input variable is not None.
models/pangualpha/megatron/global_vars.py:150
↓ 5 callers
Function
_parse_args
Parse entire arguments.
models/pangualpha/megatron/global_vars.py:76
↓ 5 callers
Function
_set_cuda_rng_state
Sets the random number generator state of the current GPU. Argumentss: new_state (torch.ByteTensor): The desired state This function
models/pangualpha/megatron/mpu/random.py:71
↓ 5 callers
Function
cached_path
Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and retur
models/pangualpha/megatron/deprecated_data_utils/file_utils.py:87
↓ 5 callers
Method
decode
(self, tokens)
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:283
↓ 5 callers
Method
detokenize
(self, token_ids)
models/pangualpha/megatron/tokenizer/tokenizer.py:98
↓ 5 callers
Function
divide
Ensure that numerator is divisible by the denominator and return the division value.
models/pangualpha/megatron/mpu/utils.py:26
↓ 5 callers
Function
download_fromhub
(path, tdir="")
models/util.py:4
↓ 5 callers
Method
from_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:98
↓ 5 callers
Function
get_cuda_rng_tracker
Get cuda rng tracker.
models/pangualpha/megatron/mpu/random.py:215
↓ 5 callers
Function
get_language_model
Build language model and return along with the key to save.
models/pangualpha/megatron/model/language_model.py:45
↓ 5 callers
Function
get_model
Build the model.
models/pangualpha/megatron/training.py:116
↓ 5 callers
Function
initialize_distributed
Initialize torch.distributed.
models/pangualpha/megatron/mpu/tests/commons.py:42
↓ 5 callers
Method
load_state_dict
Load the state dicts of each of the models
models/pangualpha/megatron/model/realm_model.py:105
↓ 5 callers
Method
maybe_print
(self, msg)
models/pangualpha/megatron/fp16/fp16.py:258
↓ 5 callers
Function
save_checkpoint
Save a model checkpoint.
models/pangualpha/megatron/checkpointing.py:81
↓ 5 callers
Method
state_dict_for_save_checkpoint
Use this function to override the state dict for saving checkpoints.
models/pangualpha/megatron/module.py:27
↓ 5 callers
Method
tokenize
(self, text)
models/pangualpha/megatron/tokenizer/tokenizer.py:95
↓ 4 callers
Method
GetTokenizer
(self)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:272
↓ 4 callers
Method
__init__
(self, dim: int, eps: float = 1e-6)
models/llama/llama/model.py:29
↓ 4 callers
Function
bert_extended_attention_mask
(attention_mask, dtype)
models/pangualpha/megatron/model/bert_model.py:37
↓ 4 callers
Function
bert_position_ids
(token_ids)
models/pangualpha/megatron/model/bert_model.py:59
↓ 4 callers
Function
build_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
models/pangualpha/tasks/finetune_utils.py:74
↓ 4 callers
Method
concat_and_pad_tokens
Concat with special tokens and pad sequence to self.max_seq_length
models/pangualpha/megatron/data/ict_dataset.py:126
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:136
↓ 4 callers
Method
convert_ids_to_tokens
Converts a sequence of ids in BPE tokens using the vocab.
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:269
next →
1–100 of 1,370, ranked by callers