SYMBOL INDEX (165 symbols across 22 files) FILE: evaluate.py function add_evaluation_specific_args (line 11) | def add_evaluation_specific_args(parser): function find_all_tasks (line 21) | def find_all_tasks(all_task_config_path): function evaluate_all_tasks (line 31) | def evaluate_all_tasks(data_path, model, tokenizer, all_task_config_path... function main (line 39) | def main(): FILE: evaluation/configs.py class TaskType (line 8) | class TaskType(Enum): class BaseConfig (line 16) | class BaseConfig(YAMLWizard): method __post_init__ (line 32) | def __post_init__(self): class MultiChoiceTaskConfig (line 37) | class MultiChoiceTaskConfig(BaseConfig): class GenerationTaskConfig (line 43) | class GenerationTaskConfig(BaseConfig): class LanguageModelTaskConfig (line 55) | class LanguageModelTaskConfig(BaseConfig): FILE: evaluation/dataset.py function pad_batch (line 20) | def pad_batch(tokens, position_ids, attention_mask, max_seq_length): class EvaluationDataset (line 32) | class EvaluationDataset(torch.utils.data.Dataset, ABC): method __init__ (line 42) | def __init__(self, path: Union[str, List[str]], config: BaseConfig): method has_collate_fn (line 57) | def has_collate_fn(self) -> bool: method collate_fn (line 60) | def collate_fn(self, samples): method process_single_file (line 63) | def process_single_file(self, path): method process_single_item (line 70) | def process_single_item(self, item) -> dict: method __len__ (line 73) | def __len__(self): class GenerationTaskDataset (line 77) | class GenerationTaskDataset(EvaluationDataset): method process_single_item (line 80) | def process_single_item(self, item): method has_collate_fn (line 88) | def has_collate_fn(self) -> bool: method collate_fn (line 91) | def collate_fn(self, samples): method build_generation_sample (line 116) | def build_generation_sample(text, max_gen_length, use_task_mask, unidi... method __getitem__ (line 157) | def __getitem__(self, idx): class MultiChoiceTaskDataset (line 169) | class MultiChoiceTaskDataset(EvaluationDataset): method __init__ (line 172) | def __init__(self, path, config: MultiChoiceTaskConfig): method has_collate_fn (line 177) | def has_collate_fn(self) -> bool: method collate_fn (line 180) | def collate_fn(self, samples): method process_single_item (line 206) | def process_single_item(self, item): method build_multiple_choice_sample (line 233) | def build_multiple_choice_sample( method __getitem__ (line 299) | def __getitem__(self, idx): class LanguageModelTaskDataset (line 312) | class LanguageModelTaskDataset(EvaluationDataset): method process_single_file (line 317) | def process_single_file(self, path): method process_single_item (line 339) | def process_single_item(self, item): method __len__ (line 342) | def __len__(self): method __getitem__ (line 345) | def __getitem__(self, idx): FILE: evaluation/metrics.py function accuracy_metric (line 17) | def accuracy_metric(predictions, examples): function F1_metric (line 26) | def F1_metric(predictions, examples): function precision_metric (line 36) | def precision_metric(predictions, examples): function recall_metric (line 46) | def recall_metric(predictions, examples): function normalize_answer (line 56) | def normalize_answer(s): function f1_score (line 75) | def f1_score(prediction, ground_truth): function exact_match_score (line 88) | def exact_match_score(prediction, ground_truth): function metric_max_over_ground_truths (line 92) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): function qa_evaluate (line 102) | def qa_evaluate(predictions, examples, metric): function calculate_perplexity (line 120) | def calculate_perplexity(loss: List[float], data): function special_for_dataset (line 124) | def special_for_dataset(predictions, examples): FILE: evaluation/model.py function batch_filling_sequence (line 9) | def batch_filling_sequence( class ModelForEvaluation (line 78) | class ModelForEvaluation(torch.nn.Module): method __init__ (line 79) | def __init__(self, model): method process_data (line 86) | def process_data(batch, device): method cond_log_prob (line 93) | def cond_log_prob(self, batch) -> List[List[float]]: method generate_text (line 121) | def generate_text(self, sample, strategy, return_all_beams=False) -> U... method calculate_loss (line 181) | def calculate_loss(self, batch) -> List[float]: FILE: evaluation/tasks.py class BaseTask (line 22) | class BaseTask(ABC): method config_class (line 29) | def config_class(cls) -> Type[BaseConfig]: method metrics (line 33) | def metrics(self) -> Dict[str, Callable]: method __init__ (line 36) | def __init__(self, model: ModelForEvaluation, tokenizer: _IceTokenizer... method get_file_groups (line 45) | def get_file_groups(self): method evaluate (line 59) | def evaluate(self): method report_single_metrics (line 107) | def report_single_metrics(self, file: str, result_dict: Dict[str, floa... method calc_group_metrics (line 114) | def calc_group_metrics(result_dict_group: Dict[str, Tuple[Dict[str, fl... method report_group_metrics (line 130) | def report_group_metrics(self, group_name, result_dict_group: Dict[str... method report_overall_metrics (line 146) | def report_overall_metrics(self, result_dict_all: Dict[str, Tuple[Dict... method predict_single_batch (line 150) | def predict_single_batch(self, batch) -> List[Any]: method build_dataset (line 154) | def build_dataset(self, relative_path: str) -> EvaluationDataset: class GenerationTask (line 158) | class GenerationTask(BaseTask, ABC): method config_class (line 162) | def config_class(cls): method build_dataset (line 165) | def build_dataset(self, relative_path): method __init__ (line 168) | def __init__(self, model: ModelForEvaluation, tokenizer: _IceTokenizer... method predict_single_batch (line 189) | def predict_single_batch(self, batch) -> List[List[int]]: class MultiChoiceTask (line 194) | class MultiChoiceTask(BaseTask, ABC): method config_class (line 198) | def config_class(cls): method build_dataset (line 201) | def build_dataset(self, relative_path): method predict_single_batch (line 204) | def predict_single_batch(self, batch) -> List[int]: class LanguageModelTask (line 209) | class LanguageModelTask(BaseTask, ABC): method config_class (line 213) | def config_class(cls): method build_dataset (line 216) | def build_dataset(self, relative_path): method predict_single_batch (line 219) | def predict_single_batch(self, batch) -> List[float]: FILE: evaluation/utils.py function print_rank_0 (line 7) | def print_rank_0(*args, **kwargs): function build_data_loader (line 12) | def build_data_loader(dataset, micro_batch_size, num_workers, drop_last,... function gather_result (line 35) | def gather_result(prediction, total_length, micro_batch_size): function get_tokenized_input (line 55) | def get_tokenized_input(item, key): FILE: generate.py function add_generation_specific_args (line 16) | def add_generation_specific_args(parser): function isEnglish (line 24) | def isEnglish(s): function get_masks_and_position_ids (line 33) | def get_masks_and_position_ids(seq, mask_position, max_gen_length, gmask... function fill_blanks (line 51) | def fill_blanks(raw_text: str, model, tokenizer, strategy) -> Tuple[List... function main (line 159) | def main(args): FILE: generation/strategies.py class BaseStrategy (line 6) | class BaseStrategy: method __init__ (line 7) | def __init__(self, batch_size, invalid_slices=[], temperature=1., top_... method is_done (line 20) | def is_done(self) -> bool: method forward (line 23) | def forward(self, logits, tokens, mems, temperature=None): method finalize (line 45) | def finalize(self, tokens, mems): class BeamSearchStrategy (line 50) | class BeamSearchStrategy: method __init__ (line 51) | def __init__( method _init_cache (line 74) | def _init_cache(self): method _add_end_beams (line 82) | def _add_end_beams(self, score, beam, batch_idx): method is_done (line 94) | def is_done(self) -> bool: method forward (line 97) | def forward(self, logits, tokens, mems): method finalize (line 181) | def finalize(self, tokens, mems): FILE: initialize.py function add_bminf_args (line 14) | def add_bminf_args(parser): function add_quantization_args (line 23) | def add_quantization_args(parser): function add_initialization_args (line 30) | def add_initialization_args(parser): function initialize (line 40) | def initialize(extra_args_provider): function initialize_model_and_tokenizer (line 55) | def initialize_model_and_tokenizer(args): FILE: kernels/__init__.py class Kernel (line 11) | class Kernel: method __init__ (line 12) | def __init__(self, filename: str, function_names: List[str]): function compress_int4_weight (line 37) | def compress_int4_weight(weight: torch.Tensor): # (n, m) function extract_weight_to_half (line 58) | def extract_weight_to_half(weight: torch.Tensor, scale_list: torch.Tenso... FILE: quantization/__init__.py function quantize (line 7) | def quantize(model, weight_bit_width): FILE: quantization/functional.py class W8A16Linear (line 6) | class W8A16Linear(torch.autograd.Function): method forward (line 8) | def forward(ctx, inp: torch.Tensor, quant_w: torch.Tensor, scale_w: to... method backward (line 20) | def backward(ctx, grad_output: torch.Tensor): FILE: quantization/layers.py class QuantizedColumnParallelLinear (line 14) | class QuantizedColumnParallelLinear(ColumnParallelLinear): method __init__ (line 15) | def __init__(self, weight_bit_width: int, weight=None, *args, **kwargs): method forward (line 36) | def forward(self, input_): class QuantizedRowParallelLinear (line 51) | class QuantizedRowParallelLinear(RowParallelLinear): method __init__ (line 52) | def __init__(self, weight_bit_width: int, weight=None, *args, **kwargs): method forward (line 73) | def forward(self, input_): FILE: tasks/ethnic/crows-pair/tasks.py class CrowsPairTask (line 18) | class CrowsPairTask(MultiChoiceTask, ABC): method build_dataset (line 21) | def build_dataset(self, relative_path): method predict_single_batch (line 24) | def predict_single_batch(self, batch) -> List[int]: method CrowsPairMetric (line 28) | def CrowsPairMetric(self, predictions, examples): method report_single_metrics (line 52) | def report_single_metrics(self, file: str, result_dict: Dict[str, floa... method metrics (line 56) | def metrics(self): method report_group_metrics (line 59) | def report_group_metrics(self, group_name, result_dict_group: Dict[str... class CrowsPairDataset (line 68) | class CrowsPairDataset(MultiChoiceTaskDataset): method __init__ (line 72) | def __init__(self, path, config: MultiChoiceTaskConfig): method process_single_item (line 77) | def process_single_item(self, item): FILE: tasks/ethnic/stereoset/tasks.py class StereoSetTask (line 19) | class StereoSetTask(MultiChoiceTask, ABC): method build_dataset (line 22) | def build_dataset(self, relative_path): method predict_single_batch (line 25) | def predict_single_batch(self, batch) -> List[int]: method report_group_metrics (line 35) | def report_group_metrics(self, group_name, result_dict_group: Dict[str... method StereoSetMetric (line 49) | def StereoSetMetric(self, predictions, examples): method report_single_metrics (line 76) | def report_single_metrics(self, file: str, result_dict: Dict[str, floa... method metrics (line 80) | def metrics(self): class StereoSetDataset (line 84) | class StereoSetDataset(MultiChoiceTaskDataset): method __init__ (line 87) | def __init__(self, path, config: MultiChoiceTaskConfig): method process_single_item (line 92) | def process_single_item(self, item): FILE: tasks/lambada/strategy.py class BeamSearchStrategyForLAMBADA (line 4) | class BeamSearchStrategyForLAMBADA(BeamSearchStrategy): method __init__ (line 5) | def __init__(self, *args, banned_prefix=[], **kwargs): method forward (line 9) | def forward(self, logits, tokens, mems): FILE: tasks/lambada/task.py function exact_match_score (line 10) | def exact_match_score(prediction, ground_truth): class LAMBADA (line 14) | class LAMBADA(GenerationTask): method metrics (line 16) | def metrics(self): method __init__ (line 19) | def __init__(self, model, tokenizer, config_path): method get_first_word_tokens (line 43) | def get_first_word_tokens(self, tokens): method predict_single_batch (line 47) | def predict_single_batch(self, batch): FILE: tasks/language-modeling/pile.py function calculate_bpb_score (line 14) | def calculate_bpb_score(loss: List[float], data: List[Dict]): class Pile (line 30) | class Pile(LanguageModelTask): method metrics (line 32) | def metrics(self) -> Dict[str, Callable]: method build_dataset (line 35) | def build_dataset(self, relative_path): method report_single_metrics (line 38) | def report_single_metrics(self, file: str, result_dict: Dict[str, floa... method report_group_metrics (line 41) | def report_group_metrics( method report_overall_metrics (line 51) | def report_overall_metrics(self, result_dict_all: Dict[str, Tuple[Dict... class PileDataset (line 55) | class PileDataset(LanguageModelTaskDataset): method __len__ (line 56) | def __len__(self): method process_single_file (line 59) | def process_single_file(self, path): FILE: tasks/mmlu/task.py class MMLU (line 76) | class MMLU(MultiChoiceTask): method report_overall_metrics (line 77) | def report_overall_metrics(self, result_dict_all: Dict[str, Tuple[Dict... FILE: tools/convert_tp.py function parse_arguments (line 38) | def parse_arguments(): function merge_weights (line 52) | def merge_weights( function create_checkpoint (line 101) | def create_checkpoint( function main (line 126) | def main(args): FILE: tools/tokenize_pile.py function get_data (line 10) | def get_data(line):