MCPcopy Create free account

hub / github.com/LLaVA-Annonymous/LLaVA / functions

Functions275 in github.com/LLaVA-Annonymous/LLaVA

↓ 1 callersFunctiongenerate_stream
Adapted from fastchat/serve/model_worker.py::generate_stream
llava/serve/cli.py:15
↓ 1 callersMethodgenerate_stream
(self, params)
llava/serve/model_worker.py:183
↓ 1 callersMethodgenerate_stream_gate
(self, params)
llava/serve/model_worker.py:304
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa_gpt4.py:9
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa.py:8
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa_gpt4_requery.py:9
↓ 1 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_vqa_science.py:25
↓ 1 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_vqa.py:25
↓ 1 callersFunctionhtml_to_markdown
(val: str)
llava/data/clean_sharegpt.py:41
↓ 1 callersFunctioninit_on_device
Device initialization context manager. A context manager under which models are initialized with all parameters on the specified device.
llava/model/mpt/meta_init_context.py:37
↓ 1 callersMethodinitialize_vision_modules
(self, vision_tower, mm_vision_select_layer, pretrain_mm_mlp_adapter=None, t
llava/model/llava.py:54
↓ 1 callersMethodinitialize_vision_tokenizer
(self, mm_use_im_start_end, tokenizer, device, tune_mm_mlp_adapter=False,
llava/model/llava.py:285
↓ 1 callersMethodlist_models
(self)
llava/serve/controller.py:112
↓ 1 callersFunctionload_image
(image_file)
llava/eval/run_llava.py:25
↓ 1 callersFunctionload_model
(model_path, model_name, num_gpus)
llava/serve/model_worker.py:49
↓ 1 callersFunctionmain
(args)
llava/serve/cli.py:75
↓ 1 callersFunctionmain
()
llava/serve/test_message.py:9
↓ 1 callersFunctionmain
(args)
llava/data/alpaca-converter.py:20
↓ 1 callersFunctionmain
(args)
llava/data/clean_sharegpt.py:181
↓ 1 callersFunctionmain
(args)
llava/data/split_long_conversation.py:75
↓ 1 callersFunctionmake_delta
(base_model_path, target_model_path, delta_path, hub_repo_id)
llava/model/make_delta.py:13
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
llava/train/train.py:517
↓ 1 callersFunctionparse_args
()
scripts/extract_mm_projector.py:8
↓ 1 callersFunctionparse_score
(review)
llava/eval/eval_gpt_review.py:37
↓ 1 callersFunctionparse_score
(review)
llava/eval/eval_gpt_review_visual.py:37
↓ 1 callersFunctionpatch_FSDP_use_orig_params
(func)
llava/train/train.py:645
↓ 1 callersFunctionpatch_config
(config)
llava/eval/model_vqa_science.py:76
↓ 1 callersFunctionpatch_config
(config)
llava/eval/model_vqa.py:36
↓ 1 callersFunctionpatch_tensor_constructor
(fn)
llava/model/mpt/meta_init_context.py:76
↓ 1 callersFunctionpost_process_code
(code)
llava/serve/gradio_web_server.py:166
↓ 1 callersFunctionpreprocess_mpt
( sources, tokenizer: transformers.PreTrainedTokenizer, )
llava/train/train.py:282
↓ 1 callersFunctionpreprocess_multimodal
( sources: Sequence[str], multimodal_cfg: dict, cur_token_len: int, )
llava/train/train.py:187
↓ 1 callersFunctionpreprocess_v1
( sources, tokenizer: transformers.PreTrainedTokenizer, )
llava/train/train.py:212
↓ 1 callersFunctionpretty_print_semaphore
(semaphore)
llava/utils.py:123
↓ 1 callersMethodreceive_heart_beat
(self, worker_name: str, queue_length: int)
llava/serve/controller.py:173
↓ 1 callersFunctionreformat_code
(val: str)
llava/data/clean_sharegpt.py:31
↓ 1 callersMethodrefresh_all_workers
(self)
llava/serve/controller.py:104
↓ 1 callersMethodremove_stable_workers_by_expiration
(self)
llava/serve/controller.py:183
↓ 1 callersFunctionreplace_llama_attn_with_flash_attn
()
llava/train/llama_flash_attn_monkey_patch.py:100
↓ 1 callersFunctionsafe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
llava/train/train.py:90
↓ 1 callersFunctionskip
(conv, args)
llava/data/optional_clean.py:16
↓ 1 callersFunctionsmall_param_init_fn_
(module: nn.Module, n_layers: int, d_model: int, init_div_is_residual: Union[int, float, str, bool]=True, emb_
llava/model/mpt/param_init_fns.py:137
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
llava/train/train.py:103
↓ 1 callersFunctionsplit_contents
Keep the maximum round of conversations within the max token length constraint
llava/data/split_long_conversation.py:33
↓ 1 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
llava/eval/model_vqa_science.py:19
↓ 1 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
llava/eval/model_vqa.py:19
↓ 1 callersFunctionunwrap_model
Recursively unwraps a model from potential containers (as used in distributed training). Args: model (`torch.nn.Module`): The model
llava/train/llava_trainer.py:9
↓ 1 callersFunctionviolates_moderation
Check whether the text violates OpenAI moderation API.
llava/utils.py:102
↓ 1 callersMethodworker_api_generate_stream
(self, params)
llava/serve/controller.py:193
↓ 1 callersMethodworker_api_get_status
(self)
llava/serve/controller.py:220
Method__call__
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
llava/model/utils.py:35
Method__call__
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
llava/eval/model_vqa_science.py:99
Method__call__
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
llava/eval/model_qa.py:21
Method__call__
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
llava/eval/model_vqa.py:138
Method__call__
(self, instances: Sequence[Dict])
llava/train/train.py:491
Method__getattr__
(self, attr)
llava/utils.py:70
Method__getitem__
(self, i)
llava/train/train.py:407
Method__getitem__
(self, i)
llava/train/train.py:429
Method__init__
(self, logger, log_level=logging.INFO)
llava/utils.py:64
Method__init__
(self, controller_addr, worker_addr, worker_id, no_register, model_path, mod
llava/serve/model_worker.py:104
Method__init__
Parameters: value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the i
llava/serve/gradio_patch.py:26
Method__init__
(self, dispatch_method: str)
llava/serve/controller.py:58
Method__init__
(self, config)
llava/model/llava.py:191
Method__init__
(self, keywords, tokenizer, input_ids)
llava/model/utils.py:27
Method__init__
(self, config)
llava/model/llava_mpt.py:177
Method__init__
(self, d_model: int, n_heads: int, expansion_ratio: int, attn_config: Dict={'attn_type': 'multihead_attention'
llava/model/mpt/blocks.py:22
Method__init__
(self, config: MPTConfig)
llava/model/mpt/modeling_mpt.py:222
Method__init__
The MPT configuration class. Args: d_model (int): The size of the embedding dimension of the model. n_heads (int): Th
llava/model/mpt/configuration_mpt.py:10
Method__init__
(self, normalized_shape, eps=1e-05, elementwise_affine=True, device=None, dtype=None)
llava/model/mpt/norm.py:16
Method__init__
(self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None)
llava/model/mpt/norm.py:48
Method__init__
(self, d_model: int, n_heads: int, attn_impl: str='triton', clip_qkv: Optional[float]=None, qk_ln: bool=False,
llava/model/mpt/attention.py:181
Method__init__
(self, keywords, tokenizer, input_ids)
llava/eval/model_vqa_science.py:93
Method__init__
(self, keywords, tokenizer, input_ids)
llava/eval/model_qa.py:15
Method__init__
(self, keywords, tokenizer, input_ids)
llava/eval/model_vqa.py:132
Method__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer, multimod
llava/train/train.py:414
Method__len__
(self)
llava/train/train.py:404
Method__len__
(self)
llava/train/train.py:426
Function_build_alibi_tensor
(self: BloomModel, batch_size: int, query_length: int, key_length: int, dtype: torch.dtype, device: torch.devi
llava/model/mpt/hf_prefixlm_converter.py:140
Function_prepare_attn_mask
(self: BloomModel, attention_mask: torch.Tensor, bidirectional_mask: Optional[torch.Tensor], input_shape: Tupl
llava/model/mpt/hf_prefixlm_converter.py:126
Function_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
llava/model/mpt/hf_prefixlm_converter.py:285
Function_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
llava/train/llama_flash_attn_monkey_patch.py:94
Method_reorder_cache
Used by HuggingFace generate when using beam search with kv-caching. See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f
llava/model/mpt/modeling_mpt.py:302
Method_set_gradient_checkpointing
(self, module, value=False)
llava/model/llava_mpt.py:196
Methodactivation_checkpointing_fn
(self, module)
llava/model/mpt/modeling_mpt.py:217
Methodactivation_checkpointing_fn
(self, module)
llava/model/mpt/modeling_mpt.py:278
Functionadd_bidirectional_mask_if_missing
Attempts to add bidirectional_mask to batch if missing. Raises: KeyError if bidirectional_mask is missing and can't be inferred
llava/model/mpt/hf_prefixlm_converter.py:401
Functionadd_text
(state, text, image, image_process_mode, request: gr.Request)
llava/serve/gradio_web_server.py:141
Functionbaseline_param_init_fn_
(module: nn.Module, init_std: float, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[i
llava/model/mpt/param_init_fns.py:131
Functionbuild_prompt
(problems, shot_qids, test_qid, args)
scripts/convert_sqa_to_llava_base_prompt.py:244
Functionbuild_prompt_gpt4
(problems, shot_qids, test_qid, args)
scripts/convert_sqa_to_llava_base_prompt.py:291
Functionclean_html_one_sample
(sample)
llava/data/clean_sharegpt.py:74
Functionclear_history
(request: gr.Request)
llava/serve/gradio_web_server.py:135
Functionconvert_caps
(results)
llava/eval/eval_science_qa_gpt4.py:19
Functionconvert_caps
(results)
llava/eval/eval_science_qa.py:19
Functionconvert_caps
(results)
llava/eval/eval_science_qa_gpt4_requery.py:21
Functionconvert_hf_causal_lm_to_prefix_lm
Converts a HuggingFace Causal LM to a Prefix LM. Supported HuggingFace model classes: - `GPT2LMHeadModel` - `GPTNeoForCausalLM`
llava/model/mpt/hf_prefixlm_converter.py:335
Functionconvert_to_jsonl
(base_dir, split, prompt_format="QCM-LEPA")
scripts/convert_sqa_to_llava.py:49
Functionconvert_to_llava
(base_dir, split, prompt_format="QCM-LEPA")
scripts/convert_sqa_to_llava.py:8
Functioncustom_forward
(*inputs)
llava/model/mpt/hf_prefixlm_converter.py:209
Functiondownvote_last_response
(state, model_selector, request: gr.Request)
llava/serve/gradio_web_server.py:113
← previousnext →101–200 of 275, ranked by callers