Is it this data format suitable to fine tune a mistral model on it ?
#2
by
AiModelsMarket
- opened
Hello, is it this data format suitable to fine tune a mistral model on it ? I have tried to finetune a mistral model for translation with this piece of code for dataset preparation : "from datasets import load_dataset
dataset = load_dataset("opus100", "en-ro", split="train")
def format_opus_data_for_mistral(batch):
texts = []
for example in batch['translation']:
en = example['en']
ro = example['ro']
text = f"[INST] Translate the following English text to Romanian: {en} [/INST] {ro}\n"
texts.append(text)
return {"text": texts}
dataset = dataset.map(format_opus_data_for_mistral, batched=True)" - BUT it does not worked good :( . Can you help me if you know what I do wrong ?