Skip to content

Mistral optimalization - #3

Open
michalspiegel wants to merge 1 commit into
eagle_optimalizationfrom
mistral_optimalization
Open

Mistral optimalization#3
michalspiegel wants to merge 1 commit into
eagle_optimalizationfrom
mistral_optimalization

Conversation

@michalspiegel

Copy link
Copy Markdown
Collaborator

Tried to manually optimalize mistral techniques on languages cz, sk, en, es.

Findings:

  • With current prompts/techniques, the model often misunderstands the instruction, speaks in a different language (english almost always)
  • Tried direct non-instruct prompt (no instruction, just the social post in the prompt and we let the model continue generating it further). Works better but the model still has a tendency to generate mainly in english.
  • The model does not seem to perform well on more low-resouce languages, e.g. slovak text is often gramatically incorrect:
############## Prompt ##############
http://slovakia.waist.trainer.live-promotions.ro/

Ladné ženské krivky sú výraznou črtou Kim Kardashian. A zdá sa, že táto hviezda reality show si našla spôsob, ako ich ešte vylepšiť. Jej novou vášňou sú korzety, ktoré zužujú pás.
O tom, že Kim zbožňuje selfies, sme vedeli už dlho. Len nedávno

############## Response ##############
http://slovakia.waist.trainer.live-promotions.ro/

Ladné ženské krivky sú výraznou črtou Kim Kardashian. A zdá sa, že táto hviezda reality show si našla spôsob, ako ich ešte vylepšiť. Jej novou vášňou sú korzety, ktoré zužujú pás.
O tom, že Kim zbožňuje selfies, sme vedeli už dlho. Len nedávno
vypúšťala v svojej instagramové sieti prekvapujúci selfie. Má
vyslúžiť zbožňovaný žiar. Také si ale vyžaduje aj nové šaty a módne
akcesúry. Ako chodzi?

Kim Kardashian vzala fotku svých žiadnych korziet. Táto
############## Prompt ##############
http://bit.ly/2yT2RS3

Infarkt a mŕtvica vedú takmer k 70% všetkých úmrtí na svete. Sedem ľudí z desiatich zomrie v dôsledku upchatia cievy v srdci alebo mozgu.

############## Response ##############
http://bit.ly/2yT2RS3

Infarkt a mŕtvica vedú takmer k 70% všetkých úmrtí na svete. Sedem ľudí z desiatich zomrie v dôsledku upchatia cievy v srdci alebo mozgu.

Meningitida a krvane do mozna obvaha nám znesvára neskoro, ale my toho nedobudneme, kedže v ľudstve umenia prôhladnosť pretiach nespojom s vzrastom.

Skrúška krvi ako onemocnenie je v ľudstve nespojitá,
  • This occurs almost always

@kopalja
kopalja changed the base branch from main to eagle_optimalization April 1, 2024 15:26

@kopalja kopalja left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalspiegel nice findings. Indeed, mistral does not perform well on low resources languages. I guess we wont use this one to generate social media posts in multilingual setting.

Comment thread mistral.py
Comment on lines +38 to 42
#instruction = f"Your goal is to paraphrase text in {LANGUAGE_CODE_MAP[language]} using different words and sentence composition. Responde with only paraphrased text and nothing else. Text to paraphrase:"
prompt = f"{text}\n"
for _ in range(iterations):
prompt = [{"role": "user", "content": f"{instruction} {text}"}]
#prompt = [{"role": "user", "content": f"{instruction} {text}"}]
response = self.query(prompt)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paraphrase implementation is not correct as prompt does not change and we keep asking the same question.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. For this experiment, I used always only 1 iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants