MCPcopy Create free account

hub / github.com/CStanKonrad/long_llama / functions

Functions296 in github.com/CStanKonrad/long_llama

↓ 31 callersMethodupdate
(self, data: Dict[str, Any])
instruction_fine_tuning/data_processing.py:600
↓ 12 callersFunctionwith_sharding_constraint
A smarter version of with_sharding_constraint that only applies the constraint if the current mesh contains the axes in the partition specs.
fot_continued_pretraining/EasyLM/jax_utils.py:198
↓ 7 callersMethod__init__
( self, hidden_size: int, intermediate_size: int, hidden_act: str, )
src/modeling_longllama.py:186
↓ 6 callersMethodget_default_config
(cls, updates=None)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:288
↓ 6 callersFunctionget_padding_token
(tokenizer: PreTrainedTokenizer)
instruction_fine_tuning/data_processing.py:25
↓ 6 callersFunctiontokenize_text_no_special_tokens
(text: str, tokenizer: PreTrainedTokenizer)
instruction_fine_tuning/data_processing.py:84
↓ 5 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/data.py:238
↓ 5 callersMethodload_trainstate_checkpoint
(cls, load_from, trainstate_target=None, trainstate_shard_fns=None,
fot_continued_pretraining/EasyLM/checkpoint.py:152
↓ 5 callersFunctionmetrics_assign_group
(metrics_dict: Dict[str, Any], group: str, index: int = 0)
instruction_fine_tuning/utils.py:4
↓ 5 callersMethodsave_train_state_to_file
(train_state, path, gather_fns=None, float_dtype=None)
fot_continued_pretraining/EasyLM/checkpoint.py:48
↓ 4 callersMethodadd
(self, new_logs)
fot_continued_pretraining/EasyLM/logging_utils.py:42
↓ 4 callersFunctionget_gradient_checkpoint_policy
(name)
fot_continued_pretraining/EasyLM/jax_utils.py:322
↓ 4 callersFunctionget_gradient_step
(train_state: TrainState)
fot_continued_pretraining/EasyLM/training_utils.py:3
↓ 4 callersFunctionmetrics_assign_group
(metrics_dict, group, index=0)
fot_continued_pretraining/EasyLM/logging_utils.py:14
↓ 4 callersFunctionnext_rng
(*args, **kwargs)
fot_continued_pretraining/EasyLM/jax_utils.py:224
↓ 4 callersFunctionrecursive_count
( processor: Callable[[str], int], v: Union[Dict[str, Any], str], field_nesting: List[str]
instruction_fine_tuning/data_processing.py:471
↓ 4 callersFunctionsave_checkpoint
(train_state, milestone=False)
fot_continued_pretraining/EasyLM/models/llama/llama_train.py:237
↓ 4 callersMethodsave_pickle
(self, obj, filename)
fot_continued_pretraining/EasyLM/checkpoint.py:62
↓ 3 callersMethod__init__
(self, text_source: Iterable[Dict[str, str]], text_processor)
fot_continued_pretraining/FoT/data_pipeline.py:239
↓ 3 callersMethod_split_heads
(self, hidden_states)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:512
↓ 3 callersFunctiondefragment
()
fot_continued_pretraining/EasyLM/models/llama/llama_train.py:302
↓ 3 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/optimizers.py:27
↓ 3 callersFunctionget_float_dtype_by_name
(dtype)
fot_continued_pretraining/EasyLM/jax_utils.py:292
↓ 3 callersMethodload_checkpoint
(path, target=None, shard_fns=None, remove_dict_prefix=None)
fot_continued_pretraining/EasyLM/checkpoint.py:96
↓ 3 callersMethodrng_keys
()
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:331
↓ 3 callersFunctionrotate_one
(x, cos, sin, position_ids)
src/modeling_longllama.py:165
↓ 3 callersFunctionupdate_one
(prev, new)
src/longllama_utils.py:49
↓ 3 callersFunctionwrite_json
(text, path)
fot_continued_pretraining/EasyLM/models/llama/convert_easylm_to_hf.py:121
↓ 2 callersMethod__init__
( self, vocab_size=32000, hidden_size=4096, intermediate_size=11008, n
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:213
↓ 2 callersFunction_handle_long_input
( model, input_ids, attention_mask, position_ids, past_key_values, inputs_embeds,
src/modeling_longllama.py:1009
↓ 2 callersMethod_has_generation_cache
(self, past_key_values)
src/modeling_longllama.py:1188
↓ 2 callersFunction_prepare_pos_ids
(past_key_values, batch_size, input_length, device)
src/modeling_longllama.py:684
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
src/modeling_longllama.py:136
↓ 2 callersFunctionblockwise_attn
( query, key, value, bias=None, deterministic=True, dropout_rng=None,
fot_continued_pretraining/EasyLM/bpt.py:48
↓ 2 callersFunctioncross_entropy_loss_and_accuracy
(logits, tokens, valid=None)
fot_continued_pretraining/EasyLM/jax_utils.py:253
↓ 2 callersFunctiondoc_aware_pileline_params
Extracts the k from the pipeline_str.
fot_continued_pretraining/FoT/data_pipeline.py:302
↓ 2 callersFunctionfloat_tensor_to_dtype
(tensor, dtype)
fot_continued_pretraining/EasyLM/jax_utils.py:305
↓ 2 callersFunctionfloat_to_dtype
(tree, dtype)
fot_continued_pretraining/EasyLM/jax_utils.py:316
↓ 2 callersMethodget_logs
(self)
fot_continued_pretraining/EasyLM/logging_utils.py:51
↓ 2 callersMethodget_partition_rules
Parition rules for GPTJ. Note that these rules are orderd, so that the beginning rules match first. It is important to use Pa
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:301
↓ 2 callersMethodget_tokenizer_config
(updates=None)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:335
↓ 2 callersFunctionglobal_norm
Return the global L2 norm of a pytree.
fot_continued_pretraining/EasyLM/jax_utils.py:278
↓ 2 callersFunctionhandle_data_padding
For padding the data equally. Applies padding only if tokenization_args.always_pad is true. Supports two modes of padding: * defaul
instruction_fine_tuning/data_processing.py:32
↓ 2 callersFunctioninit_fn
(rng, model, llama_config)
fot_continued_pretraining/EasyLM/models/llama/llama_train.py:132
↓ 2 callersMethodinitialize
(cls, config)
fot_continued_pretraining/EasyLM/jax_utils.py:67
↓ 2 callersFunctioninverse_permute
(params, w)
fot_continued_pretraining/EasyLM/models/llama/convert_hf_to_easylm.py:65
↓ 2 callersMethodjson_iterator
(self)
fot_continued_pretraining/EasyLM/data.py:281
↓ 2 callersMethodload_dataset
(cls, config, tokenizer, **kwargs)
fot_continued_pretraining/EasyLM/data.py:36
↓ 2 callersFunctionmake_to_dtype_fn
(dtype_spec)
fot_continued_pretraining/EasyLM/jax_utils.py:98
↓ 2 callersFunctionmatch_partition_rules
Returns a pytree of PartitionSpec according to rules. Supports handling Flax TrainState and Optax optimizer state.
fot_continued_pretraining/EasyLM/jax_utils.py:368
↓ 2 callersFunctionmem_apply_update
( prev_mem_cache: LongLlamaMemCache, new_mem_content: LongLlamaMemCache, mem_config: LongLlamaMemConfig )
src/longllama_utils.py:46
↓ 2 callersFunctionnamed_tree_map
An extended version of jax.tree_util.tree_map, where the mapped function f takes both the name (path) and the tree leaf as input.
fot_continued_pretraining/EasyLM/jax_utils.py:357
↓ 2 callersFunctionoptax_add_scheduled_weight_decay
Apply weight decay with schedule.
fot_continued_pretraining/EasyLM/optimizers.py:196
↓ 2 callersFunctionpermute
(w)
fot_continued_pretraining/EasyLM/models/llama/convert_easylm_to_hf.py:141
↓ 2 callersFunctionrotate_as_if_first
(x, rotary_emb)
src/modeling_longllama.py:177
↓ 2 callersMethodsave_checkpoint
(self, train_state, filename, gather_fns=None)
fot_continued_pretraining/EasyLM/checkpoint.py:38
↓ 2 callersMethodtext_processor
(self)
fot_continued_pretraining/EasyLM/data.py:382
↓ 2 callersFunctiontree_path_to_string
(path, sep=None)
fot_continued_pretraining/EasyLM/jax_utils.py:331
↓ 1 callersMethod__init__
(self, tokenizer: PreTrainedTokenizer)
instruction_fine_tuning/data_processing.py:717
↓ 1 callersMethod_concatenate_to_cache
This function takes projected key, value states from a single input token and concatenates the states to cached states from previous
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:519
↓ 1 callersFunction_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
src/modeling_longllama.py:88
↓ 1 callersFunction_handle_output_of_past_key_values
(outputs)
src/modeling_longllama.py:936
↓ 1 callersMethod_init_rope
(self)
src/modeling_longllama.py:228
↓ 1 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
src/modeling_longllama.py:70
↓ 1 callersMethod_merge_heads
(self, hidden_states)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:515
↓ 1 callersMethod_norm
(self, x: jnp.ndarray)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:392
↓ 1 callersMethod_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
src/modeling_longllama.py:758
↓ 1 callersMethod_rope_scaling_validation
Validate the `rope_scaling` configuration.
src/configuration_longllama.py:158
↓ 1 callersFunction_split_past_key_values
(past_key_values)
src/modeling_longllama.py:975
↓ 1 callersMethodadd_list
(self, new_logs)
fot_continued_pretraining/EasyLM/logging_utils.py:45
↓ 1 callersFunctionadd_time_to_workdir
()
fot_continued_pretraining/running_utils/runner_utils.py:45
↓ 1 callersFunctionapply_rotary_emb
( xq: jnp.ndarray, xk: jnp.ndarray, freqs_cis: jnp.ndarray, dtype: jnp.dtype=jnp.float32, )
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:409
↓ 1 callersMethodbatched
(self, iterator, batch_size)
fot_continued_pretraining/EasyLM/data.py:298
↓ 1 callersFunctionblockwise_ffn
(remat_ffn, inputs, chunk_size=2048, deterministic=True)
fot_continued_pretraining/EasyLM/bpt.py:20
↓ 1 callersFunctionceil_divide
(a, b)
fot_continued_pretraining/FoT/cross_batch.py:13
↓ 1 callersFunctionconfig_from_json
()
fot_continued_pretraining/running_utils/runner.py:11
↓ 1 callersFunctioncreate_workdir
()
fot_continued_pretraining/running_utils/runner_utils.py:41
↓ 1 callersFunctioncross_batch_attention
Basic implementation of cross-batch. If dataset_packing > 0, it assumes that the documents occupy batch entries as follows batch[0] =
fot_continued_pretraining/FoT/cross_batch.py:20
↓ 1 callersFunctionfilter_dataset
For filtering the dataset according to the rules described in data_args. data_args should be separated using separate_data_args.
instruction_fine_tuning/data_processing.py:409
↓ 1 callersMethodfrom_seed
(cls, seed)
fot_continued_pretraining/EasyLM/jax_utils.py:30
↓ 1 callersFunctiongenerate_prompt_landmark
Generates a text file and inserts an execute line at a random position.
examples/utils/landmark_prompt.py:21
↓ 1 callersFunctionget_data_processor
(data_args: DataArgs)
instruction_fine_tuning/data_processing.py:273
↓ 1 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/checkpoint.py:24
↓ 1 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/data.py:56
↓ 1 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/data.py:141
↓ 1 callersMethodget_default_config
(updates=None)
fot_continued_pretraining/EasyLM/jax_utils.py:54
↓ 1 callersFunctionget_jax_mesh
(axis_dims, names)
fot_continued_pretraining/EasyLM/jax_utils.py:147
↓ 1 callersMethodget_jax_mesh
(axis_dims)
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:297
↓ 1 callersMethodget_metrics
(self)
fot_continued_pretraining/FoT/data_pipeline.py:269
↓ 1 callersFunctionget_microbatch
(full_batch, train_substep)
fot_continued_pretraining/EasyLM/models/llama/llama_train.py:279
↓ 1 callersFunctionget_names_from_parition_spec
Return axis names from partition specs.
fot_continued_pretraining/EasyLM/jax_utils.py:182
↓ 1 callersMethodget_optimizer
(cls, config, weight_decay_mask=None)
fot_continued_pretraining/EasyLM/optimizers.py:39
↓ 1 callersFunctionget_packages
For getting the list of installed packages
instruction_fine_tuning/utils.py:25
↓ 1 callersMethodget_state_dict
(self)
fot_continued_pretraining/EasyLM/data.py:356
↓ 1 callersMethodget_tokenizer
(cls, config, padding_side='left', truncation_side='right')
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:346
↓ 1 callersMethodget_weight_decay_exclusions
()
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:327
↓ 1 callersFunctionget_weight_decay_mask
Return a weight decay mask function that computes the pytree masks according to the given exclusion rules.
fot_continued_pretraining/EasyLM/jax_utils.py:383
↓ 1 callersFunctionhandle_replacements
(text: str)
instruction_fine_tuning/data_processing.py:217
↓ 1 callersMethodinit_cache
r""" Args: batch_size (`int`): batch_size used for fast auto-regressive decoding. Defines the batch size of the in
fot_continued_pretraining/EasyLM/models/llama/llama_model.py:884
↓ 1 callersFunctioninit_rng
(seed)
fot_continued_pretraining/EasyLM/jax_utils.py:219
next →1–100 of 296, ranked by callers