MCPcopy Create free account

hub / github.com/Jittor/JittorLLMs / functions

Functions1,370 in github.com/Jittor/JittorLLMs

↓ 1 callersMethodcalc_seq_len
(self, max_seq_len)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:819
↓ 1 callersFunctioncalc_threshold
(p, l)
models/pangualpha/tasks/ensemble_classifier.py:48
↓ 1 callersFunctioncalculate_correct_answers
Calculate correct over total answers and return prediction if the `output_predictions` is true.
models/pangualpha/tasks/eval_utils.py:75
↓ 1 callersMethodchannel_mixing
(self, x, state, i:int, time_mix_k, time_mix_r, kw, vw, rw)
models/chatrwkv/RWKV_in_150_lines.py:58
↓ 1 callersMethodchat
(self)
models/llama/__init__.py:73
↓ 1 callersMethodchat
(self)
models/chatglm/__init__.py:31
↓ 1 callersMethodchat
(self)
models/atom7b/__init__.py:59
↓ 1 callersFunctioncheck_checkpoint_args
Ensure fixed arguments for a model are the same for the input arguments and the one retreived frm checkpoint.
models/pangualpha/megatron/checkpointing.py:31
↓ 1 callersMethodclip_master_grads
Clips fp32 master gradients via ``torch.nn.utils.clip_grad_norm``. Args: max_norm (float or int): max norm of the gradie
models/pangualpha/megatron/fp16/fp16.py:332
↓ 1 callersFunctioncompress_int4_weight
(weight: torch.Tensor)
models/chatglm/quantization.py:67
↓ 1 callersMethodconcat_tokens
(self, tokens_a, token_types_a, tokens_b, token_types_b)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:847
↓ 1 callersMethodcontains_sentence_end
(self, tok)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:574
↓ 1 callersMethodconvert_ids_to_tokens
Converts a sequence of ids in wordpiece tokens using the vocab.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:131
↓ 1 callersMethodconvert_ids_to_tokens
(self, ids)
models/pangualpha/megatron/tokenizer/tokenization_jieba.py:81
↓ 1 callersFunctionconvert_module
Converts a module's immediate parameters and buffers to dtype.
models/pangualpha/megatron/fp16/fp16util.py:64
↓ 1 callersFunctionconvert_network
Converts a network's parameters and buffers to dtype.
models/pangualpha/megatron/fp16/fp16util.py:80
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:245
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:117
↓ 1 callersFunctioncopy_to_model_parallel_region
(input_)
models/pangualpha/megatron/mpu/mappings.py:144
↓ 1 callersFunctioncreate_masked_lm_predictions
Creates the predictions for the masked LM objective. Note: Tokens here are vocab ids and not text tokens.
models/pangualpha/megatron/data/dataset_utils.py:139
↓ 1 callersMethodcreate_masked_lm_predictions
Mask sequence pair for BERT training according to: https://github.com/google-research/bert/blob/master/create_pretraining_data.py#L33
models/pangualpha/megatron/deprecated_data_utils/datasets.py:854
↓ 1 callersMethodcreate_random_sentencepair
fetches a random sentencepair corresponding to rng state similar to https://github.com/google-research/bert/blob/master/create_pretra
models/pangualpha/megatron/deprecated_data_utils/datasets.py:704
↓ 1 callersFunctioncreate_tokens_and_tokentypes
Merge segments A and B, add [CLS] and [SEP] and build tokentypes.
models/pangualpha/megatron/data/dataset_utils.py:100
↓ 1 callersMethodcuda_att_pre
(self, x, sx, ln_w, ln_b, k_mix, v_mix, r_mix, kw, vw, rw)
models/chatrwkv/rwkv_pip_package/src/rwkv/model.py:355
↓ 1 callersMethoddata_iterator
iterates through data and handles wrap around
models/pangualpha/megatron/data/samplers.py:132
↓ 1 callersMethoddecode
(self, x)
models/chatrwkv/rwkv_pip_package/src/rwkv/utils.py:37
↓ 1 callersFunctiondfs_state_dict
(state_dict)
models/pangualpha/megatron/checkpointing.py:210
↓ 1 callersFunctiondomain_is_in_blacklist
(url)
models/pangualpha/tools/openwebtext/blacklist_urls.py:138
↓ 1 callersMethoddtype
(self)
models/pangualpha/megatron/data/indexed_dataset.py:427
↓ 1 callersMethodembed_query
Embed a batch of tokens using the query model
models/pangualpha/megatron/model/realm_model.py:72
↓ 1 callersMethodencode
(self, text)
models/pangualpha/megatron/tokenizer/tokenization_jieba.py:87
↓ 1 callersMethodencode
(self, x)
models/chatrwkv/rwkv_pip_package/src/rwkv/utils.py:34
↓ 1 callersMethodend_document
(self)
models/pangualpha/megatron/data/indexed_dataset.py:291
↓ 1 callersFunctionensemble_predictions
(args)
models/pangualpha/tasks/ensemble_classifier.py:120
↓ 1 callersFunctionevaluate
Evaluation.
models/pangualpha/megatron/training.py:432
↓ 1 callersFunctionevaluate
Evaluation.
models/pangualpha/tasks/zeroshot_gpt2/evaluate.py:109
↓ 1 callersFunctionevaluate_and_print_results
Evaluate and print results on screen.
models/pangualpha/tasks/zeroshot_gpt2/evaluate.py:134
↓ 1 callersFunctionexists_lazy
Check if we've already made a lazy version of this file for the `data_type` field.
models/pangualpha/megatron/deprecated_data_utils/lazy_loader.py:33
↓ 1 callersFunctionextention_is_in_blacklist
(url)
models/pangualpha/tools/openwebtext/blacklist_urls.py:214
↓ 1 callersFunctionfilter_corpus
(filename, out_filename, print_interval=10000)
models/pangualpha/tools/openwebtext/cleanup_dataset.py:45
↓ 1 callersMethodfinalize
(self, index_file)
models/pangualpha/megatron/data/indexed_dataset.py:314
↓ 1 callersFunctionfinish_mpu_init
()
models/pangualpha/megatron/initialize.py:53
↓ 1 callersFunctionformat_mappings
(line_idx, file_mappings)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:59
↓ 1 callersFunctionformat_mappings
(line_idx, file_mappings)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:74
↓ 1 callersMethodforward
(self, input, mask)
models/pangualpha/megatron/model/fused_softmax.py:70
↓ 1 callersMethodforward
(self, tokens, state, full_output=False)
models/chatrwkv/rwkv_pip_package/src/rwkv/model.py:373
↓ 1 callersFunctionforward_step
Forward step.
models/pangualpha/tasks/zeroshot_gpt2/evaluate.py:79
↓ 1 callersFunctionfp16_to_fp32
Convert fp16 `val` to fp32
models/pangualpha/megatron/fp16/fp16.py:56
↓ 1 callersFunctionfp32_to_fp16
Convert fp32 `val` to fp16
models/pangualpha/megatron/fp16/fp16.py:44
↓ 1 callersFunctiongather_from_model_parallel_region
(input_)
models/pangualpha/megatron/mpu/mappings.py:156
↓ 1 callersFunctiongather_split_1d_tensor
Opposite of above function, gather values from model parallel ranks.
models/pangualpha/megatron/mpu/random.py:113
↓ 1 callersFunctiongelu_impl
OpenAI's gelu implementation.
models/pangualpha/megatron/model/utils.py:54
↓ 1 callersFunctiongelu_impl
OpenAI's gelu implementation.
models/chatglm/modeling_chatglm.py:167
↓ 1 callersMethodgenerate
( self, generation_config: Optional[dict] = None, **kwargs, )
models/qwen2/qwen2_jt/utils.py:570
↓ 1 callersFunctiongenerate_samples_unconditional
(model)
models/pangualpha/megatron/text_generation_utils.py:234
↓ 1 callersFunctionget_a_and_b_segments
Divide sample into a and b segments.
models/pangualpha/megatron/data/dataset_utils.py:47
↓ 1 callersFunctionget_args
()
models/pangualpha/tools/preprocess_data_pangu.py:111
↓ 1 callersFunctionget_batch
Build the batch.
models/pangualpha/pretrain_bert.py:44
↓ 1 callersFunctionget_batch
Generate a batch
models/pangualpha/pretrain_gpt2.py:40
↓ 1 callersFunctionget_block_samples_mapping
Get samples mapping for a dataset over fixed size blocks. This function also requires a dataset of the titles for the source documents since their
models/pangualpha/megatron/data/realm_dataset_utils.py:109
↓ 1 callersFunctionget_corpus_freq
Take corpus, split it into sentences, and extract word frequencies. Write frequencies to `filepath` as a tsv. Only write the first MAX_SE
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:547
↓ 1 callersFunctionget_cuda_bare_metal_version
(cuda_dir)
models/pangualpha/megatron/fused_kernels/__init__.py:22
↓ 1 callersFunctionget_data_parallel_rank
Return my rank for the data parallel group.
models/pangualpha/megatron/mpu/initialize.py:152
↓ 1 callersFunctionget_dataset_from_path
(path_)
models/pangualpha/megatron/deprecated_data_utils/__init__.py:80
↓ 1 callersFunctionget_detokenizer
(path)
models/pangualpha/tasks/zeroshot_gpt2/detokenizer.py:77
↓ 1 callersMethodget_doc_idx
(self)
models/pangualpha/megatron/data/indexed_dataset.py:522
↓ 1 callersFunctionget_ext
gets path extension
models/pangualpha/megatron/deprecated_data_utils/__init__.py:44
↓ 1 callersFunctionget_filepaths
(filepaths, output_dir)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:66
↓ 1 callersFunctionget_filepaths
(filepaths, output_dir)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:81
↓ 1 callersFunctionget_from_cache
Given a URL, look for the corresponding dataset in the local cache. If it's not there, download it. Then return the path to the cached file.
models/pangualpha/megatron/deprecated_data_utils/file_utils.py:178
↓ 1 callersFunctionget_full_model_loadCkpt
(args)
models/pangualpha/tools/split_full_model_into_mp_model.py:57
↓ 1 callersFunctionget_ict_dataset
Get a dataset which uses block samples mappings to get ICT/block indexing data (via get_block()) rather than for training, since it is only built
models/pangualpha/megatron/data/ict_dataset.py:13
↓ 1 callersFunctionget_indexed_dataset_
Build indexed dataset.
models/pangualpha/megatron/data/gpt2_dataset.py:72
↓ 1 callersFunctionget_learning_rate_scheduler
Build the learning rate scheduler.
models/pangualpha/megatron/training.py:181
↓ 1 callersFunctionget_lines
(filepath)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:24
↓ 1 callersFunctionget_lines
(filepath)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:39
↓ 1 callersMethodget_lr
Learning rate decay functions from: https://openreview.net/pdf?id=BJYwwY9ll pg. 4
models/pangualpha/megatron/learning_rates.py:51
↓ 1 callersFunctionget_mapping_header
()
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:96
↓ 1 callersFunctionget_mapping_header
()
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:111
↓ 1 callersMethodget_masks
(self, input_ids, device)
models/chatglm/modeling_chatglm.py:831
↓ 1 callersMethodget_masks_and_position_ids
(self, input_ids, mask_positions, device, gmask=False)
models/chatglm/modeling_chatglm.py:1042
↓ 1 callersFunctionget_model
(model_type)
models/pangualpha/tools/change_MspCkpt_ToMgt.py:43
↓ 1 callersFunctionget_model_provider
Based on evaluation metric set the parallel-output flag and return the model provider.
models/pangualpha/tasks/zeroshot_gpt2/evaluate.py:35
↓ 1 callersFunctionget_one_epoch_dataloader
Specifically one epoch to be used in an indexing job.
models/pangualpha/megatron/data/realm_dataset_utils.py:13
↓ 1 callersFunctionget_one_partition_model
(args, rank)
models/pangualpha/tools/split_full_model_into_mp_model.py:77
↓ 1 callersFunctionget_optimizer
Set up the optimizer.
models/pangualpha/megatron/training.py:150
↓ 1 callersFunctionget_parallel_checkpoint_name
(path)
models/pangualpha/mergeMpCkpt.py:141
↓ 1 callersFunctionget_parallel_checkpoint_name
(path)
models/pangualpha/tools/merge_mp_partitions.py:133
↓ 1 callersFunctionget_params_for_weight_decay_optimization
Divide params into with-weight-decay and without-weight-decay groups. Layernorms and baises will have no weight decay but the rest will.
models/pangualpha/megatron/model/utils.py:66
↓ 1 callersMethodget_position_ids
(self, input_ids, mask_positions, device, gmask=False)
models/chatglm/modeling_chatglm.py:843
↓ 1 callersMethodget_prompt
(self, batch_size, device, dtype=torch.half)
models/chatglm/modeling_chatglm.py:815
↓ 1 callersFunctionget_samples_mapping_
(indexed_dataset, data_prefix, num_epochs,
models/pangualpha/megatron/data/bert_dataset.py:87
↓ 1 callersFunctionget_split
Get dataset splits from comma separated string list
models/pangualpha/megatron/deprecated_data_utils/configure_data.py:210
↓ 1 callersFunctionget_splits
(lines, line_counts)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:33
↓ 1 callersFunctionget_splits
(lines, line_counts)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:48
↓ 1 callersFunctionget_threshold
(all_predictions, all_labels, one_threshold=False)
models/pangualpha/tasks/ensemble_classifier.py:36
↓ 1 callersMethodget_tokens
(self, text)
models/pangualpha/tasks/zeroshot_gpt2/datasets.py:137
↓ 1 callersMethodget_type
get type token corresponding to `name`
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:275
↓ 1 callersMethodget_vocab
(self)
models/qwen2/qwen2_jt/tokenization_utils_fast.py:122
↓ 1 callersMethodget_weighted_samples
(self, np_rng)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:632
← previousnext →401–500 of 1,370, ranked by callers