MCPcopy Create free account

hub / github.com/AkariAsai/self-rag / functions

Functions256 in github.com/AkariAsai/self-rag

↓ 8 callersFunctionload_all_files
(file_paths)
data_creation/generator/postprocess_data.py:150
↓ 6 callersFunctionpostprocess
(pred)
retrieval_lm/utils.py:84
↓ 4 callersFunction_concat_messages
(messages)
retrieval_lm/finetune.py:303
↓ 4 callersFunctionnormalize_answer
(s)
retrieval_lm/metrics.py:54
↓ 4 callersFunctionnormalize_answer
(s)
retrieval_lm/src/evaluation.py:122
↓ 4 callersFunctionprocess_data
(input_data, inst_mode, input_mode, split="train", multi_retrieval=False)
data_creation/generator/run_reward_vllm.py:153
↓ 4 callersMethodupdate
(self, vals: Dict[str, Tuple[Number, Number]])
retrieval_lm/src/utils.py:160
↓ 3 callersFunctionfix_spacing
(input_text)
retrieval_lm/utils.py:78
↓ 3 callersFunctionload_dataset
(data_path, loading_mode)
retrieval_lm/src/data.py:31
↓ 3 callersFunctionload_jsonlines
(file)
data_creation/generator/postprocess_data.py:52
↓ 3 callersFunctionload_jsonlines
(file)
retrieval_lm/utils.py:98
↓ 3 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
data_creation/train_special_tokens.py:276
↓ 2 callersFunction_normalize
(text)
retrieval_lm/src/evaluation.py:118
↓ 2 callersFunction_tokenize_fn
Tokenize a list of strings.
retrieval_lm/finetune.py:231
↓ 2 callersFunctionadd_bos_eos
(x, bos_token_id, eos_token_id)
retrieval_lm/src/data.py:212
↓ 2 callersMethodadd_embeddings
(self, index, embeddings, ids, indexing_batch_size)
retrieval_lm/passage_retrieval.py:112
↓ 2 callersMethodadd_passages
(self, passages, top_passages_and_scores)
retrieval_lm/passage_retrieval.py:122
↓ 2 callersFunctionapply_augmentation
(x, opt)
retrieval_lm/src/data.py:195
↓ 2 callersFunctionbuild_mask
(tensors)
retrieval_lm/src/data.py:147
↓ 2 callersFunctioncall_model
(prompts, model, max_new_tokens=50)
data_creation/generator/run_reward_vllm.py:130
↓ 2 callersFunctioncall_model
(prompts, model, max_new_tokens=50)
retrieval_lm/run_baseline_lm.py:50
↓ 2 callersFunctioncall_model_chatgpt
(prompt, model, max_tokens=50)
retrieval_lm/run_baseline_lm.py:22
↓ 2 callersFunctioncall_model_instructgpt
(prompt, model, max_tokens=50)
retrieval_lm/run_baseline_lm.py:40
↓ 2 callersFunctionconvert_score_to_groudness
(pred)
data_creation/generator/postprocess_data.py:105
↓ 2 callersFunctionconvert_score_to_retrieval_token
(pred)
data_creation/generator/postprocess_data.py:88
↓ 2 callersMethoddeserialize_from
(self, dir_path)
retrieval_lm/src/index.py:57
↓ 2 callersFunctiongenerate
(prompt, ctxs, max_new_tokens)
retrieval_lm/run_long_form_static.py:357
↓ 2 callersMethodgenerate_offset
(self)
retrieval_lm/src/data.py:111
↓ 2 callersMethodindex_encoded_data
(self, index, embedding_files, indexing_batch_size)
retrieval_lm/passage_retrieval.py:93
↓ 2 callersFunctionload_file
(input_fp)
retrieval_lm/utils.py:104
↓ 2 callersFunctionload_jsonlines
(file)
data_creation/generator/create_retrieval_data.py:17
↓ 2 callersFunctionload_jsonlines
(file)
data_creation/critic/gpt4_reward/chatgpt_groundness.py:86
↓ 2 callersFunctionload_jsonlines
(file)
data_creation/critic/gpt4_reward/chatgpt_need_retrieval.py:107
↓ 2 callersFunctionload_special_tokens
(tokenizer, use_grounding=False, use_utility=False)
retrieval_lm/utils.py:56
↓ 2 callersFunctionmatch
(prediction, ground_truth)
retrieval_lm/metrics.py:83
↓ 2 callersFunctionpostprocess
(pred)
data_creation/generator/postprocess_data.py:22
↓ 2 callersFunctionpostprocess_answer_option_conditioned
(answer)
retrieval_lm/run_short_form.py:36
↓ 2 callersFunctionpostprocess_answers_closed
(output, task, choices=None)
retrieval_lm/utils.py:200
↓ 2 callersFunctionpostprocess_relevance_reward_token
(pred)
data_creation/generator/postprocess_data.py:126
↓ 2 callersFunctionqa_f1_score
(prediction, ground_truth)
retrieval_lm/metrics.py:41
↓ 2 callersFunctionrandomcrop
(x, ratio_min, ratio_max)
retrieval_lm/src/data.py:137
↓ 2 callersFunctionreplace_llama_attn_with_flash_attn
()
retrieval_lm/llama_flash_attn_monkey_patch.py:115
↓ 2 callersFunctionsave_file_jsonl
(data, fp)
data_creation/generator/create_retrieval_data.py:23
↓ 2 callersFunctionsave_file_jsonl
(data, fp)
retrieval_lm/utils.py:112
↓ 2 callersMethodsearch_knn
(self, query_vectors: np.array, top_docs: int, index_batch_size: int = 2048)
retrieval_lm/src/index.py:34
↓ 2 callersFunctionset_optim
(opt, model)
retrieval_lm/src/utils.py:122
↓ 2 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.
data_creation/train_special_tokens.py:143
↓ 2 callersFunctionsum_main
(x)
retrieval_lm/src/dist_utils.py:111
↓ 2 callersMethodtokenize
(self, text, uncased=False)
retrieval_lm/src/evaluation.py:36
↓ 1 callersMethod__init__
(self, optimizer, warmup, total, ratio=0.1, last_epoch=-1)
retrieval_lm/src/utils.py:109
↓ 1 callersMethod__init__
(self, config, pooling="average", **kwargs)
retrieval_lm/src/contriever.py:12
↓ 1 callersMethod_compute_logits
(self, q, k)
retrieval_lm/src/moco.py:97
↓ 1 callersMethod_dequeue_and_enqueue
(self, keys)
retrieval_lm/src/moco.py:82
↓ 1 callersMethod_load_data
(self, datapaths, global_rank, world_size, maxload)
retrieval_lm/src/finetuning_data.py:71
↓ 1 callersMethod_load_data_json
(self, path, global_rank, world_size, counter, maxload=None)
retrieval_lm/src/finetuning_data.py:84
↓ 1 callersMethod_load_data_jsonl
(self, path, global_rank, world_size, counter, maxload=None)
retrieval_lm/src/finetuning_data.py:98
↓ 1 callersMethod_load_retriever
(self, model_id, pooling, random_init)
retrieval_lm/src/inbatch.py:32
↓ 1 callersMethod_load_retriever
(self, model_id, pooling, random_init)
retrieval_lm/src/moco.py:44
↓ 1 callersFunction_make_r_io_base
(f, mode: str)
data_creation/train_special_tokens.py:101
↓ 1 callersFunction_make_w_io_base
(f, mode: str)
data_creation/train_special_tokens.py:92
↓ 1 callersMethod_momentum_update_key_encoder
Update of the key encoder
retrieval_lm/src/moco.py:74
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
data_creation/train_special_tokens.py:167
↓ 1 callersMethod_update_id_mapping
(self, db_ids: List)
retrieval_lm/src/index.py:70
↓ 1 callersFunctionaccuracy
(preds, labels)
retrieval_lm/metrics.py:18
↓ 1 callersMethodbackward
(ctx, *grads)
retrieval_lm/src/dist_utils.py:15
↓ 1 callersFunctioncall_model_beam_batch
(prompt, model, max_new_tokens=15, ctxs=None, query=None, max_depth=5, rel_tokens=None,
retrieval_lm/run_long_form_static.py:148
↓ 1 callersFunctioncall_model_rerank_w_scores_batch
(prompt, evidences, model, max_new_tokens=15, ret_tokens=None, rel_tokens
retrieval_lm/run_short_form.py:51
↓ 1 callersFunctioncompletions_instructgpt_backoff
(**kwargs)
retrieval_lm/run_baseline_lm.py:18
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
data_creation/critic/gpt4_reward/chatgpt_groundness.py:14
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
data_creation/critic/gpt4_reward/chatgpt_utility.py:14
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
data_creation/critic/gpt4_reward/chatgpt_relevance.py:14
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
data_creation/critic/gpt4_reward/chatgpt_inference.py:16
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
data_creation/critic/gpt4_reward/chatgpt_need_retrieval.py:14
↓ 1 callersFunctioncompletions_with_backoff
(**kwargs)
retrieval_lm/run_baseline_lm.py:15
↓ 1 callersFunctionconvert_score_to_utility_token
(pred)
data_creation/generator/postprocess_data.py:66
↓ 1 callersFunctioncount_inversions
(arr)
retrieval_lm/src/evaluation.py:169
↓ 1 callersFunctioncreate_groundness_data
(input_data, multi_retrieval=False)
data_creation/critic/gpt4_reward/combine_chat_gpt_reward.py:156
↓ 1 callersFunctioncreate_relevance_data
(input_data)
data_creation/critic/gpt4_reward/combine_chat_gpt_reward.py:181
↓ 1 callersFunctioncreate_retrieval_data
(input_data, multi_retrieval=False)
data_creation/critic/gpt4_reward/combine_chat_gpt_reward.py:111
↓ 1 callersFunctioncreate_retrieval_data_input_only
(input_data)
data_creation/critic/gpt4_reward/combine_chat_gpt_reward.py:133
↓ 1 callersFunctioncreate_utility_data
(input_data)
data_creation/critic/gpt4_reward/combine_chat_gpt_reward.py:92
↓ 1 callersFunctiondeleteword
(x, p=0.1)
retrieval_lm/src/data.py:165
↓ 1 callersFunctionem
(prediction, ground_truth)
retrieval_lm/src/evaluation.py:138
↓ 1 callersFunctionembed_passages
(args, passages, model, tokenizer)
retrieval_lm/generate_passage_embeddings.py:26
↓ 1 callersMethodembed_queries
(self, args, queries)
retrieval_lm/passage_retrieval.py:36
↓ 1 callersMethodembed_queries_demo
(self, queries)
retrieval_lm/passage_retrieval.py:67
↓ 1 callersFunctionf1
(prediction, ground_truth)
retrieval_lm/src/evaluation.py:141
↓ 1 callersMethodforward
( self, input_ids=None, attention_mask=None, token_type_ids=None, posi
retrieval_lm/src/contriever.py:17
↓ 1 callersFunctiongenerate
(prompt, evidences, max_new_tokens)
retrieval_lm/run_short_form.py:312
↓ 1 callersFunctionget_rank
()
retrieval_lm/src/dist_utils.py:77
↓ 1 callersFunctionhas_answer
Check if a document contains an answer string.
retrieval_lm/src/evaluation.py:101
↓ 1 callersMethodindex_data
(self, ids, embeddings)
retrieval_lm/src/index.py:25
↓ 1 callersMethodinitialize
(self)
retrieval_lm/src/options.py:12
↓ 1 callersFunctionis_main
()
retrieval_lm/src/dist_utils.py:85
↓ 1 callersFunctionjload
Load a .json file into a dictionary.
data_creation/train_special_tokens.py:127
↓ 1 callersFunctionload_file
(file_name)
data_creation/generator/postprocess_data.py:137
↓ 1 callersFunctionload_jsonlines
(file)
data_creation/process_data/tulu.py:10
↓ 1 callersFunctionload_jsonlines
(file)
data_creation/generator/run_reward_vllm.py:147
↓ 1 callersFunctionload_jsonlines
(file)
data_creation/generator/create_prompt_data.py:28
↓ 1 callersFunctionload_jsonlines
(file)
data_creation/critic/gpt4_reward/chatgpt_utility.py:41
next →1–100 of 256, ranked by callers