{
  "results": {
    "math_instruct": {
      "exact_match,none": 0.6205678398534606,
      "exact_match_stderr,none": 0.005249520342473376,
      "alias": "math_instruct"
    },
    "gsm8k_0shot_instruct": {
      "alias": " - gsm8k_0shot_instruct",
      "exact_match,none": 0.8968915845337376,
      "exact_match_stderr,none": 0.008376436987507811
    },
    "meta_math_0shot_instruct": {
      "alias": " - meta_math_0shot_instruct",
      "exact_match,none": 0.6166,
      "exact_match_stderr,none": 0.006876797660918556
    },
    "meta_math_hard_0shot_instruct": {
      "alias": " - meta_math_hard_0shot_instruct",
      "exact_match,none": 0.36027190332326287,
      "exact_match_stderr,none": 0.013198755610252931
    }
  },
  "groups": {
    "math_instruct": {
      "exact_match,none": 0.6205678398534606,
      "exact_match_stderr,none": 0.005249520342473376,
      "alias": "math_instruct"
    }
  },
  "group_subtasks": {
    "math_instruct": [
      "meta_math_hard_0shot_instruct",
      "meta_math_0shot_instruct",
      "gsm8k_0shot_instruct"
    ]
  },
  "configs": {
    "gsm8k_0shot_instruct": {
      "task": "gsm8k_0shot_instruct",
      "dataset_path": "json",
      "dataset_kwargs": {
        "data_files": "https://github.com/linkedin/ControlLLM/blob/main/src/controlllm/inference/llm_eval_harness/additional_tasks/gsm8k/test.jsonl"
      },
      "test_split": "train",
      "process_docs": "def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:\n    def _process_doc(doc: dict) -> dict:\n        # note that the orginal gsm8k data does not follow boxed format in the solution, so use the extracted answer in input_correct_responses directly as group truth here\n        # compared to additional_tasks->math->utils.py, we used the boxed string lookup from solution as groundtruth\n        out_doc = {\n            \"problem\": doc[\"input_question\"],\n            \"solution\": doc[\"solution\"] if \"solution\" in doc else doc[\"input_correct_responses\"][0],\n            \"answer\": doc[\"input_correct_responses\"][0],  # note that in meta eval dataset, input_correct_responses is: [ \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\", \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\" ], we take the first one for exact match. TODO: may need to normalize this to account for model's variations\n            \"meta_target\": doc[\"input_correct_responses\"]\n        }\n        if getattr(doc, \"few_shot\", None) is not None:\n            out_doc[\"few_shot\"] = True\n        return out_doc\n    processed_doc = dataset.map(_process_doc)\n    # # take the first 10 to debug\n    # processed_doc = processed_doc.select(range(10))\n    return processed_doc\n",
      "doc_to_text": "def doc_to_text(doc: dict) -> str:\n    input_final_prompts = doc[\"input_final_prompts\"][0]\n    if llama_eval_instruction in input_final_prompts:\n        input_final_prompts.replace(llama_eval_instruction, meta_math_instruction)\n    return input_final_prompts\n",
      "doc_to_target": "answer",
      "process_results": "def process_results(doc: dict, results: List[str]) -> Dict[str, int]:\n    candidates = results[0]\n\n    # this is the implementation of \"is output correct\" from https://github.com/Kipok/NeMo-Skills\n    # answer = extract_answer(candidates)\n\n    # if is_output_correct(answer, doc[\"answer\"]):\n    #     retval = 1\n    # else:\n    #     retval = 0\n\n    # this is the implementation of \"is output correct\" from lm-evluation-harness(same from https://github.com/meta-llama/llama-recipes/blob/main/tools/benchmarks/llm_eval_harness/meta_eval/meta_template/math_hard/utils.py)\n    last_boxed_string = last_boxed_only_string(candidates)\n    if not last_boxed_string:\n        # No boxed string found, so we can't evaluate\n        return {\"exact_match\": 0}\n    unnormalized_answer = remove_boxed(last_boxed_string)\n    answer = normalize_final_answer(unnormalized_answer)\n\n    if answer.strip() == (doc[\"answer\"].strip() if isinstance(doc[\"answer\"], str) else str(doc[\"answer\"])) or is_equiv(answer, str(doc[\"answer\"])):\n        retval = 1\n    else:\n        retval = 0\n\n    results = {\n        \"exact_match\": retval,\n    }\n    return results\n",
      "description": "",
      "target_delimiter": " ",
      "fewshot_delimiter": "\n\n",
      "num_fewshot": 0,
      "metric_list": [
        {
          "metric": "exact_match",
          "aggregation": "mean",
          "higher_is_better": true
        }
      ],
      "output_type": "generate_until",
      "generation_kwargs": {
        "until": [],
        "do_sample": false,
        "temperature": 0.0,
        "max_gen_toks": 5120
      },
      "repeats": 1,
      "should_decontaminate": false,
      "metadata": {
        "version": 1.0
      }
    },
    "meta_math_0shot_instruct": {
      "task": "meta_math_0shot_instruct",
      "dataset_path": "parquet",
      "dataset_kwargs": {
        "data_files": "https://github.com/linkedin/ControlLLM/blob/main/src/controlllm/inference/llm_eval_harness/additional_tasks/math/joined_math.parquet"
      },
      "test_split": "train",
      "process_docs": "def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:\n    def _process_doc(doc: dict) -> dict:\n        out_doc = {\n            \"problem\": doc[\"input_question\"],\n            \"solution\": doc[\"solution\"],\n            \"answer\": normalize_final_answer(\n                 remove_boxed(last_boxed_only_string(doc[\"solution\"]))\n            ),\n            # \"answer\": doc[\"input_correct_responses\"][0] if isinstance(doc[\"input_correct_responses\"], list) else doc[\"input_correct_responses\"],  # note that in meta eval dataset, input_correct_responses is: [ \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\", \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\" ], we take the first one for exact match. TODO: may need to normalize this to account for model's variations\n            \"meta_target\": doc[\"input_correct_responses\"]\n        }\n        if getattr(doc, \"few_shot\", None) is not None:\n            out_doc[\"few_shot\"] = True\n        return out_doc\n    processed_doc = dataset.map(_process_doc)\n    # # take the first 10 to debug\n    # processed_doc = processed_doc.select(range(10))\n    return processed_doc\n",
      "doc_to_text": "def doc_to_text(doc: dict) -> str:\n    return doc[\"input_final_prompts\"][0]\n",
      "doc_to_target": "answer",
      "process_results": "def process_results(doc: dict, results: List[str]) -> Dict[str, int]:\n    candidates = results[0]\n\n    # this is the implementation of \"is output correct\" from https://github.com/Kipok/NeMo-Skills\n    # answer = extract_answer(candidates)\n\n    # if is_output_correct(answer, doc[\"answer\"]):\n    #     retval = 1\n    # else:\n    #     retval = 0\n\n    # this is the implementation of \"is output correct\" from lm-evluation-harness(same from https://github.com/meta-llama/llama-recipes/blob/main/tools/benchmarks/llm_eval_harness/meta_eval/meta_template/math_hard/utils.py)\n    last_boxed_string = last_boxed_only_string(candidates)\n    if not last_boxed_string:\n        # No boxed string found, so we can't evaluate\n        return {\"exact_match\": 0}\n\n    try:\n        unnormalized_answer = remove_boxed(last_boxed_string)\n    except AssertionError:\n        # If remove_boxed fails due to an assertion error, return exact_match 0\n        return {\"exact_match\": 0}\n\n    answer = normalize_final_answer(unnormalized_answer)\n\n    if answer.strip() == (doc[\"answer\"].strip() if isinstance(doc[\"answer\"], str) else str(doc[\"answer\"])) or is_equiv(answer, str(doc[\"answer\"])):\n        retval = 1\n    else:\n        retval = 0\n\n    results = {\n        \"exact_match\": retval,\n    }\n    return results\n",
      "description": "",
      "target_delimiter": " ",
      "fewshot_delimiter": "\n\n",
      "num_fewshot": 0,
      "metric_list": [
        {
          "metric": "exact_match",
          "aggregation": "mean",
          "higher_is_better": true
        }
      ],
      "output_type": "generate_until",
      "generation_kwargs": {
        "until": [],
        "do_sample": false,
        "temperature": 0.0,
        "max_gen_toks": 5120
      },
      "repeats": 1,
      "should_decontaminate": false,
      "metadata": {
        "version": 1.0
      }
    },
    "meta_math_hard_0shot_instruct": {
      "task": "meta_math_hard_0shot_instruct",
      "dataset_path": "parquet",
      "dataset_kwargs": {
        "data_files": "https://github.com/linkedin/ControlLLM/blob/main/src/controlllm/inference/llm_eval_harness/additional_tasks/math_hard/joined_math_hard.parquet"
      },
      "test_split": "train",
      "process_docs": "def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:\n    def _process_doc(doc: dict) -> dict:\n        out_doc = {\n            \"problem\": doc[\"input_question\"],\n            \"solution\": doc[\"solution\"],\n            \"answer\": normalize_final_answer(\n                 remove_boxed(last_boxed_only_string(doc[\"solution\"]))\n            ),\n            # \"answer\": doc[\"input_correct_responses\"][0] if isinstance(doc[\"input_correct_responses\"], list) else doc[\"input_correct_responses\"],  # note that in meta eval dataset, input_correct_responses is: [ \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\", \"11\", \"11.\", \"11.0\", \"11.0.\", \"11.00\", \"11.00.\" ], we take the first one for exact match. TODO: may need to normalize this to account for model's variations\n            \"meta_target\": doc[\"input_correct_responses\"]\n        }\n        if getattr(doc, \"few_shot\", None) is not None:\n            out_doc[\"few_shot\"] = True\n        return out_doc\n    processed_doc = dataset.map(_process_doc)\n    # # take the first 10 to debug\n    # processed_doc = processed_doc.select(range(10))\n    return processed_doc\n",
      "doc_to_text": "def doc_to_text(doc: dict) -> str:\n    # remove the last \"<|start_header_id|>assistant<|end_header_id|>\\n\\n\"\n    input_final_prompt = doc[\"input_final_prompts\"][0]\n    # # Remove the last occurrence of the substring\n    # generation_prompt = \"<|start_header_id|>assistant<|end_header_id|>\\n\\n\"\n    # if input_final_prompt.endswith(generation_prompt):\n    #     input_final_prompt = input_final_prompt[:-len(generation_prompt)]\n\n    return input_final_prompt\n",
      "doc_to_target": "answer",
      "process_results": "def process_results(doc: dict, results: List[str]) -> Dict[str, int]:\n    candidates = results[0]\n\n    # this is the implementation of \"is output correct\" from https://github.com/Kipok/NeMo-Skills\n    # answer = extract_answer(candidates)\n\n    # if is_output_correct(answer, doc[\"answer\"]):\n    #     retval = 1\n    # else:\n    #     retval = 0\n\n    # this is the implementation of \"is output correct\" from lm-evluation-harness(same from https://github.com/meta-llama/llama-recipes/blob/main/tools/benchmarks/llm_eval_harness/meta_eval/meta_template/math_hard/utils.py)\n    last_boxed_string = last_boxed_only_string(candidates)\n    if not last_boxed_string:\n        # No boxed string found, so we can't evaluate\n        return {\"exact_match\": 0}\n\n    try:\n        unnormalized_answer = remove_boxed(last_boxed_string)\n    except AssertionError:\n        # If remove_boxed fails due to an assertion error, return exact_match 0\n        return {\"exact_match\": 0}\n\n    answer = normalize_final_answer(unnormalized_answer)\n\n    if answer.strip() == (doc[\"answer\"].strip() if isinstance(doc[\"answer\"], str) else str(doc[\"answer\"])) or is_equiv(answer, str(doc[\"answer\"])):\n        retval = 1\n    else:\n        retval = 0\n\n    results = {\n        \"exact_match\": retval,\n    }\n    return results\n",
      "description": "",
      "target_delimiter": " ",
      "fewshot_delimiter": "\n\n",
      "num_fewshot": 0,
      "metric_list": [
        {
          "metric": "exact_match",
          "aggregation": "mean",
          "higher_is_better": true
        }
      ],
      "output_type": "generate_until",
      "generation_kwargs": {
        "until": [],
        "do_sample": false,
        "temperature": 0.0,
        "max_gen_toks": 5120
      },
      "repeats": 1,
      "should_decontaminate": false,
      "metadata": {
        "version": 1.0
      }
    }
  },
  "versions": {
    "gsm8k_0shot_instruct": 1.0,
    "math_instruct": 1.0,
    "meta_math_0shot_instruct": 1.0,
    "meta_math_hard_0shot_instruct": 1.0
  },
  "n-shot": {
    "gsm8k_0shot_instruct": 0,
    "meta_math_0shot_instruct": 0,
    "meta_math_hard_0shot_instruct": 0
  },
  "higher_is_better": {
    "gsm8k_0shot_instruct": {
      "exact_match": true
    },
    "math_instruct": {
      "exact_match": true
    },
    "meta_math_0shot_instruct": {
      "exact_match": true
    },
    "meta_math_hard_0shot_instruct": {
      "exact_match": true
    }
  },
  "n-samples": {
    "meta_math_hard_0shot_instruct": {
      "original": 1324,
      "effective": 1324
    },
    "meta_math_0shot_instruct": {
      "original": 5000,
      "effective": 5000
    },
    "gsm8k_0shot_instruct": {
      "original": 1319,
      "effective": 1319
    }
  },
  "config": {
    "model": "LlamaPlusWrapper",
    "model_args": {
      "pretrained": "/shared/models/llama3-checkpoint-sft-padding-openmath-train-concat-lerp-8-mse-loss/hf/checkpoint-196000",
      "dtype": "bfloat16",
      "trust_remote_code": true,
      "tensor_parallel_size": 1,
      "gpu_memory_utilization": 0.8,
      "data_parallel_size": 8,
      "max_model_len": 8192,
      "cpu_offload_gb": 0,
      "enable_prefix_caching": true,
      "add_bos_token": true,
      "seed": 42,
      "register_model": "/shared/models/llama3-checkpoint-sft-padding-openmath-train-concat-lerp-8-mse-loss/hf/checkpoint-196000"
    },
    "batch_size": 8,
    "batch_sizes": [],
    "device": null,
    "use_cache": null,
    "limit": null,
    "bootstrap_iters": 100000,
    "gen_kwargs": null,
    "random_seed": 0,
    "numpy_seed": 1234,
    "torch_seed": 1234,
    "fewshot_seed": 1234
  },
  "git_hash": null,
  "date": 1735183893.393397,
  "pretty_env_info": "PyTorch version: 2.4.0+cu118\nIs debug build: False\nCUDA used to build PyTorch: 11.8\nROCM used to build PyTorch: N/A\n\nOS: CBL-Mariner/Linux (x86_64)\nGCC version: (GCC) 11.2.0\nClang version: Could not collect\nCMake version: version 3.21.4\nLibc version: glibc-2.35\n\nPython version: 3.10.14 (main, Jul 14 2024, 22:24:12) [GCC 11.2.0] (64-bit runtime)\nPython platform: Linux-5.15.158.2-1.cm2-x86_64-with-glibc2.35\nIs CUDA available: True\nCUDA runtime version: 11.8.89\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: \nGPU 0: NVIDIA A100-SXM4-80GB\nGPU 1: NVIDIA A100-SXM4-80GB\nGPU 2: NVIDIA A100-SXM4-80GB\nGPU 3: NVIDIA A100-SXM4-80GB\nGPU 4: NVIDIA A100-SXM4-80GB\nGPU 5: NVIDIA A100-SXM4-80GB\nGPU 6: NVIDIA A100-SXM4-80GB\nGPU 7: NVIDIA A100-SXM4-80GB\n\nNvidia driver version: 550.54.15\ncuDNN version: Probably one of the following:\n/usr/lib/libcudnn.so.8.9.5\n/usr/lib/libcudnn_adv_infer.so.8.9.5\n/usr/lib/libcudnn_adv_train.so.8.9.5\n/usr/lib/libcudnn_cnn_infer.so.8.9.5\n/usr/lib/libcudnn_cnn_train.so.8.9.5\n/usr/lib/libcudnn_ops_infer.so.8.9.5\n/usr/lib/libcudnn_ops_train.so.8.9.5\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture:                         x86_64\nCPU op-mode(s):                       32-bit, 64-bit\nAddress sizes:                        48 bits physical, 48 bits virtual\nByte Order:                           Little Endian\nCPU(s):                               256\nOn-line CPU(s) list:                  0-255\nVendor ID:                            AuthenticAMD\nModel name:                           AMD EPYC 7763 64-Core Processor\nCPU family:                           25\nModel:                                1\nThread(s) per core:                   2\nCore(s) per socket:                   64\nSocket(s):                            2\nStepping:                             1\nFrequency boost:                      enabled\nCPU max MHz:                          3529.0520\nCPU min MHz:                          1500.0000\nBogoMIPS:                             4900.45\nFlags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca\nVirtualization:                       AMD-V\nL1d cache:                            4 MiB (128 instances)\nL1i cache:                            4 MiB (128 instances)\nL2 cache:                             64 MiB (128 instances)\nL3 cache:                             512 MiB (16 instances)\nNUMA node(s):                         8\nNUMA node0 CPU(s):                    0-15,128-143\nNUMA node1 CPU(s):                    16-31,144-159\nNUMA node2 CPU(s):                    32-47,160-175\nNUMA node3 CPU(s):                    48-63,176-191\nNUMA node4 CPU(s):                    64-79,192-207\nNUMA node5 CPU(s):                    80-95,208-223\nNUMA node6 CPU(s):                    96-111,224-239\nNUMA node7 CPU(s):                    112-127,240-255\nVulnerability Gather data sampling:   Not affected\nVulnerability Itlb multihit:          Not affected\nVulnerability L1tf:                   Not affected\nVulnerability Mds:                    Not affected\nVulnerability Meltdown:               Not affected\nVulnerability Mmio stale data:        Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed:               Not affected\nVulnerability Spec rstack overflow:   Mitigation; safe RET, no microcode\nVulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl and seccomp\nVulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2:             Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds:                  Not affected\nVulnerability Tsx async abort:        Not affected\n\nVersions of relevant libraries:\n[pip3] flake8==7.1.1\n[pip3] flash-attn==2.6.3+cu118torch2.4cxx11abifalse\n[pip3] mypy-extensions==1.0.0\n[pip3] numpy==1.24.3\n[pip3] torch==2.4.0+cu118\n[pip3] torch-tb-profiler==0.4.1\n[pip3] torchsummary==1.5.1\n[pip3] torchvision==0.19.0+cu118\n[pip3] triton==3.0.0\n[conda] Could not collect",
  "transformers_version": "4.46.2",
  "upper_git_hash": null,
  "tokenizer_pad_token": [
    "<PAD>",
    "128256"
  ],
  "tokenizer_eos_token": [
    "<|eot_id|>",
    "128009"
  ],
  "tokenizer_bos_token": [
    "<|begin_of_text|>",
    "128000"
  ],
  "eot_token_id": 128009,
  "max_length": 8192
}