File size: 813 Bytes
d1a8e7e
 
 
 
 
 
 
 
 
 
 
897c2d5
 
 
8d28a45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: Transformer
emoji: 🌍
colorFrom: pink
colorTo: green
sdk: docker
pinned: false
license: mit
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

To force a specific transformer model in Spaces, set the `MODEL_NAME` environment variable, for example:

`fnlp/bart-base-chinese`

## Training and evaluation

For local fine-tuning and metric collection:

```bash
python train.py --train-path data/train.jsonl --valid-path data/valid.jsonl --output-dir outputs/bart_cn
python evaluate.py --test-path data/test.jsonl --model-name outputs/bart_cn --output-csv metrics_report.csv
```

The evaluation script prints and exports:

- `ROUGE-L`
- `BERTScore`
- `QAFactEval` when an external QAFactEval environment is available
- length hit rate
- average latency