Skip to content

Commit

Permalink
[add] fld logical formula task (EleutherAI#1931)
Browse files Browse the repository at this point in the history
  • Loading branch information
MorishT authored Jun 6, 2024
1 parent e39df01 commit 33eef48
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lm_eval/tasks/fld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ Homepage: https://github.com/hitachi-nlp/FLD

### Groups and Tasks

#### Groups

* `fld`

#### Tasks

This release is the simplified version of FLD where a model is required to predict only an answer.
This setting is described by "answer accuracy" in the original paper.

#### Tasks in Group `fld`
* `fld_default` is a basic task based on [FLD.v2](https://huggingface.co/datasets/hitachi-nlp/FLD.v2/viewer/star)
* `fld_star`: is a more challenging version based on [FLD.v2-star](https://huggingface.co/datasets/hitachi-nlp/FLD.v2/viewer/star)

#### Tasks in Group `fld_logical_formula`
Further, we have "logical formula" versions of the benchmarks, which evaluate LLMs' pure logical reasoning capabilities within the domain of logical formulas, rather than natural language:
* `fld_logical_formula_default`
* `fld_logical_formula_fld_star`


### Checklist

For adding novel benchmarks/datasets to the library:
Expand Down
21 changes: 21 additions & 0 deletions lm_eval/tasks/fld/fld_logical_formula_default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
group:
- fld_logical_formula
task: fld_logical_formula_default
dataset_path: hitachi-nlp/FLD.v2
dataset_name: default
training_split: train
validation_split: validation
test_split: test
doc_to_text: "Based on the provided facts ($context$), either prove or disprove the hypothesis or state that it is unknown. The facts and the hypothesis are written in logical formulas as follows: capital letters such as \"{A}\", \"{B}\", \"{AB}\" are predicates, small letters such as \"{a}\", \"{b}\", \"{ab}\" are constants, \"&\" is logical conjunction, \"v\" is logical disjunction, \"¬\" is negation, \"->\" is implication, \"(x)\" is \"for all x\", and \"(Ex)\" is \"for some x\". $hypothesis$ = {{hypothesis_formula}} ; $context$ = {{context_formula}} ; $proof$ = "
doc_to_target: world_assump_label
metric_list:
- metric: exact_match
aggregation: mean
higher_is_better: true
filter_list:
- name: remove_whitespace
filter:
- function: remove_whitespace
- function: take_first
metadata:
version: 2.0
3 changes: 3 additions & 0 deletions lm_eval/tasks/fld/fld_logical_formula_star.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include: fld_logical_formula_default.yaml
task: fld_logical_formula_star
dataset_name: star

0 comments on commit 33eef48

Please sign in to comment.