safetensors llama rag evaluation text-generation en arxiv:2409.06595 base_model:meta-llama/Meta-Llama-3-8B base_model:quantized:meta-llama/Meta-Llama-3-8B license:llama3 8-bit bitsandbytes region:us
---
base_model: meta-llama/Meta-Llama-3-8B
language:
- en
license: llama3
pipeline_tag: text-generation
tags:
- rag
- evaluation
---

# Model Card for Model ID

Llama-3-8B-GroUSE is a Grounded QA evaluator and evaluates four metrics: Answer relevancy, Completeness, Faithfulness and Usefulness. 

### Task explanation

Grounded QA is usually the last step of a RAG pipeline: given a question and a set of documents retrieved from the corpus, a LLM must generate an answer to the question. We expect the LLM to cite from which document each information is coming, as depicted below. When no precise answer is in the documents the LLM should indicate it in its answer. If some related information are available in the documents, the LLM can add them to the answer to show the corpus is not completely off topic with the question.

<img src="grounded_qa_cases.png" alt="Schema showing an example depending on whether the references contain a precise answer, only related information or no information. For each case there is an example of references and ground truth answer. The question is common to the three cases : What is the relationship between Pluto and Neptune. Case 1 : the references contain a precise answer. Reference 1 :  More than 200 objects in 2:3 resonance are known (meaning they complete exactly 2 revolutions around the Sun when Neptune completes 3), among which are Pluto and its moons. Reference 2 : Pluto’s axis of rotation is tilted at 57.5 degrees relative to its orbital plane, which is quite high and unusual in the Solar System. Reference 3 : On the left: view of a cardiac cycle, of a systolic-diastolic oscillating flow, characteristic of circulatory arrest. Ground truth answer : The 3:2 orbital resonance relationship between Pluto and Neptune means that for every 3 revolutions of Neptune around the Sun, Pluto completes 2 [reference 1 citation]. Case 2 : References only contain related information. The reference 1 containing a precise information was removed, the two others are left. Ground truth answer : No document seems to precisely answer your question. However, the documents indicate that : Pluto’s axis of rotation is tilted at 57.5 degrees [reference 2 citation]. Case 3 : References contain no answer nor related information. Reference 1 and 2 were removed, only reference 3 which is off topic if left. Ground truth answer : No document seems to precisely answer your question." style="width:800px;"/>

We propose 6 metrics to evaluate the quality of a grounded QA answer : 
- **Answer relevancy** assesses the relevance of the information provided in the answer regarding the question, using a Likert scale (1 to 5).
- **Completeness** also uses a Likert scale to evaluate whether all relevant information from  the documents is present in the answer.
- **Faithfulness** is a binary score that checks if all facts in the answer are accurate and correctly attributed to the corresponding document.
- In adversarial cases and when additional information is provided, **Usefulness** is a binary score that determines if the provided additional information is indeed useful and relevant to the question.
- **Positive Acceptance** and **Negative Rejection** are binary scores indicating a true positive and a true negative respectively in identifying whether the question is answerable. These metrics' values can be infered from the other metrics' values and are thus not predicted by the model.

<details> <summary> Positive Acceptance and Negative Rejection algorithm </summary>

```python
def get_positive_acceptance_negative_rejection(
    answer_relevancy: int | None, completeness: int | None
) -> tuple[int | None]:
    if answer_relevancy is None:
        if completeness is None:
            positive_acceptance = 1
            negative_rejection = 1
        else:
            positive_acceptance = 0
            negative_rejection = None
    else:
        if completeness is None:
            positive_acceptance = None
            negative_rejection = 0
        else:
            positive_acceptance = None
            negative_rejection = None
    return positive_acceptance, negative_rejection
```

</details>

###  Model Details

- **Developed by:** Sacha Muller
- **Funded by:** Illuin Technology
- **Language:** English
- **License:** Llama-3
- **Finetuned from model:** [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B)

### Model Sources

- **Repository:** [github.com/illuin-tech/grouse](https://github.com/illuin-tech/grouse)
- **Paper:** [arxiv.org/abs/2409.06595](https://arxiv.org/abs/2409.06595)


## How to Get Started with the Model

The model requires 4 elements in the input: a user request, references retrieved from a corpus based on the user request, a ground truth answer, and the answer you want to evaluate. We expect the citations to be of the form [i] where i is the number of the reference containing the information preceding the citation. 

To use the model, replace the {{text}} indications in the prompt below with the appropriate elements. Feel free to add or remove references if needed, the model was trained using samples with up to ten references.

<details> <summary> Full prompt </summary>

```
USER: [TASK]
Task: Grounded Question Answering
Based solely on the content of the references, the objective is to generate a response to the user's query. Each statement must be followed by the reference of the source passage, in the format [i] where i is the number of the reference. If no passage seems relevant, the answer should begin with "No document seems to precisely answer your question" and may be supplemented with related sourced information.
[/TASK]
[EVALUATION INSTRUCTIONS]
I will provide you with two answers, numbered 1 and 2, each containing a response to the user request.
I want you to assign grades to each answer according to four criteria: relevancy, completeness, usefulness, and faithfulness.

ANSWER RELEVANCY: 
I want you to assign to each answer a relevancy grade between 1 and 5:
- Answer relevancy evaluates if the content of the answer accurately responds to the user's question.
- The truthfulness of the information in the answer does not impact relevancy: even if information that appears false is contained in the answer, as long as this information is related to the request, then relevancy should not decrease. Remember that this information could come from references mentioning imaginary content that you are unaware of: the only thing to evaluate to assign the relevancy grade is therefore the adequacy between the information in the answer and the request, NOT their truthfulness.
- The absence of information in the answer does not impact relevancy, only the information contained in the answer is evaluated.
- Answer relevancy cannot be evaluated if the answer mentions that no document responds to the user request, it is then `null`, regardless of whether it contains other information or not.
Before assigning each grade, you will check that the answer does not contain "No document responds...", if this is the case you must put a grade of `null`. If this is not the case, you will then analyze the adequacy between the request and the information contained in the answer.

Answer relevancy scale:
null - The answer asserts that no document precisely responds to the user request. Even if it provides additional information, whether appropriate or not, the relevancy remains `null`.
5 - The answer has excellent relevancy. All information provided in the answer is in line with the question and precisely answers the user request.
4 - The answer achieves good relevancy by providing relevant information to answer the user question. Some information indicated does not exactly answer the question, but remains in line with the request.
3 - The answer has average relevancy, it contains information that allows responding to the user request, but it also contains superfluous information, which was not necessary to answer the request.
2 - The answer shows low relevancy, with some elements related to the request, but the majority of the content is not in line with the question asked.
1 - The answer has very low relevancy, not answering the user's question at all. The content is largely inappropriate or off-topic, delivering no useful information for the request.

COMPLETENESS:
I want you to assign to each answer a completeness grade between 1 and 5:
- The only condition for an answer to be complete is the presence in it of at least all the information from the references that are relevant to the question asked.
- The presence of unrelated information in the answer does not impact completeness.
- The presence of information in the answer not from the references does not impact completeness.
- Possible errors in the sources citing the references do not impact completeness.
- Completeness cannot be evaluated if the references contain no information that can precisely answer the user request, in which case the grade takes the value `null`.
Before assigning each grade, you will always start by analyzing the information found in the references that are relevant to the user request. If there is no relevant information in the references, completeness must be `null`. If there are relevant information in the references, you will analyze which portion of this information is present or absent in the answers to evaluate the completeness grade.

Completeness scale:
null - The references contained no relevant information to precisely answer the user's question. In this case, there is no need to read the content of the answer to know that the grade is `null`.
5 - The answer is very complete, it contains all the relevant information from the references. No essential information is omitted, ensuring complete coverage of the question asked.
4 - The answer covers most of the relevant information in depth. It integrates the references satisfactorily, covering the majority of key points. Some details may be missing, but overall, the answer is substantial.
3 - The answer reasonably addresses a number of relevant aspects. It integrates part of the necessary information from the references. However, gaps remain, impacting the overall completeness.
2 - The answer only covers a minimal part of the relevant information. It misses several important information from the references.
1 - The answer covers none of the relevant information, all relevant information from the references has been omitted in the answer.

USEFULNESS:
I want you to assign to each answer a usefulness grade of 0 or 1:
- Usefulness is only evaluated when the answer says that no document precisely answers the user's question, but it still provides information related to the question.
- Usefulness measures how interesting the related information is to know for the user, given that there is no answer in the references.
- If the answer responds to the user request, usefulness must be `null`.
- If the answer indicates that no document responds to the user request, without adding other information, usefulness must be `null`.
Before assigning each grade, you will start by verifying that the answer indeed asserts "No document responds...", then you will check that the answer contains related information in addition to this assertion. If one of these two conditions is `false` then usefulness must be `null`. If both conditions are indeed true, then you will analyze the usefulness of having added this related information to evaluate the usefulness grade.

Usefulness scale:
null - (The answer responds to the user request) OR (the answer does not answer the user's question AND does not provide any related information).
1 - The related information is generally related to the question and adds value to the general understanding of the topic.
0 - The related information is completely off-topic with respect to the question asked.

FAITHFULNESS: 
I want you to assign to each answer a boolean faithfulness grade. An answer is faithful if:
- Each statement made by the answer is followed by a source indicating the reference from which it is drawn.
- The information preceding the source is indeed from the corresponding reference.
- The information preceding the source is in agreement with the corresponding reference, and does not assert facts different from those indicated in the reference.
In all other cases, the response is considered non-faithful.
Faithfulness is also considered non-measurable if the answer asserts that no document responds to the question, and it does not provide any related information, it is then `null`.
Before assigning each grade, you will start by verifying that the answer does not only assert "No document responds...", without any other information. If this is the case, then faithfulness must be `null`. Otherwise, I want you to analyze by explaining for each sentence, one after the other, if 1) a reference follows the sentence, 2) the reference following the sentence is correct, and 3) if the sentence does not distort or modify the content of the references.

Faithfulness scale:
null - The answer asserts that no document responds to the question, and does not provide any related information.
1 - All sentences in the answer cite their sources, and are in agreement with the cited sources.
0 - At least one sentence in the response does not cite its sources, or cites a wrong source, or modifies the content from the references, or asserts something that is not supported by the cited references.

Your response should be in JSON format, respecting the following format:
{
    "answer_relevancy": {
        "answer_1": {
            "answer_affirms_no_document_answers": X,
            "answer_relevancy_justification": "...",
            "answer_relevancy": Y
        },
        "answer_2": {
            "answer_affirms_no_document_answers": X,
            "answer_relevancy_justification": "...",
            "answer_relevancy": Y
        }
    },
    "completeness": {
        "answer_1": {
            "completeness_justification": "...",
            "completeness": Y
        },
        "answer_2": {
            "completeness_justification": "...",
            "completeness": Y
        }
    },
    "usefulness": {
        "answer_1": {
            "answer_affirms_no_document_answers": X,
            "answer_contains_related_information": X,
            "usefulness_justification": "...",
            "usefulness": Z
        },
        "answer_2": {
            "answer_affirms_no_document_answers": X,
            "answer_contains_related_information": X,
            "usefulness_justification": "...",
            "usefulness": Z
        }
    },
    "faithfulness": {
        "answer_1": {
            "answer_only_asserts_no_document_answers": X,
            "content_analysis_sentence_by_sentence": [
                {
                    "sentence": "...",
                    "criterion_1": "...",
                    "criterion_2": "...",
                    "criterion_3": "..."
                },
                ...
            ],
            "faithfulness_justification": "...",
            "faithfulness": Z
        },
        "answer_2": {
            "answer_only_asserts_no_document_answers": X,
            "content_analysis_sentence_by_sentence": [
                {
                    "sentence": "...",
                    "criterion_1": "...",
                    "criterion_2": "...",
                    "criterion_3": "..."
                },
                ...
            ],
            "faithfulness_justification": "...",
            "faithfulness": Z
        }
    }
}
Where "..." is a string, X is a boolean, Y is an integer between 1 and 5 or `null`, and Z is an integer that is 0 or 1 or `null`.
[/EVALUATION INSTRUCTIONS]
[SAMPLE]
List of references :
Reference 1: {{reference_1}}
Reference 2: {{reference_2}}
Reference 3: {{reference_3}}
Reference 4: {{reference_4}}
Reference 5: {{reference_5}}
User request: {{user_request}}
[/SAMPLE]
[TO EVALUATE]
Answer 1: {{ground_truth}}
Answer 2: {{prediction_to_evaluate}}
[/TO EVALUATE]
```
</details>

After this, you should apply the conversation template : 

```python
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("illuin/llama-3-grouse")

formatted_conversation = tokenizer.apply_chat_template(
    [{"role": "user", "content": "[TASK] ... [/TO EVALUATE]"}],
    tokenize=False,
    add_generation_prompt=True,
)
```

You can now feed this input to the model to get evaluations.





## Evaluation


The performances are measured on the [GroUSE dataset](https://huggingface.co/datasets/illuin/grouse) as well as with correlation with GPT-4 using the validation set. 

<table>
  <thead>
    <tr>
      <td colspan="2"></td>
      <th colspan="7">Agreement rate of metrics on GroUSE</th>
    </tr>
    <tr>
      <th></th>
      <th></th>
      <th>Answer relevancy</th>
      <th>Completeness</th>
      <th>Usefulness</th>
      <th>Faithfulness</th>
      <th>Positive acceptance</th>
      <th style="border-right: 1px solid;">Negative rejection</th>
      <th>Total test pass rate</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="11"><em>Each metric evaluated in a separate prompt</em></td>
      <td><strong>GPT-4</strong></td>
      <td><strong>91.67</strong></td>
      <td><strong>88.89</strong></td>
      <td><strong>100.0</strong></td>
      <td>92.36</td>
      <td><strong>98.61</strong></td>
      <td style="border-right: 1px solid;"><strong>98.61</strong></td>
      <td><strong>95.02</strong></td>
    </tr>
    <tr>
      <td><strong>GPT-4o</strong></td>
      <td>79.17</td>
      <td>77.08</td>
      <td>97.92</td>
      <td>92.36</td>
      <td>83.33</td>
      <td style="border-right: 1px solid;">83.33</td>
      <td>85.53</td>
    </tr>
    <tr>
      <td><strong>GPT-4-turbo</strong></td>
      <td>90.28</td>
      <td>85.42</td>
      <td>97.22</td>
      <td><strong>93.75</strong></td>
      <td>94.44</td>
      <td style="border-right: 1px solid;">94.44</td>
      <td>92.59</td>
    </tr>
    <tr>
      <td><strong>GPT-3.5-turbo</strong></td>
      <td>88.89</td>
      <td>50.00</td>
      <td>80.56</td>
      <td>68.06</td>
      <td>77.78</td>
      <td style="border-right: 1px solid;">61.81</td>
      <td>71.18</td>
    </tr>
    <tr>
      <td><strong>Gemini 1.0 Pro</strong></td>
      <td>78.47</td>
      <td>75.69</td>
      <td>97.22</td>
      <td>78.47</td>
      <td>84.72</td>
      <td style="border-right: 1px solid;">84.72</td>
      <td>83.22</td>
    </tr>
    <tr>
      <td><strong>Mixtral 8x7b Instruct</strong></td>
      <td>81.25</td>
      <td>61.11</td>
      <td>81.25</td>
      <td>72.22</td>
      <td>76.39</td>
      <td style="border-right: 1px solid;">75.69</td>
      <td>74.65</td>
    </tr>
    <tr>
      <td><strong>Mixtral 8x22b Instruct</strong></td>
      <td>80.56</td>
      <td>68.75</td>
      <td>81.94</td>
      <td>83.33</td>
      <td>76.39</td>
      <td style="border-right: 1px solid;">72.22</td>
      <td>77.20</td>
    </tr>
    <tr>
      <td><strong>Prometheus 2 7b</strong></td>
      <td>72.22</td>
      <td>41.67</td>
      <td>16.67</td>
      <td>38.19</td>
      <td>73.61</td>
      <td style="border-right: 1px solid;">74.31</td>
      <td>52.78</td>
    </tr>
    <tr>
      <td><strong>Prometheus 2 8x7b</strong></td>
      <td>61.81</td>
      <td>25.00</td>
      <td>34.03</td>
      <td>72.22</td>
      <td>67.36</td>
      <td style="border-right: 1px solid;">69.44</td>
      <td>54.98</td>
    </tr>
    <tr>
      <td><strong>Llama-3 70b Instruct</strong></td>
      <td>90.28</td>
      <td>63.89</td>
      <td>76.39</td>
      <td>73.61</td>
      <td>85.42</td>
      <td style="border-right: 1px solid;">85.42</td>
      <td>79.17</td>
    </tr>
    <tr>
      <td><strong>Llama-3 8b Instruct</strong></td>
      <td>85.42</td>
      <td>49.31</td>
      <td>80.56</td>
      <td>59.72</td>
      <td>72.92</td>
      <td style="border-right: 1px solid;">68.06</td>
      <td>69.33</td>
    </tr>
    <tr>
      <td rowspan="2"><em>All metrics with one prompt</em></td>
      <td><strong>Llama-3 8b Instruct</strong></td>
      <td>31.25</td>
      <td>18.06</td>
      <td>34.03</td>
      <td>56.94</td>
      <td>52.78</td>
      <td style="border-right: 1px solid;">46.53</td>
      <td>39.93</td>
    </tr>
    <tr>
      <td><strong>Finetuned Llama 3 8b</strong></td>
      <td>88.89</td>
      <td>81.94</td>
      <td>81.25</td>
      <td>52.78</td>
      <td>91.67</td>
      <td style="border-right: 1px solid;">91.67</td>
      <td>81.37</td>
    </tr>
    <tr>
      <td><em>Adapted protocol</em></td>
      <td><strong>Human annotators</strong></td>
      <td>98.96</td>
      <td>96.88</td>
      <td>97.92</td>
      <td>97.72</td>
      <td>98.96</td>
      <td style="border-right: 1px solid;">100.0</td>
      <td>98.44</td>
    </tr>
  </tbody>
</table>


<table>
  <thead>
    <tr>
      <td colspan="2"></td>
      <th colspan="6"><strong>Correlation with GPT-4 on validation set</strong></th>
    </tr>
    <tr>
      <td colspan="2"></td>
      <th colspan="2" style="border-right: 1px solid;"><strong>Spearman correlation</strong></th>
      <th colspan="4"><strong>F1-score</strong></th>
    </tr>
    <tr>
      <th></th>
      <th></th>
      <th><em>Answer relevancy</em></th>
      <th style="border-right: 1px solid;"><em>Completeness</em></th>
      <th><em>Usefulness</em></th>
      <th><em>Faithfulness</em></th>
      <th><em>Positive acceptance</em></th>
      <th><em>Negative rejection</em></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="8"><em>Each metric evaluated in a separate prompt</em></td>
      <td><strong>GPT-3.5-turbo</strong></td>
      <td>0.55</td>
      <td style="border-right: 1px solid;">0.68</td>
      <td>0.76</td>
      <td>0.48</td>
      <td>0.63</td>
      <td>0.47</td>
    </tr>
    <tr>
      <td><strong>Gemini 1.0 Pro</strong></td>
      <td>0.63</td>
      <td style="border-right: 1px solid;">0.68</td>
      <td>0.48</td>
      <td>0.67</td>
      <td>0.78</td>
      <td>0.74</td>
    </tr>
    <tr>
      <td><strong>Mixtral 8x7b Instruct</strong></td>
      <td>0.59</td>
      <td style="border-right: 1px solid;">0.43</td>
      <td>0.70</td>
      <td>0.61</td>
      <td>0.63</td>
      <td>0.57</td>
    </tr>
    <tr>
      <td><strong>Mixtral 8x22b Instruct</strong></td>
      <td>0.70</td>
      <td style="border-right: 1px solid;">0.66</td>
      <td>0.61</td>
      <td><strong>0.79</strong></td>
      <td><strong>0.83</strong></td>
      <td>0.70</td>
    </tr>
    <tr>
      <td><strong>Prometheus 2 (7b)</strong></td>
      <td>0.60</td>
      <td style="border-right: 1px solid;">0.51</td>
      <td>0.29</td>
      <td>0.55</td>
      <td>0.55</td>
      <td>0.49</td>
    </tr>
    <tr>
      <td><strong>Prometheus 2 (8x7b)</strong></td>
      <td>0.64</td>
      <td style="border-right: 1px solid;">0.62</td>
      <td>0.30</td>
      <td>0.75</td>
      <td>0.69</td>
      <td>0.50</td>
    </tr>
    <tr>
      <td><strong>Llama-3 70b Instruct</strong></td>
      <td><strong>0.74</strong></td>
      <td style="border-right: 1px solid;"><strong>0.74</strong></td>
      <td><strong>0.93</strong></td>
      <td>0.78</td>
      <td>0.75</td>
      <td><strong>0.79</strong></td>
    </tr>
    <tr>
      <td><strong>Llama-3 8b Instruct</strong></td>
      <td>0.63</td>
      <td style="border-right: 1px solid;">0.71</td>
      <td>0.42</td>
      <td>0.72</td>
      <td>0.54</td>
      <td>0.44</td>
    </tr>
    <tr>
      <td rowspan="2"><em>All metrics with one prompt</em></td>
      <td><strong>Llama-3 8b Instruct</strong></td>
      <td>0.46</td>
      <td style="border-right: 1px solid;">0.23</td>
      <td>0.18</td>
      <td>0.47</td>
      <td>0.40</td>
      <td>0.46</td>
    </tr>
    <tr>
      <td><strong>Finetuned Llama-3 8b</strong></td>
      <td>0.62</td>
      <td style="border-right: 1px solid;">0.57</td>
      <td>0.41</td>
      <td>0.57</td>
      <td>0.79</td>
      <td>0.74</td>
    </tr>
  </tbody>
</table>

## Training Details

### Training Data

Given 1200 grounded QA statements, we used the following list of models to generate the predictions : 
- 412 answers were generated using a [llama-7b](https://huggingface.co/huggyllama/llama-7b) finetuned on a Grounded QA answering task. 
- 333 answers were generated using a [bloom-1b1](bigscience/bloom-1b1) finetuned on a Grounded QA answering task. 
- 319 answers were generated using a [llama-13b](https://huggingface.co/huggyllama/llama-13b) finetuned on a Grounded QA answering task. 
- 136 answers were generated using a [OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B)

Various temperatures and top_k values were used in a goal to generate answers with a wide range of quality. All these samples were then evaluated using GPT-4, using one prompt for each metric.

A thousand samples were used for the training and 200 samples kept for validation.

### Training Procedure

#### Training Hyperparameters

The finetuning was conducted using the [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) model, employing an 8-bit quantization scheme to optimize memory efficiency. The model was trained to accommodate a sequence length of 7104 tokens, with sample packing enabled to maximize the utilization of input data. We utilized the LoRA (Low-Rank Adaptation) technique using an adapter with parameters set to $r = 32$, $\alpha=16$, and a dropout rate of $0.05$.

Training was performed with a batch size of 64 over the course of three epochs, which took 2 hours on one A100 PCIe with 80GB of VRAM. The optimization process employed the AdamW algorithm with an 8-bit implementation. A cosine learning rate scheduler was used, with a learning rate of $2.10^{-4}$ and 10 warmup steps. Two other trainings were conducted with learning rates $2.10^{-3}$ and $2.10^{-5}$, but the results were less promising.

The training was realised using [Axolotl](https://github.com/axolotl-ai-cloud/axolotl).

<details> <summary>Full Axolotl config</summary>

```yaml
base_model: meta-llama/Meta-Llama-3-8B
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer

load_in_8bit: true
load_in_4bit: false
strict: false

datasets:
  - path: [path to train dataset]
    type: sharegpt
    field_human: USER
    field_model: ASSISTANT
    data_files:
      - [path to train dataset]
    split: 
test_datasets: 
  - path: [path to validation dataset]
    type: sharegpt
    field_human: USER
    field_model: ASSISTANT
    data_files:
      - [path to validation dataset]
    split: train


output_dir: ./outputs/llama-3-8b_grouse

sequence_len: 7104
sample_packing: true
pad_to_sequence_len: true

adapter: lora
lora_model_dir:
lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:

wandb_project: sourced-synthesis-evaluator
wandb_entity: 
wandb_watch:
wandb_name:
wandb_log_model: end

gradient_accumulation_steps: 32
micro_batch_size: 2
num_epochs: 3
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002

train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false

gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
s2_attention:

warmup_steps: 10
evals_per_epoch: 1
eval_table_size:
eval_max_new_tokens: 2048
eval_sample_packing: false
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
   pad_token: <|end_of_text|>
```

</details>


## Bias, Risks, and Limitations

We opted to perform a single evaluation call to assess the generated answers. While this approach simplifies the evaluation process, it makes the task harder for the model. In addition, our experiments were conducted within a single domain, specifically using Wikipedia as the knowledge base. Consequently, our findings may not generalize to out-of-domain scenarios. Future work should include diverse domains to test the robustness and adaptability of our evaluation framework. Lastly, the model we finetuned is small: although this approach demonstrated significant improvements, it would be beneficial to explore the effects of finetuning larger models, which could potentially yield even better performance.

## Environmental Impact

- **Hardware Type:** A100 PCIe with 80GB of VRAM 
- **Time used:** 120 minutes
- **Cloud Provider:** RunPod
- **Compute Region:** Unknown

## Citation

```
@misc{muller2024grouse,
      title={GroUSE: A Benchmark to Evaluate Evaluators in Grounded Question Answering}, 
      author={Sacha Muller and António Loison and Bilel Omrani and Gautier Viaud},
      year={2024},
      eprint={2409.06595},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2409.06595}, 
}
```


## Model Card Contact

For any question about the model please contact [antonio.loison@illuin.tech](mailto:antonio.loison@illuin.tech) or [gautier.viaud@illuin.tech](mailto:gautier.viaud@illuin.tech).