Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Synthetic Generation for Multilingual Instruction Tuning

Đang mở
#437 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@abhash-er đang làm issue này rồi.

Từ ngày 12/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

4.6 post-training

Goal

Generate high-quality, multilingual synthetic instruction-tuning data for the OpenEuroLLM (OELLM) project, covering 35 languages at production scale (100k samples/language), grounded in real-world topic distributions. (we can still do hand-picked categories ?)

Description

Pipeline

All of the generations would be done by synthgen. This would be the pipeline that we could follow for the generation:

          +--------------------------------------------+
          |          build-localized-prompts            |
          +--------------------------------------------+
                               |
                               v
          +--------------------------------------------+
          |           generate (mode=localized)          |
          +--------------------------------------------+
                               |   -> outputs/loc_<gen_model>.jsonl
                               v
          +--------------------------------------------+
          |             generate (mode=judge)            |
          +--------------------------------------------+
                               |   -> outputs/judged_<judge_model>.jsonl
                               v
          +--------------------------------------------+
          |   quality-filter (per-lang score thresholds) |
          +--------------------------------------------+
                               |
                               v
          +--------------------------------------------+
          |  dedupe (exact-hash, optional embedding)     |
          +--------------------------------------------+
                               |
                               v
          +--------------------------------------------+
          |   outputs/loc_full.dedup.jsonl (survivors)   |
          +--------------------------------------------+
Generation Prompt
Component What it represents
domain Topic drawn from a single taxonomy, weighted by real WildChat-1M frequency
persona (10% of rows) An optional role (e.g. "a nurse") the model may adopt if it plausibly fits the domain — dropped otherwise
general-capability layer Optional: narrow to a more specific angle within the domain, if one fits naturally
local-culture layer Optional: weave in a genuine {country}-specific fact/institution/custom
task-type layer Optional: shape as edit/rewrite or extraction/classification instead of open-ended generation, if that fits better
difficulty layer Optional: prefer a harder, more expert version of the task over the generic one, if it fits
intent No longer suggested — the model decides freely and self-reports it

Example rendering (lang=fr, domain=coding, no persona drawn):

  You are a native speaker and expert writer of French as used in France.
  Create ONE high-quality instruction-tuning example...

  Domain: coding

  Silently decide a realistic user intent that fits this domain...
  No persona: write a direct, standalone request.

  If a more specific, non-obvious general-capability angle fits naturally
  with this domain, narrow to it...

  If a genuine France-specific angle fits naturally with this domain...

  If this domain would more naturally take the shape of editing/rewriting...

  If a more specific, higher-difficulty version of this task fits naturally...

  Output JSON only, no commentary, no code fences:
  {"instruction":"...","response":"...","role_used":"...","intent_used":"..."}

Judge Prompt
Component What it represents
Holistic score (0-10) ONE score weighing both whether the task is worth training on and how well the response executes it — the weaker of the two decides the score
Disqualifying-task checks Score 0-2 regardless of response quality if the instruction is: trivial trivia, a pointless/unmotivated constraint, or not a genuine request (quiz-style) — edit/rewrite and extraction/classification are explicitly exempted as genuine tasks
Severity-based scoring (for worthwhile tasks) Scored by the single WORST problem in the response, not by counting flaws — 9-10 excellent, 7-8 good, 5-6 fair, 3-4 weak, 1-2 poor, 0 unusable
Language-note Per-language leniency guidance: individual loanwords/technical terms are fine, phonetic transliteration costs a small deduction, but a whole clause of the instruction in the wrong language is a disqualifying code-switching defect (0-3)

Example rendering (lang=fr, country=France):

  You are a strict quality filter for multilingual instruction-tuning data. You are
  fluent in French and knowledgeable about France. Only the highest-quality
  examples should be kept; low-quality data harms training.

  Give ONE holistic quality score, 0 to 10, for the example as training data...

  DISQUALIFYING TASKS — score 0-2 no matter how correct, fluent, or obedient the
  response is, if the INSTRUCTION is any of these: ...

  Otherwise the task is worthwhile — score by the SEVERITY of the single WORST
  problem in the RESPONSE...

  LANGUAGE NOTE for French: individual English loanwords or technical terms are
  FINE where French speakers use them...

  Example (French, France):
  Instruction:
  {instruction}

  Response:
  {response}

  Output JSON only, no commentary, no code fences:
  {"score": <integer 0-10>, "reason": "<one sentence>"}
Filtering and deduplication

The judge's score (0-10, from the holistic prompt above) is used in two separate stages:

  1. Quality filtering. quality_filter.py joins each generated row to its judge score by id and keeps only rows scoring at or above a per-language threshold. Unscored or errored rows are dropped, not kept-by-default.

  2. Deduplication. Only rows that survived the quality filter are deduped - exact-hash by default, plus embedding-based near-dup detection when --embedding-dedupe is set (as it is in the current production run). The judge itself plays no role in dedup beyond having already removed the low-quality rows before dedup runs.

Deliverable scope

The synthgen.localized pipeline produces a final deduped, quality-filtered dataset of ≥100k survivors per language across all 35 target languages. We would ideally also want to test it on Prelude, Qwen-3 and Apertus.

Related to: Issue #345

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
3
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenEuroLLM/Taskboard

Tất cả issue của OpenEuroLLM/Taskboard

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.