Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PKU-Alignment/align-anything
/ functions
Functions
3,036 in github.com/PKU-Alignment/align-anything
⨍
Functions
3,036
◇
Types & classes
781
↳
Endpoints
3
↓ 1 callers
Method
apply
(self, data_1, data_2)
projects/eval-anything/eval_anything/evaluate_tools/t2t_tools.py:652
↓ 1 callers
Method
apply
(self, evaluation_results: List[EvaluationResult])
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:33
↓ 1 callers
Method
apply
(self, overall_evaluation_results: Dict[str, Dict[str, float]])
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:250
↓ 1 callers
Method
apply
(self, scores)
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/tools.py:43
↓ 1 callers
Function
auto_or_half
()
projects/eval-anything/eval_anything/benchmarks/text_to_text/salad_bench/model_utils.py:28
↓ 1 callers
Function
auto_or_half_dtype
()
projects/eval-anything/eval_anything/benchmarks/text_to_text/salad_bench/model_utils.py:21
↓ 1 callers
Function
batch_vllm_engine_call
Batch call a method on multiple vLLM engines. Args: engines: List of vLLM engine instances method_name: Name of the method to
align_anything/utils/vllm_utils/vllm_engine.py:247
↓ 1 callers
Function
best_lemma_via_specificity
(synset_str)
projects/eval-anything/eval_anything/third_party/SPOC/utils/task_spec_to_instruction.py:75
↓ 1 callers
Function
best_lemma_via_specificity
(synset_str)
align_anything/utils/spoc_utils/task_spec_to_instruction.py:97
↓ 1 callers
Method
broadcast_batch
Broadcast the batch to all processes.
align_anything/trainers/text_to_text/ppo_vllm.py:314
↓ 1 callers
Method
build
Build a conversation from a list of user and assistant texts. Note: the number of turns in the conversation is determined by the length of th
projects/eval-anything/eval_anything/benchmarks/text_to_text/MaliciousInstructions/utils.py:15
↓ 1 callers
Method
build_const_helper
(self)
align_anything/models/modeling_emu3/mllm/processing_emu3.py:340
↓ 1 callers
Method
build_inputs
( self, tokenizer, query: str, history: List[Tuple[str, str]] = [], meta_instruction='' )
projects/eval-anything/eval_anything/benchmarks/text_to_text/Flames/modeling_internlm.py:1167
↓ 1 callers
Function
build_llama_vision_audio
(args)
projects/any_to_text/build_llama_vision_audio.py:28
↓ 1 callers
Function
build_llava
(args)
projects/any_to_text/build_llama_vision.py:23
↓ 1 callers
Method
build_model
( cls, model_version, input_sensors, loss, )
projects/eval-anything/eval_anything/third_party/SPOC/spoc_model/early_fusion_tsfm_models.py:223
↓ 1 callers
Method
build_response_from_segments
( self, model: Union['ChameleonModel', 'ChameleonForConditionalGeneration'], processor
align_anything/models/chameleon_model_t2i.py:74
↓ 1 callers
Function
cached_requests
Convenience function for making cached API requests. Creates a CachedRequestsTool instance and calls it. Args: messages: List of
projects/eval-anything/eval_anything/evaluate_tools/cached_requests.py:208
↓ 1 callers
Function
calc_inverse
(deg)
projects/eval-anything/eval_anything/third_party/SPOC/environment/stretch_state.py:413
↓ 1 callers
Function
calc_trajectory_room_visitation
(room_poly_map, trajectory)
projects/eval-anything/eval_anything/third_party/SPOC/utils/online_evaluation_types_and_utils.py:117
↓ 1 callers
Method
calculate
(self)
projects/eval-anything/eval_anything/evaluate_tools/base_tools.py:48
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:52
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:75
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:102
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:129
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:156
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:183
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:203
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:223
↓ 1 callers
Method
calculate
( self, overall_evaluation_results: Dict[str, Dict[str, float]], **kwargs )
projects/eval-anything/eval_anything/evaluate_tools/metrics.py:264
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/metrics.py:46
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/metrics.py:115
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/metrics.py:154
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/metrics.py:185
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, **kwargs: None )
projects/eval-anything/eval_anything/benchmarks/text_to_text/TruthfulQA/metrics.py:217
↓ 1 callers
Method
calculate
使用本地模型评估给定的模型响应质量。
projects/eval-anything/eval_anything/benchmarks/text_to_text/salad_bench/utils.py:79
↓ 1 callers
Method
calculate
( self, evaluation_results: List[EvaluationResult], judge_method: str, k: int
projects/eval-anything/eval_anything/benchmarks/text_to_text/HumanEval/metrics.py:33
↓ 1 callers
Function
calculate_distance
(pos1, pos2)
projects/eval-anything/eval_anything/third_party/SPOC/tasks/safety_components.py:171
↓ 1 callers
Method
calculate_metrics
( self, task: AbstractSafeTask, all_actions: List[str], success: bool,
projects/eval-anything/eval_anything/pipeline/tv2act_benchmark.py:191
↓ 1 callers
Function
chdir
(root)
projects/eval-anything/eval_anything/utils/utils.py:320
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/Anthropics/utils.py:338
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/MoralChoice/utils.py:138
↓ 1 callers
Function
check_eval_response
(eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/HExPHI/utils.py:83
↓ 1 callers
Function
check_eval_response
检查评估响应 Args: prompt (list): prompt列表 res (list): 模型响应列表 evaluator (pipeline): 评估器模型 scorer (pipeline): 打分器模型
projects/eval-anything/eval_anything/benchmarks/text_to_text/MaliciousInstruct/utils.py:242
↓ 1 callers
Function
check_eval_response
Check the evaluation response and determine if the LLM response was appropriate. Returns: dict: { 'label': int (1 fo
projects/eval-anything/eval_anything/benchmarks/text_to_text/TDCRedTeaming/utils.py:105
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/CDialBias/utils.py:328
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/Strongreject/utils.py:202
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/BeaverTails/utils.py:338
↓ 1 callers
Function
check_eval_response
(eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/DoNotAnswer/utils.py:71
↓ 1 callers
Function
check_eval_response
Check the evaluation response and determine if the LLM response was appropriate. Returns: dict: { 'label': int (1 fo
projects/eval-anything/eval_anything/benchmarks/text_to_text/MIC/utils.py:105
↓ 1 callers
Function
check_eval_response
(eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/HarmBench/utils.py:56
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/Cona/utils.py:338
↓ 1 callers
Function
check_eval_response
(eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/RedEval/utils.py:40
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/DoAnythingNow/utils.py:237
↓ 1 callers
Function
check_eval_response
Check the evaluation response and determine if the LLM response was appropriate. Returns: dict: { 'label': int (1 fo
projects/eval-anything/eval_anything/benchmarks/text_to_text/SimpleSafetyTests/Strongreject/utils.py:135
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/SandP/utils.py:132
↓ 1 callers
Function
check_eval_response
Check the evaluation response and determine if the LLM response was appropriate. Returns: dict: { 'label': int (1 fo
projects/eval-anything/eval_anything/benchmarks/text_to_text/XSTest/utils.py:193
↓ 1 callers
Function
check_eval_response
(llm_response, eval_response)
projects/eval-anything/eval_anything/benchmarks/text_to_text/CyberAttackAssistance/utils.py:329
↓ 1 callers
Function
check_eval_response
判断 LLM 是否回答了用户的问题。 - llm_response: 模型原始生成的回答内容 - eval_response: GPT 评估模型对这个回答的评价,比如 "Yes" 或 "No" 返回: { "label": 1 表示“有回答
projects/eval-anything/eval_anything/benchmarks/text_to_text/AdvBench/utils.py:302
↓ 1 callers
Function
check_version_compatibility
Check if current version meets the required version. Args: required_version: Minimum required version string. Returns: bool:
projects/eval-anything/eval_anything/version.py:120
↓ 1 callers
Method
classify_responses
args: prompts: list of prompts responses: list of responses returns: list of booleans, True if th
projects/eval-anything/eval_anything/benchmarks/text_to_text/jbb_behaviors/classifier.py:32
↓ 1 callers
Method
classify_responses
args: prompts: list of prompts responses: list of responses returns: list of booleans, True if th
projects/eval-anything/eval_anything/benchmarks/text_to_text/jbb_behaviors/classifier.py:66
↓ 1 callers
Method
classify_responses
(self, prompts, responses)
projects/eval-anything/eval_anything/benchmarks/text_to_text/jbb_behaviors/classifier.py:206
↓ 1 callers
Method
classify_responses
args: prompts: list of prompts responses: list of responses returns: list of booleans, True if th
projects/eval-anything/eval_anything/benchmarks/text_to_text/jbb_behaviors/classifier.py:290
↓ 1 callers
Function
clean_description
(desc)
projects/eval-anything/eval_anything/third_party/SPOC/utils/task_spec_to_instruction.py:308
↓ 1 callers
Function
clean_description
(desc)
align_anything/utils/spoc_utils/task_spec_to_instruction.py:330
↓ 1 callers
Method
combine_indices
(self)
align_anything/datasets/any_to_text/combine.py:99
↓ 1 callers
Method
compute_kl
(self)
align_anything/trainers/text_to_text/kto.py:50
↓ 1 callers
Method
compute_loss
(self, logits, actions)
align_anything/models/spoc_models/models/transformer_models/early_fusion_tsfm_models.py:121
↓ 1 callers
Method
compute_rewards
Compute the rewards for the generated completions.
align_anything/trainers/text_to_text/grpo.py:229
↓ 1 callers
Method
compute_total_grad_norm
(self)
align_anything/models/spoc_models/models/allenact_transformer_models/allenact_dino_transformer.py:287
↓ 1 callers
Function
construct_eval_message
Construct message to GPT for do_not_answer label. Use fixed args for now. Args: question: str llm_response: str
projects/eval-anything/eval_anything/benchmarks/text_to_text/DoNotAnswer/utils.py:50
↓ 1 callers
Function
construct_eval_message
Construct message to GPT for harmbench label. Use fixed args for now. Args: question: str llm_response: str
projects/eval-anything/eval_anything/benchmarks/text_to_text/HarmBench/utils.py:19
↓ 1 callers
Function
construct_eval_message
Construct message to GPT for harmbench label. Use fixed args for now. Args: question: str llm_response: str
projects/eval-anything/eval_anything/benchmarks/text_to_text/RedEval/utils.py:19
↓ 1 callers
Function
construct_rubric
(aspect, annotation_aspects=annotation_aspects_en)
projects/eval-anything/eval_anything/benchmarks/text_to_text/DoNotAnswer/utils.py:42
↓ 1 callers
Function
convert
(value)
projects/eval-anything/eval_anything/utils/utils.py:95
↓ 1 callers
Function
convert
(value)
align_anything/utils/tools.py:79
↓ 1 callers
Function
convert_byte_to_string
(bytes_to_decode: np.ndarray, max_len: Optional[int] = None)
projects/eval-anything/eval_anything/third_party/SPOC/utils/string_utils.py:20
↓ 1 callers
Function
convert_string_to_byte
(str_to_encode, max_len)
align_anything/utils/spoc_utils/string_utils.py:29
↓ 1 callers
Function
convert_world_to_agent_coordinate
(world_point, agent_state: StretchState, arm=False)
projects/eval-anything/eval_anything/third_party/SPOC/environment/stretch_state.py:461
↓ 1 callers
Method
cost_model_step
(self, actor_batch: PromptOnlyBatch)
align_anything/trainers/text_image_to_text/saferlhf.py:321
↓ 1 callers
Function
create_causal_mask
(T: int, device: torch.device)
projects/eval-anything/eval_anything/third_party/SPOC/spoc_model/early_fusion_tsfm_models.py:46
↓ 1 callers
Function
create_causal_mask
(T: int, device: torch.device)
align_anything/utils/spoc_utils/nn_utils.py:46
↓ 1 callers
Method
create_compressor
(self)
projects/eval-anything/eval_anything/third_party/SPOC/spoc_model/text_cond_visual_encoder.py:190
↓ 1 callers
Method
create_compressor
(self)
align_anything/models/spoc_models/models/transformer_models/text_cond_visual_encoder.py:173
↓ 1 callers
Method
create_compressor
(self)
align_anything/models/spoc_models/models/transformer_models/text_cond_visual_encoder.py:437
↓ 1 callers
Function
create_detic_cfg
( config_file: str, opts: Optional[List[str]], confidence_threshold: float, pred_all_class: bo
align_anything/utils/spoc_utils/detic_utils.py:70
↓ 1 callers
Method
create_image_text_combiner
(self)
align_anything/models/spoc_models/models/transformer_models/text_cond_visual_encoder.py:446
↓ 1 callers
Method
create_log_file
(self, log_dir, name)
projects/eval-anything/eval_anything/utils/logger.py:64
↓ 1 callers
Method
create_padding_mask
(self, lengths, max_length)
projects/eval-anything/eval_anything/third_party/SPOC/spoc_model/preprocessors.py:226
↓ 1 callers
Method
create_padding_mask
(self, lengths, max_length)
align_anything/models/spoc_models/models/transformer_models/preprocessors.py:239
↓ 1 callers
Function
create_tempdir
()
projects/eval-anything/eval_anything/utils/utils.py:288
↓ 1 callers
Function
create_text_encoder
(encoder_name)
projects/eval-anything/eval_anything/third_party/SPOC/spoc_model/text_cond_visual_encoder.py:86
↓ 1 callers
Method
create_tx_state_encoders
( self, obs_embed_size: int, text_embed_size: int, prev_action_embed_size: int
align_anything/models/spoc_models/models/allenact_transformer_models/allenact_dino_transformer.py:209
↓ 1 callers
Function
create_usage_table
()
projects/eval-anything/eval_anything/cli.py:86
↓ 1 callers
Function
create_vllm_engines
Create vLLM engines. Args: num_engines: Number of vLLM engines to create. tensor_parallel_size: Tensor parallel size. pre
align_anything/utils/vllm_utils/vllm_engine.py:150
↓ 1 callers
Function
create_welcome_panel
()
projects/eval-anything/eval_anything/cli.py:69
↓ 1 callers
Method
critic_loss_fn
Compute critic loss.
align_anything/trainers/text_to_text/ppo_remote_rm.py:618
↓ 1 callers
Method
critic_loss_fn
Compute critic loss.
align_anything/trainers/text_to_text/multi_ppo.py:593
↓ 1 callers
Function
debug_model_info
(model: nn.Module, trainable: bool = True, use_logger: bool = True, **kwargs)
align_anything/utils/spoc_utils/nn_utils.py:29
← previous
next →
601–700 of 3,036, ranked by callers