Text Generation
PEFT
Safetensors
English
lora
data-to-text
text-to-data
factual-consistency
hallucination-detection
Instructions to use Loria-MosAIk/xqdt-e2e-llama3.1-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Loria-MosAIk/xqdt-e2e-llama3.1-8b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "Loria-MosAIk/xqdt-e2e-llama3.1-8b") - Notebooks
- Google Colab
- Kaggle
Simplify model card
Browse files
README.md
CHANGED
|
@@ -16,23 +16,21 @@ tags:
|
|
| 16 |
# XQDT E2E verifier: llama 8B
|
| 17 |
|
| 18 |
This repository contains the LoRA adapter for the **llama 8B**
|
| 19 |
-
XQDT verifier
|
| 20 |
-
|
| 21 |
-
[`meta-llama/Meta-Llama-3.1-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)
|
| 22 |
-
weights are not included here.
|
| 23 |
|
| 24 |
This E2E checkpoint was trained on the joint WebNLG--E2E synthetic training set.
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
XQDT verifies alignment between English text and structured triples. It returns
|
| 29 |
-
`missing`, `extra`, and `incorrect` units, or `All correct`.
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
| 35 |
-
`smoke_test.json`.
|
| 36 |
|
| 37 |
## Prompt format
|
| 38 |
|
|
@@ -44,10 +42,6 @@ TRIPLES:
|
|
| 44 |
Output as markdown table with Type and Triple columns.
|
| 45 |
```
|
| 46 |
|
| 47 |
-
The canonical implementation uses **ms-swift PtEngine**. Transformers and vLLM
|
| 48 |
-
examples are also provided. Outputs may vary slightly across runtimes; evaluation
|
| 49 |
-
uses the parsed error units.
|
| 50 |
-
|
| 51 |
## ms-swift PtEngine
|
| 52 |
|
| 53 |
```python
|
|
@@ -118,8 +112,6 @@ print(tokenizer.decode(generated, skip_special_tokens=True))
|
|
| 118 |
|
| 119 |
## vLLM
|
| 120 |
|
| 121 |
-
Install the versions listed in `requirements.txt` before running this example.
|
| 122 |
-
|
| 123 |
```python
|
| 124 |
from huggingface_hub import snapshot_download
|
| 125 |
from vllm import LLM, SamplingParams
|
|
@@ -146,12 +138,6 @@ outputs = llm.chat(
|
|
| 146 |
print(outputs[0].outputs[0].text)
|
| 147 |
```
|
| 148 |
|
| 149 |
-
## Reproducibility
|
| 150 |
-
|
| 151 |
-
- Training configuration: `training_manifest.json`
|
| 152 |
-
- Example inputs and outputs: `smoke_test.json`
|
| 153 |
-
- Code: [https://github.com/guihuzhang/xqdt](https://github.com/guihuzhang/xqdt)
|
| 154 |
-
|
| 155 |
## Citation
|
| 156 |
|
| 157 |
```bibtex
|
|
|
|
| 16 |
# XQDT E2E verifier: llama 8B
|
| 17 |
|
| 18 |
This repository contains the LoRA adapter for the **llama 8B**
|
| 19 |
+
XQDT verifier from *XQDT: eXplainable and Quantitative Data-Text Alignment Metric
|
| 20 |
+
with Feedback Signals*. It is used with
|
| 21 |
+
[`meta-llama/Meta-Llama-3.1-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct).
|
|
|
|
| 22 |
|
| 23 |
This E2E checkpoint was trained on the joint WebNLG--E2E synthetic training set.
|
| 24 |
|
| 25 |
+
## Overview
|
| 26 |
|
| 27 |
XQDT verifies alignment between English text and structured triples. It returns
|
| 28 |
+
`missing`, `extra`, and `incorrect` units, or `All correct`. `missing` identifies
|
| 29 |
+
an input unit omitted from the text, `extra` identifies text content unsupported
|
| 30 |
+
by the input, and `incorrect` identifies an input unit realised with incorrect
|
| 31 |
+
information.
|
| 32 |
|
| 33 |
+
Example inputs and outputs are provided in `smoke_test.json`.
|
|
|
|
| 34 |
|
| 35 |
## Prompt format
|
| 36 |
|
|
|
|
| 42 |
Output as markdown table with Type and Triple columns.
|
| 43 |
```
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
## ms-swift PtEngine
|
| 46 |
|
| 47 |
```python
|
|
|
|
| 112 |
|
| 113 |
## vLLM
|
| 114 |
|
|
|
|
|
|
|
| 115 |
```python
|
| 116 |
from huggingface_hub import snapshot_download
|
| 117 |
from vllm import LLM, SamplingParams
|
|
|
|
| 138 |
print(outputs[0].outputs[0].text)
|
| 139 |
```
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
## Citation
|
| 142 |
|
| 143 |
```bibtex
|