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
↓ 1 callers
Function
_add_autoresume_args
(parser)
models/pangualpha/megatron/arguments.py:424
↓ 1 callers
Function
_add_checkpointing_args
(parser)
models/pangualpha/megatron/arguments.py:287
↓ 1 callers
Function
_add_data_args
(parser)
models/pangualpha/megatron/arguments.py:380
↓ 1 callers
Function
_add_distributed_args
(parser)
models/pangualpha/megatron/arguments.py:343
↓ 1 callers
Function
_add_initialization_args
(parser)
models/pangualpha/megatron/arguments.py:240
↓ 1 callers
Function
_add_learning_rate_args
(parser)
models/pangualpha/megatron/arguments.py:253
↓ 1 callers
Function
_add_mixed_precision_args
(parser)
models/pangualpha/megatron/arguments.py:312
↓ 1 callers
Function
_add_network_size_args
(parser)
models/pangualpha/megatron/arguments.py:146
↓ 1 callers
Function
_add_realm_args
(parser)
models/pangualpha/megatron/arguments.py:436
↓ 1 callers
Function
_add_regularization_args
(parser)
models/pangualpha/megatron/arguments.py:187
↓ 1 callers
Method
_add_tokens
(self, new_tokens: List[Union[str, AddedToken]], special_tokens=False)
models/qwen2/qwen2_jt/tokenization_utils_fast.py:262
↓ 1 callers
Function
_add_training_args
(parser)
models/pangualpha/megatron/arguments.py:202
↓ 1 callers
Function
_add_validation_args
(parser)
models/pangualpha/megatron/arguments.py:367
↓ 1 callers
Method
_batch_encode_plus
( self, batch_text_or_text_pairs: List[str], add_special_tokens: bool = True,
models/qwen2/qwen2_jt/tokenization_utils_fast.py:268
↓ 1 callers
Function
_build_doc_idx
Build an array with length = number-of-epochs * number-of-dcuments. Each index is mapped to a corresponding document.
models/pangualpha/megatron/data/gpt2_dataset.py:250
↓ 1 callers
Function
_build_iflytek_dataset
()
models/pangualpha/tasks/zeroshot_gpt2/datasets.py:202
↓ 1 callers
Function
_build_index_mappings
Build doc-idx, sample-idx, and shuffle-idx. doc-idx: is an array (ordered) of documents to be used in training. sample-idx: is the start docum
models/pangualpha/megatron/data/gpt2_dataset.py:139
↓ 1 callers
Function
_build_infinite_size_dataloader
Build a looped dataloader with infinite size.
models/pangualpha/tasks/finetune_utils.py:95
↓ 1 callers
Function
_build_key_size_numel_dictionaries
Build the size on rank 0 and broadcast.
models/pangualpha/megatron/mpu/data.py:33
↓ 1 callers
Function
_build_lambada_dataset
Build lambada dataset.
models/pangualpha/tasks/zeroshot_gpt2/datasets.py:167
↓ 1 callers
Function
_build_shuffle_idx
Build the range [0, size) and shuffle.
models/pangualpha/megatron/data/gpt2_dataset.py:310
↓ 1 callers
Function
_build_train_valid_dataloaders
Traing and validation dataloaders.
models/pangualpha/tasks/finetune_utils.py:106
↓ 1 callers
Function
_build_wikitext103_dataset
()
models/pangualpha/tasks/zeroshot_gpt2/datasets.py:180
↓ 1 callers
Function
_check_arg_is_not_none
(args, arg)
models/pangualpha/megatron/arguments.py:142
↓ 1 callers
Function
_check_data_types
Check that all the keys have the same target data type.
models/pangualpha/megatron/mpu/data.py:26
↓ 1 callers
Method
_check_overflow
(self)
models/pangualpha/megatron/fp16/fp16.py:294
↓ 1 callers
Method
_checkpointed_forward
Forward method with activation checkpointing.
models/pangualpha/megatron/model/transformer.py:869
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:280
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:289
↓ 1 callers
Method
_configure_tokenizer
( text_tokenizer: TextTokenizer, special_tokens: List[str], max_blank_length: int,
models/chatglm/tokenization_chatglm.py:39
↓ 1 callers
Method
_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
models/chatglm/tokenization_chatglm.py:283
↓ 1 callers
Method
_decode
( self, token_ids: Union[int, List[int]], skip_special_tokens: bool = False, c
models/qwen2/qwen2_jt/tokenization_utils_fast.py:308
↓ 1 callers
Method
_downscale_master
(self)
models/pangualpha/megatron/fp16/fp16.py:322
↓ 1 callers
Method
_encode_whitespaces
(text: str, max_len: int = 80)
models/chatglm/tokenization_chatglm.py:101
↓ 1 callers
Function
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
models/atom7b/modeling_llama.py:70
↓ 1 callers
Method
_get_initial_cache_position
Calculates `cache_position` for the pre-fill stage based on `input_ids` and optionally past length
models/qwen2/qwen2_jt/utils.py:517
↓ 1 callers
Method
_get_layer_index
(self, layer_number)
models/pangualpha/megatron/model/transformer.py:859
↓ 1 callers
Method
_get_pointers
(sizes)
models/pangualpha/megatron/data/indexed_dataset.py:352
↓ 1 callers
Method
_has_inf_or_nan
(x)
models/pangualpha/megatron/fp16/loss_scaler.py:53
↓ 1 callers
Function
_init_autoresume
Set autoresume start time.
models/pangualpha/megatron/initialize.py:129
↓ 1 callers
Method
_init_rope
(self)
models/atom7b/modeling_llama.py:271
↓ 1 callers
Method
_init_weights
(self, module)
models/qwen2/qwen2_jt/modeling_qwen2.py:384
↓ 1 callers
Function
_initialize_distributed
Initialize torch.distributed and mpu.
models/pangualpha/megatron/initialize.py:88
↓ 1 callers
Function
_initialize_mem_buffs
Initialize manually allocated static memory.
models/pangualpha/megatron/initialize.py:159
↓ 1 callers
Method
_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:258
↓ 1 callers
Method
_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:267
↓ 1 callers
Function
_is_control
Checks whether `chars` is a control character.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:366
↓ 1 callers
Function
_is_control
Checks whether `chars` is a control character.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:377
↓ 1 callers
Function
_is_punctuation
Checks whether `chars` is a punctuation character.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:378
↓ 1 callers
Function
_is_punctuation
Checks whether `chars` is a punctuation character.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:389
↓ 1 callers
Function
_is_whitespace
Checks whether `chars` is a whitespace character.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:354
↓ 1 callers
Function
_is_whitespace
Checks whether `chars` is a whitespace character.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:365
↓ 1 callers
Function
_make_causal_mask
Make causal mask used for bi-directional self-attention.
models/atom7b/modeling_llama.py:52
↓ 1 callers
Method
_model_grads_to_master_grads
(self)
models/pangualpha/megatron/fp16/fp16.py:318
↓ 1 callers
Method
_model_params_to_master_params
(self)
models/pangualpha/megatron/fp16/fp16.py:311
↓ 1 callers
Method
_norm
(self, x)
models/llama/llama/model.py:34
↓ 1 callers
Function
_num_epochs
Based on number of samples and sequence lenght, calculate how many epochs will be needed.
models/pangualpha/megatron/data/gpt2_dataset.py:235
↓ 1 callers
Function
_num_tokens
Total number of tokens in the dataset.
models/pangualpha/megatron/data/gpt2_dataset.py:230
↓ 1 callers
Method
_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
models/atom7b/modeling_llama.py:600
↓ 1 callers
Method
_prepare_special_tokens
Prepares the special tokens for generation, overwriting the generation config with their processed versions converted to tensor.
models/qwen2/qwen2_jt/utils.py:536
↓ 1 callers
Function
_print_args
Print arguments.
models/pangualpha/megatron/arguments.py:129
↓ 1 callers
Method
_run_split_on_punc
Splits punctuation on a piece of text.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:223
↓ 1 callers
Method
_run_split_on_punc
Splits punctuation on a piece of text.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:234
↓ 1 callers
Method
_run_strip_accents
Strips accents from a piece of text.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:212
↓ 1 callers
Method
_run_strip_accents
Strips accents from a piece of text.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:223
↓ 1 callers
Method
_sample
( self, input_ids: jt.Var, logits_processor: LogitsProcessorList, stopping_cri
models/qwen2/qwen2_jt/utils.py:626
↓ 1 callers
Function
_set_adlr_autoresume
Initialize ADLR autoresume.
models/pangualpha/megatron/global_vars.py:120
↓ 1 callers
Function
_set_random_seed
Set random seed for reproducability.
models/pangualpha/megatron/initialize.py:138
↓ 1 callers
Function
_set_tensorboard_writer
Set tensorboard writer.
models/pangualpha/megatron/global_vars.py:101
↓ 1 callers
Function
_set_timers
Initialize timers.
models/pangualpha/megatron/global_vars.py:138
↓ 1 callers
Method
_step_with_closure
(self, closure)
models/pangualpha/megatron/fp16/fp16.py:476
↓ 1 callers
Method
_tokenize_chinese_chars
Adds whitespace around any CJK character.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:245
↓ 1 callers
Method
_tokenize_chinese_chars
Adds whitespace around any CJK character.
models/pangualpha/megatron/tokenizer/bert_tokenization.py:254
↓ 1 callers
Function
_train
Train the model.
models/pangualpha/tasks/finetune_utils.py:126
↓ 1 callers
Function
_vocab_size_with_padding
Pad vocab size so it is divisible by model parallel size and still having GPU friendly size.
models/pangualpha/megatron/tokenizer/tokenizer.py:54
↓ 1 callers
Function
_write_args_to_tensorboard
Write arguments to tensorboard.
models/pangualpha/megatron/initialize.py:150
↓ 1 callers
Method
add_block_data
Add data for set of blocks :param block_indices: 1D array of unique int ids for the blocks :param block_embeds: 2D array of embeddings
models/pangualpha/megatron/data/realm_index.py:60
↓ 1 callers
Method
add_block_embed_data
Add the embedding of each block to the underlying FAISS index
models/pangualpha/megatron/data/realm_index.py:169
↓ 1 callers
Method
add_item
(self, tensor)
models/pangualpha/megatron/data/indexed_dataset.py:284
↓ 1 callers
Method
allreduce_params
(reduce_after=True, no_scale=False, fp32_allreduce=False)
models/pangualpha/megatron/model/distributed.py:35
↓ 1 callers
Method
apply_defaults
(self, args)
models/pangualpha/megatron/deprecated_data_utils/configure_data.py:41
↓ 1 callers
Function
apply_rotary_emb
( xq: jt.Var, xk: jt.Var, freqs_cis: jt.Var, )
models/llama/llama/model.py:58
↓ 1 callers
Function
apply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`jt.Var`): The query tensor. k (`jt.Var`): The key tenso
models/qwen2/qwen2_jt/modeling_qwen2.py:144
↓ 1 callers
Function
apply_rotary_pos_emb
(q, k, cos, sin, position_ids)
models/atom7b/modeling_llama.py:189
↓ 1 callers
Method
as_array
(self)
models/pangualpha/megatron/data/realm_dataset_utils.py:87
↓ 1 callers
Method
as_tuple
(self)
models/pangualpha/megatron/data/realm_dataset_utils.py:90
↓ 1 callers
Function
attention_fn
( self, query_layer, key_layer, value_layer, attention_mask, h
models/chatglm/modeling_chatglm.py:242
↓ 1 callers
Method
backward
(self, loss, retain_graph=False)
models/pangualpha/megatron/fp16/loss_scaler.py:71
↓ 1 callers
Function
backward_step
Backward step.
models/pangualpha/megatron/training.py:232
↓ 1 callers
Function
bias_gelu
(bias, y)
models/pangualpha/megatron/model/fused_bias_gelu.py:32
↓ 1 callers
Function
bias_gelu_back
(g, bias, y)
models/pangualpha/megatron/model/fused_bias_gelu.py:40
↓ 1 callers
Method
bpe
(self, token)
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:195
↓ 1 callers
Method
build_and_save_index
Goes through one epoch of the dataloader and adds all data to this instance's BlockData. The copy of BlockData is saved as a shard, which whe
models/pangualpha/megatron/indexer.py:51
↓ 1 callers
Function
build_dataset
Helper function to select and build dataset.
models/pangualpha/tasks/zeroshot_gpt2/datasets.py:29
↓ 1 callers
Function
build_tokens_types_paddings_from_text
Build token types and paddings, trim if needed, and pad if needed.
models/pangualpha/tasks/data_utils.py:48
↓ 1 callers
Function
build_train_valid_test_data_iterators
XXX
models/pangualpha/megatron/training.py:487
↓ 1 callers
Function
build_train_valid_test_datasets
Build train, valid, and test datasets.
models/pangualpha/megatron/data/gpt2_dataset.py:29
↓ 1 callers
Function
build_training_sample
Biuld training sample. Arguments: sample: A list of sentences in which each sentence is a list token ids. target_seq_length: Desi
models/pangualpha/megatron/data/bert_dataset.py:172
↓ 1 callers
Function
bytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:54
↓ 1 callers
Function
bytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:55
← previous
next →
301–400 of 1,370, ranked by callers