MCPcopy Create free account

hub / github.com/Jittor/JittorLLMs / functions

Functions1,370 in github.com/Jittor/JittorLLMs

↓ 2 callersMethodfrom_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:139
↓ 2 callersFunctiongeneral_ict_model_provider
Build the model.
models/pangualpha/megatron/model/realm_model.py:16
↓ 2 callersFunctiongenerate
(model, context_tokens, args, tokenizer, max_num=50, begin=0)
models/pangualpha/__init__.py:57
↓ 2 callersFunctiongenerate
(model, context_tokens, args, tokenizer, max_num=50)
models/pangualpha/tools/generate_samples_Pangu.py:82
↓ 2 callersMethodgenerate
( self, prompt_tokens: List[List[int]], max_gen_len: int, temperature: float =
models/llama/llama/generation2.py:47
↓ 2 callersMethodgenerate
(self, ctx, token_count=100, args=PIPELINE_ARGS(), callback=None, state=None)
models/chatrwkv/rwkv_pip_package/src/rwkv/utils.py:64
↓ 2 callersMethodgetSamples
(self, para_config)
models/pangualpha/tasks/downstream_pangu/load_iflytek.py:65
↓ 2 callersFunctionget_adlr_autoresume
ADLR autoresume object. It can be None so no need to check if it is initialized.
models/pangualpha/megatron/global_vars.py:52
↓ 2 callersFunctionget_bias_dropout_add
(training)
models/pangualpha/megatron/model/transformer.py:573
↓ 2 callersFunctionget_data_parallel_group
Get the data parallel group the caller rank belongs to.
models/pangualpha/megatron/mpu/initialize.py:104
↓ 2 callersFunctionget_dataset
gets dataset object based on keyword args and file at `path`
models/pangualpha/megatron/deprecated_data_utils/__init__.py:49
↓ 2 callersFunctionget_dict
(dict1, res)
models/pangualpha/test/check_splited_merged_ckpt.py:3
↓ 2 callersMethodget_doc
gets text of document corresponding to idx
models/pangualpha/megatron/deprecated_data_utils/datasets.py:697
↓ 2 callersFunctionget_group_world_size_rank
()
models/pangualpha/pretrain_ict.py:37
↓ 2 callersFunctionget_ict_batch
(data_iterator)
models/pangualpha/megatron/data/realm_dataset_utils.py:38
↓ 2 callersFunctionget_model
(model_type)
models/pangualpha/mergeMpCkpt.py:117
↓ 2 callersFunctionget_model
(model_type)
models/pangualpha/tools/split_full_model_into_mp_model.py:16
↓ 2 callersFunctionget_model
(model_type)
models/pangualpha/tools/merge_mp_partitions.py:107
↓ 2 callersFunctionget_model_parallel_src_rank
Calculate the global rank corresponding to a local rank zeor in the model parallel group.
models/pangualpha/megatron/mpu/initialize.py:139
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
models/pangualpha/megatron/deprecated_data_utils/tokenization_gpt2.py:78
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
models/pangualpha/megatron/tokenizer/gpt2_tokenization.py:79
↓ 2 callersMethodget_seq_length
Returns the sequence length of the cached states. A layer index can be optionally passed.
models/qwen2/qwen2_jt/utils.py:90
↓ 2 callersFunctionget_target_sample_len
models/pangualpha/megatron/data/helpers.cpp:125
↓ 2 callersFunctionget_train_valid_test_split_
Get dataset splits from comma or '/' separated string list.
models/pangualpha/megatron/data/dataset_utils.py:476
↓ 2 callersMethodget_weighted_samples
(self, np_rng)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:505
↓ 2 callersMethodgetidx
(self, data_idx)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:558
↓ 2 callersFunctionis_start_piece
Check if the current word piece is the starting piece (BERT).
models/pangualpha/megatron/data/dataset_utils.py:130
↓ 2 callersFunctionload
( ckpt_dir: str, tokenizer_path: str, max_seq_len: int, max_batch_size: int, model_name:st
models/llama/__init__.py:18
↓ 2 callersMethodload_iflytek_train_example_for_shot
(self, data_path, num_sample=2, np_rng=None, max_len=None, input_str_format=None)
models/pangualpha/tasks/downstream_pangu/load_iflytek.py:25
↓ 2 callersFunctionlog2_ceil
models/pangualpha/megatron/fused_kernels/scaled_upper_triang_masked_softmax.h:29
↓ 2 callersFunctionmaster_params_to_model_params
Copy master parameters to model parameters. Args: model_params: List of model parameters created by :func:`prep_param_lists`.
models/pangualpha/megatron/fp16/fp16util.py:183
↓ 2 callersFunctionmerge_partitions
(merged, partitions, partition_dim, stride)
models/pangualpha/mergeMpCkpt.py:62
↓ 2 callersFunctionmerge_partitions
(merged, partitions, partition_dim, stride)
models/pangualpha/tools/merge_mp_partitions.py:52
↓ 2 callersMethodpad_seq
helper function to pad sequence pair
models/pangualpha/megatron/deprecated_data_utils/datasets.py:840
↓ 2 callersFunctionparallel_lm_logits
LM logits using word embedding weights.
models/pangualpha/megatron/model/language_model.py:28
↓ 2 callersFunctionparallel_self_attention
(model_parallel_size, num_att_heads_per_partition, hidden_size_per_att_head, dropo
models/pangualpha/megatron/mpu/tests/test_layers.py:328
↓ 2 callersFunctionparallel_transformer
(model_parallel_size, num_att_heads_per_partition, hidden_size_per_att_head, batch_si
models/pangualpha/megatron/mpu/tests/test_layers.py:413
↓ 2 callersMethodparse_command_tokens
(self)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:78
↓ 2 callersFunctionprint_progress
(prefix, start_time, urls_counter, domain_blacklist_counter, extention_b
models/pangualpha/tools/openwebtext/blacklist_urls.py:233
↓ 2 callersFunctionprint_progress
(prefix, start_time, num_docs, num_fixed_text, num_non_english_docs, chars_non_english_docs
models/pangualpha/tools/openwebtext/cleanup_dataset.py:30
↓ 2 callersFunctionprocess_batch
Process batch and produce inputs for the model.
models/pangualpha/tasks/finetune_utils.py:34
↓ 2 callersMethodprocess_response
(self, response)
models/chatglm/modeling_chatglm.py:1199
↓ 2 callersMethodread_data
(self, path)
models/pangualpha/megatron/data/indexed_dataset.py:155
↓ 2 callersFunctionrecord_time
(name)
models/chatrwkv/v2/benchmark.py:73
↓ 2 callersFunctionreduce_from_model_parallel_region
(input_)
models/pangualpha/megatron/mpu/mappings.py:148
↓ 2 callersFunctionrepeat_kv
(hidden_states: jt.Var, n_rep: int)
models/qwen2/qwen2_jt/modeling_qwen2.py:9
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
models/atom7b/modeling_llama.py:234
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
models/qwen2/qwen2_jt/modeling_qwen2.py:137
↓ 2 callersFunctionrotate_half
(x)
models/chatglm/modeling_chatglm.py:228
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
models/atom7b/modeling_llama.py:182
↓ 2 callersMethodrun
(self, input_text: str)
models/__init__.py:27
↓ 2 callersMethodrun
(self, text, tokenizer=None, history=[])
models/pangualpha/__init__.py:156
↓ 2 callersMethodrun
(self, message: str, is_web=False)
models/chatrwkv/__init__.py:179
↓ 2 callersMethodsentence_split
split document into sentences
models/pangualpha/megatron/deprecated_data_utils/datasets.py:679
↓ 2 callersMethodsentence_tokenize
tokenize sentence and get token types
models/pangualpha/megatron/deprecated_data_utils/datasets.py:690
↓ 2 callersMethodset_doc_idx
(self, doc_idx_)
models/pangualpha/megatron/data/indexed_dataset.py:525
↓ 2 callersFunctionsetup_model_and_optimizer
Setup model and optimizer.
models/pangualpha/megatron/training.py:207
↓ 2 callersFunctionshingles
(text, char_ngram=5)
models/pangualpha/tools/openwebtext/find_duplicates.py:26
↓ 2 callersFunctionsplit_into_partitions
(tensor, num_partitions, partition_dim, stride, rank)
models/pangualpha/tools/split_full_model_into_mp_model.py:88
↓ 2 callersFunctionsplit_s3_path
Split a full s3 path into the bucket name and path.
models/pangualpha/megatron/deprecated_data_utils/file_utils.py:117
↓ 2 callersMethodstate
(self)
models/pangualpha/megatron/data/realm_index.py:35
↓ 2 callersMethodstate_dict_for_save_checkpoint
Save dict with state dicts of each of the models.
models/pangualpha/megatron/model/realm_model.py:90
↓ 2 callersMethodstep
Set lr for all parameters groups.
models/pangualpha/megatron/learning_rates.py:73
↓ 2 callersFunctionsupported_corpus
checks if corpus name is defined in `corpora.py`
models/pangualpha/megatron/deprecated_data_utils/__init__.py:63
↓ 2 callersMethodtokenize
(self, text)
models/pangualpha/megatron/deprecated_data_utils/wordpiece.py:107
↓ 2 callersFunctiontrain_step
Single training step.
models/pangualpha/megatron/training.py:272
↓ 2 callersFunctiontraining_log
Log training information such as losses, timing, ....
models/pangualpha/megatron/training.py:303
↓ 2 callersMethodupdate_master_grads
Copy the ``.grad`` attribute from stored references to fp16 parameters to the ``.grad`` attribute of the fp32 master parameters that
models/pangualpha/megatron/fp16/fp16.py:577
↓ 2 callersMethodvocab_size
Returns vocab size
models/chatglm/tokenization_chatglm.py:230
↓ 2 callersFunctionwrite_file
(lines, path)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_json.py:83
↓ 2 callersFunctionwrite_file
(lines, path)
models/pangualpha/megatron/deprecated_data_utils/scripts/split_gpt2_json.py:98
↓ 2 callersMethodzero_grad
Zero fp32 and fp16 parameter grads.
models/pangualpha/megatron/fp16/fp16.py:268
↓ 1 callersFunctionBN_convert_float
Utility function for network_to_half(). Retained for legacy purposes.
models/pangualpha/megatron/fp16/fp16util.py:42
↓ 1 callersMethodDecodeIds
convert Ids to tokens accounting for command and type tokens, tokens are joined and returned as a string.
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:356
↓ 1 callersMethodDecodeTokens
convert tokens to a string accounting for command and type tokens.
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:383
↓ 1 callersMethodEncodeAsIds
Preprocess text and encode as ids. Return a tokenization object with original text, processed text, and id tokenization.
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:445
↓ 1 callersMethodEncodeAsTokens
encode text as tokens using text tokenizer
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:328
↓ 1 callersMethodIdToToken
convert Id to token accounting for command and type tokens
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:336
↓ 1 callersMethodIdToToken
convert Id to sentencpiece token
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:692
↓ 1 callersFunctionRUN_CUDA
(T, C, w, u, k, v, aa, bb, pp)
models/chatrwkv/rwkv_pip_package/src/rwkv/model.py:40
↓ 1 callersMethodSetTokenizer
(self, tokenizer)
models/pangualpha/megatron/deprecated_data_utils/datasets.py:360
↓ 1 callersMethodTokenToId
ascii character to index
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:527
↓ 1 callersMethodTokenToId
(self, token, type_token=False)
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:902
↓ 1 callersMethodTrain
train a tokenizer on a data corpus and save model for future use
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:441
↓ 1 callersMethodTrain
train sentencepiece model on corpus using word frequencies
models/pangualpha/megatron/deprecated_data_utils/tokenization.py:649
↓ 1 callersFunctionWARP_SHFL_XOR_NATIVE
models/pangualpha/megatron/fused_kernels/scaled_upper_triang_masked_softmax.h:50
↓ 1 callersFunction__best_fitting_dtype
(vocab_size=None)
models/pangualpha/megatron/data/indexed_dataset.py:24
↓ 1 callersMethod__getstate__
(self)
models/pangualpha/megatron/fp16/fp16.py:262
↓ 1 callersMethod__init__
(self, ict_head_size, num_tokentypes=1, parallel_output=Tru
models/pangualpha/megatron/model/realm_model.py:40
↓ 1 callersMethod__init__
(self, num_tokentypes=2, add_binary_head=True, parallel_output=True)
models/pangualpha/megatron/model/bert_model.py:115
↓ 1 callersMethod__init__
(self, data_source, replacement=False, num_samples=None)
models/pangualpha/megatron/data/samplers.py:35
↓ 1 callersMethod__init__
(self, data_source, replacement=False, num_samples=None)
models/pangualpha/megatron/deprecated_data_utils/samplers.py:37
↓ 1 callersMethod__init__
(self, **kwargs)
models/pangualpha/megatron/deprecated_data_utils/corpora.py:48
↓ 1 callersMethod__init__
(self, path, tokenizer=None, preprocess_fn=None, delim=',', binarize_sent=False, drop_unlabel
models/pangualpha/megatron/deprecated_data_utils/datasets.py:225
↓ 1 callersMethod__init__
(self)
models/pangualpha/megatron/fp16/fp16util.py:35
↓ 1 callersMethod__init__
(self, m, n)
models/pangualpha/megatron/mpu/tests/test_layers.py:177
↓ 1 callersMethod__init__
(self, args)
models/llama/__init__.py:54
↓ 1 callersMethod__init__
(self, code: bytes, function_names: List[str])
models/chatglm/quantization.py:19
↓ 1 callersMethod__init__
( self, vocab_file, max_blank_length=80, byte_fallback=True, )
models/chatglm/tokenization_chatglm.py:24
↓ 1 callersMethod__init__
(self, var)
models/atom7b/__init__.py:22
← previousnext →201–300 of 1,370, ranked by callers