MCPcopy Create free account

hub / github.com/CarperAI/autocrit / functions

Functions109 in github.com/CarperAI/autocrit

↓ 11 callersMethodload
(self, **kwargs)
autocrit/inference/inference_hook.py:132
↓ 4 callersFunctioncheck_apis_available
Returns available APIs with boolean flags :param data: from load_dataset, assumes ['text'] is available :param tokenizer: Tokenizer to t
toolformer/data_generation/api_checker.py:21
↓ 4 callersMethodgenerate_continuations
Generate continuations :param input_tokens: input to model :param input_logits: output from model :param labels: lab
toolformer/data_generation/base_api.py:170
↓ 4 callersMethodinfer
input_texts: a list of strings, each string is a prompt generate_params: a dictionary of parameters to pass to the generate function
autocrit/inference/inference_hook.py:141
↓ 4 callersMethodparse_article
Takes in data dict and parses it into API continuations :param data: data, assuming it's from load_dataset and has a text field
toolformer/data_generation/base_api.py:339
↓ 3 callersFunctionClient
(url: str)
autocrit/inference/triton/client.py:49
↓ 3 callersMethod__init__
dir: location of the triton server model_name: the name of the model to use tokenizer_name: the name of the tokenizer to use,
autocrit/inference/inference_hook.py:114
↓ 3 callersFunctionevaluate_unsafe
(questions, answers)
experiments/harmless/generate.py:22
↓ 2 callersFunctionclean_continuation
(rating)
Rating/mec_bpc.py:13
↓ 2 callersFunctionextract_data
(file_path)
data_handlers/base_dataset.py:5
↓ 2 callersFunctionextract_data
(file_path)
data_handlers/critique_dataset.py:5
↓ 2 callersFunctionextract_helpful_and_rm_data
(data_path)
data_handlers/helpfulness_dataset.py:5
↓ 2 callersFunctionget_eval
(system_prompt, user_prompt: str)
Rating/mec_bpc.py:35
↓ 2 callersFunctionscore_calc
(current_selections)
data_examine/compare_models.py:42
↓ 2 callersFunctiontruncate_output
(generate_fn, stop=[])
autocrit.py:120
↓ 1 callersFunctionCalculator
(input_query: str)
toolformer/tools.py:188
↓ 1 callersFunctionCalendar
(date=datetime.datetime.now())
toolformer/tools.py:36
↓ 1 callersFunctionGooseAI
(input_query: str)
toolformer/tools.py:352
↓ 1 callersFunctionHuggingfaceAPI
(input_query: str)
toolformer/tools.py:234
↓ 1 callersFunctionMT
(input_query: str)
toolformer/tools.py:162
↓ 1 callersFunctionSteamSHP
(input_query: str)
toolformer/tools.py:325
↓ 1 callersFunctionWikiSearch
(input_query: str)
toolformer/tools.py:142
↓ 1 callersFunctionWolframAlphaCalculator
(input_query: str)
toolformer/tools.py:266
↓ 1 callersMethod__init__
(self, traced_model)
autocrit/inference/triton/convert_to_triton.py:45
↓ 1 callersFunction_bing_search_results
(search_term: str, bing_subscription_key: str, count: int)
toolformer/tools.py:376
↓ 1 callersMethodadd_api_calls
Add API calls here. :param candidate: which candidate is being parsed :param outputs: individual candidate outputs :
toolformer/data_generation/base_api.py:140
↓ 1 callersFunctionbest_of_n
Returns the best of n samples from a model :param model: A Huggingface model :param tokenizer: A Huggingface tokenizer :param prompt: A st
autocrit/inference/utils.py:77
↓ 1 callersFunctionbing_search
(input_query: str)
toolformer/tools.py:392
↓ 1 callersFunctioncolbertv2_get_request
(url: str, query: str, k: int)
toolformer/tools.py:134
↓ 1 callersFunctionconstruct_prompt_wizard13b
(input_text)
experiments/PRM/generate_rollouts.py:46
↓ 1 callersMethodcreate_candidates
Generates continuations of valid API calls :param indices: index to start :param values: values for filtering :param
toolformer/data_generation/base_api.py:72
↓ 1 callersFunctioncreate_dict
(dataset)
experiments/PRM/convert_to_steps.py:28
↓ 1 callersFunctioncustom_search
(query, api_key, cse_id, **kwargs)
toolformer/tools.py:289
↓ 1 callersFunctionevaluate_acc
(model, tokenizer, train, test, A_token, B_token)
Rating/InstructRate.py:11
↓ 1 callersFunctionextract_data_continuations
(file_path)
data_handlers/base_dataset.py:35
↓ 1 callersFunctionextract_data_continuations
(file_path)
data_handlers/critique_dataset.py:140
↓ 1 callersFunctionextract_rating
(rating)
Rating/mec_bpc.py:20
↓ 1 callersMethodfilter_continuations
Grab continuations that are valid :param input_tokens: tokenized inputs :param input_logits: input logits :param lab
toolformer/data_generation/base_api.py:37
↓ 1 callersFunctiongather
(samples, total_size: int)
autocrit.py:112
↓ 1 callersFunctiongenerate_markdown_table
(data)
experiments/harmless/show.py:6
↓ 1 callersFunctionget_embedding
(text: str, model="text-embedding-ada-002")
data_handlers/embeddings_for_n_uniques/get_embeddings.py:11
↓ 1 callersFunctionget_eval
(user_prompt: str)
Rating/likert.py:9
↓ 1 callersFunctionget_unique_test_data
(dataset)
data_handlers/embeddings_for_n_uniques/get_embeddings.py:15
↓ 1 callersFunctiongoogle_search
(input_query: str)
toolformer/tools.py:295
↓ 1 callersFunctioninfer
( triton_client, model_name, input_ids, new_tokens: int = 1, temperature: float = 1.0 )
autocrit/inference/triton/client.py:33
↓ 1 callersFunctionlangchain_llmchain
(input_question)
toolformer/tools.py:209
↓ 1 callersFunctionlikert_score
(prompts, outputs)
Rating/likert.py:51
↓ 1 callersFunctionmain
()
autocrit/inference/triton/client.py:64
↓ 1 callersFunctionmean_pooling
(token_embeddings: torch.Tensor, mask: torch.Tensor)
toolformer/tools.py:102
↓ 1 callersFunctionmecpbc_score
(systems: Optional[List[str]], prompts: List[str], outputs: List[List[str]])
Rating/mec_bpc.py:86
↓ 1 callersFunctionparse_args
()
experiments/PRM/convert_to_steps.py:20
↓ 1 callersFunctionparse_args
()
experiments/PRM/generate_rollouts.py:22
↓ 1 callersFunctionplot_calibration
(model_name: str, dataset_name: str, delta_scores: np.ndarray)
train_reward_model.py:39
↓ 1 callersFunctionprepare_inference_inputs
Prepare inputs for triton client inference. inputs_ids: torch.IntTensor, shape [batch_size, seq_len] new_tokens: int, number of tokens to
autocrit/inference/utils.py:8
↓ 1 callersFunctionprepare_inference_inputs
( inputs_ids: torch.IntTensor, new_tokens: int = 1, temperature: float = 1.0 )
autocrit/inference/triton/client.py:5
↓ 1 callersFunctionpreprocess_dataset
( dataset: Dataset, template: Template, reverse_template: Template, option_a, option_b,
Rating/InstructRate.py:54
↓ 1 callersFunctionquery
(payload)
toolformer/tools.py:242
↓ 1 callersMethodretrieval
( self, input_sentences: List[str], input_text: str, k: int )
toolformer/tools.py:60
↓ 1 callersFunctionsplit_rollout
(rollout)
experiments/PRM/convert_to_steps.py:8
↓ 1 callersFunctiontriton_call
Call triton server for inference. triton_client: tritonclient.grpc.aio.InferenceServerClient model_name: str, name of the model input
autocrit/inference/utils.py:47
Method__call__
(self, query, k=1)
toolformer/tools.py:127
Method__call__
( self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs )
data_examine/generate_continuations.py:20
Method__init__
(self)
toolformer/tools.py:54
Method__init__
(self, url: str)
toolformer/tools.py:124
Method__init__
( self, start_tokens: List[int], end_tokens: List[int], minimum_percentage: fl
toolformer/data_generation/retrieval.py:23
Method__init__
( self, start_tokens: List[int], end_tokens: List[int], minimum_percentage: fl
toolformer/data_generation/calendar.py:21
Method__init__
( self, start_tokens: List[int], end_tokens: List[int], minimum_percentage: fl
toolformer/data_generation/llmchain.py:21
Method__init__
( self, start_tokens: List[int], end_tokens: List[int], minimum_percentage: fl
toolformer/data_generation/calculator.py:21
Method__init__
Base API Postprocesing class :param start_tokens: token representation for [ or other tokens :param end_tokens: token repre
toolformer/data_generation/base_api.py:18
Method__init__
(self, dir : str)
autocrit/inference/inference_hook.py:19
Method__init__
dir: the directory of the model tokenizer_name: the name of the tokenizer to use, if None, use the model name
autocrit/inference/inference_hook.py:43
Method__init__
dir: the directory of the model tokenizer_name: the name of the tokenizer to use, if None, use the model name
autocrit/inference/inference_hook.py:92
Method__init__
(self, dir : str)
autocrit/inference/inference_hook.py:170
Method__init__
(self, model)
autocrit/inference/triton/convert_to_triton.py:35
Method__init__
(self, stop_ids)
data_examine/generate_continuations.py:17
Methodadd_api_calls
( self, candidate: int, outputs: dict, texts_to_test: List[str], token
toolformer/data_generation/retrieval.py:33
Methodadd_api_calls
( self, candidate: int, outputs: dict, texts_to_test: List[str], token
toolformer/data_generation/calendar.py:31
Methodadd_api_calls
( self, candidate: int, outputs: dict, texts_to_test: List[str], token
toolformer/data_generation/llmchain.py:31
Methodadd_api_calls
( self, candidate: int, outputs: dict, texts_to_test: List[str], token
toolformer/data_generation/calculator.py:31
Methodcheck_any_available
(self)
toolformer/data_generation/api_checker.py:17
Functioncollate_fn
(batch)
train_reward_model.py:125
Functionconstruct_prompt_wizard7b
(input_text)
experiments/PRM/generate_rollouts.py:42
Functionexecute_and_wrap
(lam, kwargs)
experiments/PRM/generate_rollouts.py:115
Functionfinetune
(accelerator, model, tokenizer, optim, prompts, outputs, eval_prompts=[])
autocrit.py:130
Functionfn
(*args, **kwargs)
autocrit.py:121
Methodforward
(self, input_ids: torch.Tensor)
autocrit/inference/triton/convert_to_triton.py:40
Methodforward
( self, input_ids: torch.Tensor, tensor_of_seq_len: torch.Tensor, temperature:
autocrit/inference/triton/convert_to_triton.py:49
Functiongenerate
(model, tokenizer, prompts, temperature=1, max_new_tokens=256, max_length=2048, stop=[])
autocrit.py:22
Functiongenerate_openai
(prompt, model="gpt-3.5-turbo", max_new_tokens=128, system_prompt="", temperature=1, stop=[])
autocrit.py:36
Methodinfer
input_texts: a list of strings, each string is a prompt generate_params: a dictionary of parameters to pass to the generate function
autocrit/inference/inference_hook.py:28
Methodinfer
input_texts: a list of strings, each string is a prompt generate_params: a dictionary of parameters to pass to the generate function
autocrit/inference/inference_hook.py:67
Methodinfer
input_texts: a list of strings, each string is a prompt generate_params: a dictionary of parameters to pass to the generate function
autocrit/inference/inference_hook.py:99
Methodinfer
input_texts: a list of strings, each string is a prompt generate_params: a dictionary of parameters to pass to the generate function
autocrit/inference/inference_hook.py:210
Functionleft_select
(current_selections, current_index)
data_examine/compare_models.py:16
Methodload
(self, **kwargs)
autocrit/inference/inference_hook.py:24
Methodload
(self, **kwargs)
autocrit/inference/inference_hook.py:58
Methodload
(self, **kwargs)
autocrit/inference/inference_hook.py:175
Methodparse_article
( self, data: dict, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase )
toolformer/data_generation/retrieval.py:111
Methodparse_article
( self, data: dict, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase )
toolformer/data_generation/calendar.py:102
Methodparse_article
( self, data: dict, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase )
toolformer/data_generation/llmchain.py:110
next →1–100 of 109, ranked by callers