size_categories:1K<n<10K format:parquet modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
dataset_info:
  features:
  - name: messages
    list:
    - name: content
      dtype: string
    - name: role
      dtype: string
  splits:
  - name: train
    num_bytes: 224640
    num_examples: 1000
  download_size: 119367
  dataset_size: 224640
datasets:
- maxidl/LeoLM-HellaSwag_de-fixed
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---
# English Q, German A

Data set to fine-tune a model to respond in German.

Created from a fixed LeoLM Hellaswag [dataset](https://huggingface.co/datasets/maxidl/LeoLM-HellaSwag_de-fixed?row=0) using this code:
```
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("maxidl/LeoLM-HellaSwag_de-fixed", split='train')

# Function to keep only the conversation column renamed to 'messages' and remove all other columns
def format_to_messages(example):
    return {'messages': [{"role": "user", "content": example['ctx']}, {"role": "assistant", "content": example['endings_de'][-1]}]}

# Apply the transformation
messages_dataset = dataset.map(format_to_messages, remove_columns=dataset.column_names)

print(messages_dataset)
```
