|
--- |
|
language: ja |
|
tags: |
|
- t5 |
|
- text2text-generation |
|
- pilota |
|
license: apache-2.0 |
|
--- |
|
|
|
# Pilota model for dialogs |
|
|
|
A model for [Pilota](https://github.com/megagonlabs/pilota) trained with [Accommodation Search Dialog Corpus](https://github.com/megagonlabs/asdc) and other additional examples |
|
|
|
- ``scud`` |
|
- Fine tuned model of [t5-base-japanese-web (with Byte-fallback, 8K)](https://huggingface.co/megagonlabs/t5-base-japanese-web-8k) |
|
- The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
|
- ``scorer`` |
|
- Fine tuned model of [LINE DistilBERT Japanese](https://huggingface.co/line-corporation/line-distilbert-base-japanese) |
|
- The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
|
|
|
## Usage |
|
|
|
1. Install [Pilota](https://github.com/megagonlabs/pilota) |
|
2. Prepare inputs |
|
- Command |
|
|
|
```bash |
|
echo -e 'ใ่ฆๆใใ็ฅใใใใ ใใ\tใฏใใ้จๅฑใใๅฏๅฃซๅฑฑใ่ฆใใฆใๅคๆฏใ่ฆใชใใ้ฃไบใฎใงใใใใใซใใใใชใ\nใใใซใกใฏ\tใใใซใกใฏ' | python -m pilota.convert.plain2request | tee input.jsonl |
|
``` |
|
|
|
- Output |
|
|
|
```jsonl |
|
{"context": [{"name": "agent", "text": "ใ่ฆๆใใ็ฅใใใใ ใใ"}], "utterance": "ใฏใใ้จๅฑใใๅฏๅฃซๅฑฑใ่ฆใใฆใๅคๆฏใ่ฆใชใใ้ฃไบใฎใงใใใใใซใใใใชใ", "sentences": null, "meta": {}} |
|
{"context": [{"name": "agent", "text": "ใใใซใกใฏ"}], "utterance": "ใใใซใกใฏ", "sentences": null, "meta": {}} |
|
``` |
|
|
|
3. Feed it to Pilota |
|
- Command |
|
|
|
```console |
|
pilota -m megagonlabs/pilota_dialog --batch_size 1 --outlen 60 --nbest 1 --beam 5 < input.jsonl |
|
``` |
|
|
|
- Output |
|
|
|
```jsonl |
|
[{"scuds_nbest": [[]], "original_ranks": [0], "scores": [0.9911208689212798], "scores_detail": [{"OK": 0.9704028964042664, "incorrect_none": 0.04205145686864853, "lack": 0.0007874675211496651, "limited": 0.0003119863977190107, "non_fluent": 0.0002362923405598849, "untruth": 0.0013080810895189643}], "sentence": "ใฏใใ"}, {"scuds_nbest": [["้จๅฑใใๅฏๅฃซๅฑฑใ่ฆใใใใใซใ่ฏใใ", "ๅคๆฏใ่ฆใชใใ้ฃไบใฎใงใใใใใซใ่ฏใใ"]], "original_ranks": [0], "scores": [0.9952289938926696], "scores_detail": [{"OK": 0.9840966463088989, "incorrect_none": 0.010280555114150047, "lack": 0.0032871251460164785, "limited": 0.00041511686868034303, "non_fluent": 0.0002954243100248277, "untruth": 0.003289491171017289}], "sentence": "้จๅฑใใๅฏๅฃซๅฑฑใ่ฆใใฆใๅคๆฏใ่ฆใชใใ้ฃไบใฎใงใใใใใซใใใใชใ"}] |
|
[{"scuds_nbest": [[]], "original_ranks": [0], "scores": [0.9831213414669036], "scores_detail": [{"OK": 0.9704028964042664, "incorrect_none": 0.04205145686864853, "lack": 0.0007874675211496651, "limited": 0.0003119863977190107, "non_fluent": 0.0002362923405598849, "untruth": 0.0013080810895189643}], "sentence": "ใใใซใกใฏ"}] |
|
``` |
|
|
|
## License |
|
|
|
Apache License 2.0 |
|
|