Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich translated dataset #3

Open
stefan-it opened this issue Mar 28, 2023 · 5 comments
Open

Enrich translated dataset #3

stefan-it opened this issue Mar 28, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@stefan-it
Copy link
Member

stefan-it commented Mar 28, 2023

Hi,

it would be a great improvement, if the translated dataset can be enriched with more data or fields:

  • The Original data (instruction, input and output) can be included to have a better comparison of original and translated data.
  • Add support for different translation models.
  • Field that is e.g. named review_needed should be added. Problematic or wrong examples can be detected (automatically or manual) and can then be flagged.

On Slack we had the discussion about markdown tables. So one could easily write a markdown table detection script and flag the found examples with the review_needed option, so that these examples can be reviewed later.

Another issue to be discussed: do we want to "override" the existing translated_german_alpaca.json? Or should we introduce a new file for that? But is more than one "dataset" confusing?

Concrete implementation

Concrete implementation steps would be to introduce the following new keys for each example in the dataset:

  • instruction
  • input
  • output
  • review_needed (Boolean, default: false).
  • translations with instruction, input and output as keys

Proof of concept

One example entry of that enriched dataset could look like:

{
    "instruction": "Give three tips for staying healthy.",
    "input": "",
    "output": "1. Eat a balanced diet and make sure to include plenty of fruits and vegetables. \n2. Exercise regularly to keep your body active and strong. \n3. Get enough sleep and maintain a consistent sleep schedule.",
    "translations": {
        "instruction": [
            {"facebook/wmt19-en-de": "Geben Sie drei Tipps, um gesund zu bleiben."},
            {"deepl/formality.less": "Gib drei Tipps, um gesund zu bleiben."}
        ],
        "input": [
            {"facebook/wmt19-en-de": ""},
            {"deepl/formality.less": ""}
        ],
        "output": [
            {"facebook/wmt19-en-de": "1. Ern\u00e4hren Sie sich ausgewogen und sorgen Sie f\u00fcr reichlich Obst und Gem\u00fcse. \n2. Sport treiben Sie regelm\u00e4\u00dfig, um Ihren K\u00f6rper aktiv und stark zu halten. \n3. Erhalten Sie gen\u00fcgend Schlaf und halten Sie einen gleichm\u00e4\u00dfigen Schlafplan."},
            {"deepl/formality.less": "1. ern\u00e4hre dich ausgewogen und achte darauf, dass du viel Obst und Gem\u00fcse isst. \n2. Treibe regelm\u00e4\u00dfig Sport, um deinen K\u00f6rper aktiv und stark zu halten. \n3. Schlafe ausreichend und halte dich an einen festen Schlafrhythmus."}
        ]
    },
    "review_needed": false
},
@stefan-it stefan-it added the enhancement New feature or request label Mar 28, 2023
@PhilipMay
Copy link
Member

For me this sounds a bit like we need a real database with GUI and dataset versioning.

@stefan-it
Copy link
Member Author

@stefan-it
Copy link
Member Author

Ok, here's my favorite one: https://twitter.com/dvilasuero/status/1641164559888142336 (powered by @dvsrepo) 🤗

@stefan-it
Copy link
Member Author

We use Argilla now: #6

It also allows us to add metadata (translation model and original id) as well as sentence embeddings. Argilla itself allows us to label/flag a certain example into several categories, which can be seen as more sophisticated as just a review_needed flag.

@axenov
Copy link

axenov commented Apr 3, 2023

Have you seen https://github.com/thisserand/alpaca-lora-finetune-language?
There the dataset was translated into German via Google Translator, DeepL and GPT 3.5. What do you think about including them in the dataset as different translation versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants