Add model card for GRACE
Browse filesThis PR adds a comprehensive model card for the GRACE generator model. It includes:
- Relevant metadata (license, library_name, and pipeline_tag).
- Links to the paper [GRACE: Discriminator-Guided Chain-of-Thought Reasoning](https://huggingface.co/papers/2305.14934) and the official GitHub repository.
- A brief description of the stepwise guided decoding approach.
- The official citation from the paper.
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- reasoning
|
| 7 |
+
- chain-of-thought
|
| 8 |
+
- math
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# GRACE: Discriminator-Guided Chain-of-Thought Reasoning
|
| 12 |
+
|
| 13 |
+
This model is part of the work presented in the paper [GRACE: Discriminator-Guided Chain-of-Thought Reasoning](https://huggingface.co/papers/2305.14934).
|
| 14 |
+
|
| 15 |
+
GRACE (Guiding chain-of-thought ReAsoning with a CorrectnEss Discriminator) is a stepwise decoding approach that steers the decoding process towards producing correct reasoning steps. It employs a step-level verifier or discriminator trained with a contrastive loss over correct and incorrect steps, which is used during decoding to score next-step candidates based on their correctness.
|
| 16 |
+
|
| 17 |
+
## Resources
|
| 18 |
+
- **Paper:** [GRACE: Discriminator-Guided Chain-of-Thought Reasoning](https://huggingface.co/papers/2305.14934)
|
| 19 |
+
- **GitHub Repository:** [https://github.com/mukhal/grace](https://github.com/mukhal/grace)
|
| 20 |
+
- **Authors:** Muhammad Khalifa, Lajanugen Logeswaran, Moontae Lee, Honglak Lee, Lu Wang
|
| 21 |
+
|
| 22 |
+
## Sample Usage
|
| 23 |
+
The official implementation for running guided decoding using this model can be found in the GitHub repository. Below is an example of how to run the GRACE decoding:
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
WANDB_MODE=disabled python run_grace.py \
|
| 27 |
+
--model_name_or_path mkhalifa/flan-t5-large-gsm8k \
|
| 28 |
+
--in_file data/gsm8k/dev.jsonl \
|
| 29 |
+
--task gsm8k \
|
| 30 |
+
--disc_path ckpts/discrim/flan-t5-gsm8k/ \
|
| 31 |
+
--beta 0.1 --n_candidate_steps 20 --generation_type step-score \
|
| 32 |
+
--step_sampling_method top_p --device2 cuda:0 --top_p .95 --sample_calc true \
|
| 33 |
+
--max_steps 6 --max_step_length 60 --step_delimiter '|' --temperature .8 --n_self_consistency 1 --seed 42
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Citation
|
| 37 |
+
If you use this work, please cite the following paper:
|
| 38 |
+
```bibtex
|
| 39 |
+
@article{khalifa2023grace,
|
| 40 |
+
title={Grace: Discriminator-guided chain-of-thought reasoning},
|
| 41 |
+
author={Khalifa, Muhammad and Logeswaran, Lajanugen and Lee, Moontae and Lee, Honglak and Wang, Lu},
|
| 42 |
+
journal={arXiv preprint arXiv:2305.14934},
|
| 43 |
+
year={2023}
|
| 44 |
+
}
|
| 45 |
+
```
|