MCPcopy Create free account

hub / github.com/Fr0zenCrane/Cockatiel / functions

Functions1,946 in github.com/Fr0zenCrane/Cockatiel

↓ 5 callersFunctionget_question_text
(problem)
scripts/convert_sqa_to_llava_base_prompt.py:18
↓ 5 callersFunctionget_solution_text
(problem)
scripts/convert_sqa_to_llava_base_prompt.py:52
↓ 5 callersFunctionget_ulysses_sp_size
Get the size of the Ulysses sequence parallel group.
llava/train/sequence_parallel/globals.py:216
↓ 5 callersFunctionis_gemma_tokenizer
(tokenizer)
llava/mm_utils.py:363
↓ 5 callersFunctionis_xpu_available
()
llava/trl/import_utils.py:83
↓ 5 callersFunctionlru_json_load
(fpath)
llava/data/dataset_impl/coyo_recap.py:61
↓ 5 callersFunctionpreprocess_multimodal
(sources: Sequence[str], data_args: DataArguments)
llava/data/dataset.py:65
↓ 5 callersMethodquantize
(self, param, groups=None)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:765
↓ 5 callersFunctionrprint
(*args, **kwargs)
llava/train/utils.py:33
↓ 5 callersFunctionset_all
Set a key to a value in a list of dictionaries.
llava/wids/wids_specs.py:73
↓ 5 callersFunctiontrain
()
llava/train/train.py:389
↓ 5 callersFunctionvcmd
(flag, verbose_flag="")
llava/wids/wids_dl.py:65
↓ 4 callersMethod_ensure_availability_of_partitioned_params
(self, params)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1497
↓ 4 callersMethod_upad_input
(self, query_layer, key_layer, value_layer, attention_mask, query_length, seqlens_in_batch)
llava/train/transformers_replace/models/llama/modeling_llama.py:570
↓ 4 callersFunctioncall_og_forward
()
llava/model/language_model/mpt/hf_prefixlm_converter.py:115
↓ 4 callersMethodcan_generate
Returns whether this model can generate sequences with `.generate()`. Returns: `bool`: Whether this model can generate s
llava/train/transformers_replace/modeling_utils.py:1356
↓ 4 callersFunctionflatten_dict
Flatten dictionary and concatenate nested keys with separator.
llava/trl/core.py:74
↓ 4 callersFunctionflatten_varlen_lse
(lse, cu_seqlens)
llava/train/sequence_parallel/ring/utils.py:67
↓ 4 callersFunctionformat_with_suffix
(num)
llava/wids/wids_index.py:14
↓ 4 callersFunctionget_all_subclasses
(cls)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:276
↓ 4 callersMethodget_dp_process_group
Return the communication group with all data-parallel ranks
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:2148
↓ 4 callersMethodget_input_embeddings
(self)
llava/model/llava_arch.py:251
↓ 4 callersFunctionget_length_grouped_indices
(lengths, batch_size, world_size, generator=None, merge=True)
llava/train/llava_trainer.py:119
↓ 4 callersMethodget_output_embeddings
Returns the model's output embeddings. Returns: `nn.Module`: A torch module mapping hidden states to vocabulary.
llava/train/transformers_replace/modeling_utils.py:1527
↓ 4 callersFunctionget_parameter_dtype
Returns the first found floating dtype in parameters if there is one, otherwise returns the last dtype it found.
llava/train/transformers_replace/modeling_utils.py:235
↓ 4 callersFunctionget_ring_sp_pg
Get the RingAttn sequence parallel process group.
llava/train/sequence_parallel/globals.py:251
↓ 4 callersFunctionis_bitsandbytes_available
()
llava/trl/import_utils.py:64
↓ 4 callersFunctionis_fsdp_enabled
()
llava/train/transformers_replace/modeling_utils.py:127
↓ 4 callersFunctionis_npu_available
Checks if `torch_npu` is installed and potentially if a NPU is in the environment
llava/trl/import_utils.py:99
↓ 4 callersFunctionis_rich_available
()
llava/trl/import_utils.py:75
↓ 4 callersFunctionload_remote_dsdesc_raw
Load a remote or local dataset description in JSON format.
llava/wids/wids_specs.py:82
↓ 4 callersFunctionload_state_dict
Reads a PyTorch checkpoint file, returning properly formatted errors if they arise.
llava/train/transformers_replace/modeling_utils.py:491
↓ 4 callersFunctionload_text_embeddings
(str, tokenizer, model, accelerator, replace_double_newline=False)
llava/eval/vision_niah_vila/eval_vision_niah.py:160
↓ 4 callersFunctionpad_to_length
(tensor: torch.Tensor, length: int, pad_value: Union[int, float], dim: int = -1)
llava/trl/trainer/utils.py:552
↓ 4 callersMethodpartition
(param_list=None, hierarchy=0, has_been_updated=False)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1395
↓ 4 callersFunctionprint_rank0
(rank, *args, **kwargs)
llava/eval/model_refcoco.py:30
↓ 4 callersFunctionread_jsonl
(path: str, key: str = None)
llava/eval/generate_webpage_data_from_table.py:12
↓ 4 callersMethodrepack_multimodal_data
( self, input_ids, position_ids, attention_mask, past_key_values,
llava/model/llava_arch.py:523
↓ 4 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
llava/train/transformers_replace/models/gemma/modeling_gemma.py:179
↓ 4 callersMethodresize_token_embeddings
(self, embed_size)
llava/model/llava_arch.py:257
↓ 4 callersFunctionsave_json
(obj, fpath)
llava/data/simple_vila_webdataset.py:49
↓ 4 callersFunctionsave_json
(obj, fpath)
llava/data/vila_webdataset.py:31
↓ 4 callersMethodsave_pretrained
Save a model and its configuration file to a directory, so that it can be re-loaded using the [`~PreTrainedModel.from_pretrained`] cl
llava/train/transformers_replace/modeling_utils.py:2112
↓ 4 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, and `torch`. Args: seed (`int`): The seed to set.
llava/trl/core.py:244
↓ 4 callersFunctiontext2Markdown
(text)
llava/eval/webpage/script.js:35
↓ 4 callersFunctiontokenize_conversation
( messages: Sequence[Dict[str, str]], tokenizer: transformers.PreTrainedTokenizer, add_generation_
llava/utils/tokenizer.py:74
↓ 4 callersMethodtrain
(self, *args, **kwargs)
llava/trl/trainer/sft_trainer.py:320
↓ 4 callersMethodwrite
(self, buf)
llava/utils.py:91
↓ 3 callersMethod__init__
(self)
llava/model/multimodal_projector/base_projector.py:25
↓ 3 callersMethod__init__
A context manager to partition the model parameters during the model construction with MiCS partition strategy. Model states are partitioned
llava/train/deepspeed_replace/runtime/zero/mics.py:59
↓ 3 callersMethod__iter__
(self)
llava/train/llava_trainer.py:423
↓ 3 callersMethod_aligned_size
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1480
↓ 3 callersMethod_autoset_attn_implementation
Automatically checks and dispatches to a default attention implementation. In order of priority: 1. An implementation specified i
llava/train/transformers_replace/modeling_utils.py:1260
↓ 3 callersMethod_get_current_device
r""" Get the current device. For GPU, we return the local process index using the `accelerate.PartialState` object to handle corner ca
llava/trl/models/modeling_base.py:389
↓ 3 callersFunction_get_data_parallel_group
Get the data parallel group the caller rank belongs to.
llava/train/deepspeed_replace_deprecated/utils/groups.py:408
↓ 3 callersFunction_get_expert_data_parallel_group
Get the expert data parallel group the caller rank belongs to.
llava/train/deepspeed_replace_deprecated/utils/groups.py:352
↓ 3 callersFunction_get_expert_parallel_group
Get the expert parallel group the caller rank belongs to.
llava/train/deepspeed_replace_deprecated/utils/groups.py:341
↓ 3 callersFunction_get_zero_param_intra_parallel_group
Get the ZeRO parameter partitioning intra parallel group the caller rank belongs to.
llava/train/deepspeed_replace_deprecated/utils/groups.py:558
↓ 3 callersMethod_init_rope
(self)
llava/train/transformers_replace/models/llama/modeling_llama.py:263
↓ 3 callersMethod_init_weights
Initialize the weights. This method should be overridden by derived class and is the only initialization method that will be called w
llava/train/transformers_replace/modeling_utils.py:1536
↓ 3 callersFunction_left_broadcast
As opposed to the default direction of broadcasting (right to left), this function broadcasts from left to right Args: in
llava/trl/models/modeling_sd_base.py:155
↓ 3 callersMethod_process_image
(image_file, data_args, image_folder, resize=False)
llava/data/dataset.py:515
↓ 3 callersMethod_split_kwargs
Separate the kwargs from the arguments that we support inside `supported_args` and the ones that we don't.
llava/trl/models/modeling_base.py:407
↓ 3 callersMethodappend_segment
Append a new segment to the history. args: text (`str`): The text of the new segment. tokens (`torch.LongTen
llava/trl/environment/base_environment.py:87
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/model/language_model/modeling_mixtral_long_context.py:247
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/train/transformers_replace/models/mixtral/modeling_mixtral.py:284
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/train/transformers_replace/models/mistral/modeling_mistral.py:146
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/train/transformers_replace/models/gemma/modeling_gemma.py:135
↓ 3 callersFunctionbackward
(dout, q, k, v, out, softmax_lse, causal)
llava/train/sequence_parallel/ring/zigzag_ring_flash_attn.py:130
↓ 3 callersFunctionbackward
(dout, q, k, v, out, softmax_lse, causal)
llava/train/sequence_parallel/ring/zigzag_ring_flash_attn_varlen.py:203
↓ 3 callersMethodbackward
(ctx: Any, grad_output: Tensor)
llava/train/sequence_parallel/all_to_all.py:283
↓ 3 callersMethodbatched_forward_pass
Calculate model outputs in multiple batches. Args: queries (`torch.LongTensor`): List of tensors contain
llava/trl/trainer/ppo_trainer.py:941
↓ 3 callersFunctionbbx_from_vertices_list
(vertices)
llava/data/dataset_impl/hiertext.py:61
↓ 3 callersFunctionconstruct_prompt
(sample, config)
llava/eval/mmmu_utils/data_utils.py:173
↓ 3 callersMethoddevice
(self)
llava/model/multimodal_encoder/vision_encoder.py:159
↓ 3 callersFunctiondisplayQuestion
(index)
llava/eval/webpage/script.js:110
↓ 3 callersMethodenable_input_require_grads
Enables the gradients for the input embeddings. This is useful for fine-tuning adapter weights while keeping the model weights fixed.
llava/train/transformers_replace/modeling_utils.py:1484
↓ 3 callersMethodencode_images
(self, images)
llava/model/llava_arch.py:241
↓ 3 callersFunctioneval_single
(result_file, eval_only_type=None)
scripts/convert_seed_for_submission.py:29
↓ 3 callersFunctionexpand2square
Expand the given PIL image to a square shape by adding padding. Parameters: - pil_img: The PIL image to be expanded. - background_co
llava/mm_utils.py:248
↓ 3 callersFunctionextract_local
(value, rank, world_size, device, dim=1)
llava/eval/vision_niah_vila/zigzag_ring_attn/prepare_inputs.py:21
↓ 3 callersFunctionextract_local_from_list
(value_list, sp_rank, sp_size)
llava/train/sequence_parallel/input_utils.py:26
↓ 3 callersFunctionextract_local_input_ids
(input_ids, image_positions, sp_rank, sp_size, bos_token_id=1, image_token_len=3)
llava/train/sequence_parallel/input_utils.py:47
↓ 3 callersFunctionf
Given a URL, return a local name for the shard.
llava/wids/wids.py:320
↓ 3 callersMethodfeature_select
(self, image_forward_outs)
llava/model/multimodal_encoder/vision_encoder.py:42
↓ 3 callersFunctionforward
(q, k, v, causal)
llava/train/sequence_parallel/ring/zigzag_ring_flash_attn.py:48
↓ 3 callersFunctionforward
(q, k, v, causal)
llava/train/sequence_parallel/ring/zigzag_ring_flash_attn_varlen.py:94
↓ 3 callersMethodget_hidden_size
(self)
llava/model/multimodal_encoder/radio_encoder.py:106
↓ 3 callersMethodget_hidden_size
(self)
llava/model/multimodal_encoder/radio_torchhub_encoder.py:132
↓ 3 callersMethodget_output_embeddings
(self)
llava/model/llava_arch.py:254
↓ 3 callersFunctionget_pca_map
feature_map: (1, h, w, C) is the feature map of a single image.
llava/model/multimodal_encoder/visualize_features.py:226
↓ 3 callersFunctionget_pred_idx
Get the index (e.g. 2) from the prediction (e.g. 'C')
llava/eval/eval_science_qa_gpt4_requery.py:32
↓ 3 callersFunctionis_diffusers_available
()
llava/trl/import_utils.py:60
↓ 3 callersFunctionis_wandb_available
()
llava/trl/import_utils.py:79
↓ 3 callersFunctionlogprobs_from_logits
See: https://github.com/pytorch/pytorch/issues/563#issuecomment-330103591
llava/trl/core.py:130
↓ 3 callersFunctionmasked_var
Compute variance of tensor with masked values.
llava/trl/core.py:159
↓ 3 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
llava/train/train.py:63
↓ 3 callersFunctionnormalize_str
Normalize the str to lower case and make them float numbers if possible.
llava/eval/mmmu_utils/eval_utils.py:81
↓ 3 callersMethodnull_ref_context
Context manager for handling null reference model (that is, peft adapter manipulation).
llava/trl/trainer/dpo_trainer.py:741
↓ 3 callersFunctionparse_choice
Parse the prediction from the generated response. Return the predicted index e.g., A, B, C, D.
llava/eval/mmmu_utils/eval_utils.py:13
← previousnext →101–200 of 1,946, ranked by callers