Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Yinhan-Lu/many-shot-ICL4LRL

Domain:

natural language processing

Record type:

papersoftware
Creator:
Yin
Host:
Codebase for the paper "An Empirical Study of Many-Shot In-Context Learning for Machine Translation of Low-Resource Languages" # An Empirical Study of Many-Shot In-Context Learning for Machine Translation of Low-Resource Languages **arXiv:** 2604.02596 **Authors:** Yinhan Lu, Gaganpreet Jhajj, Chen Zhang, Anietie Andy, David Ifeoluwa Adelani --- ## Quickstart Smallest end-to-end run — eng→Oro, 5-shot BM25 ICL with Gemini, on data from a public HuggingFace dataset (no token required): ```bash pip install -e . # 1. Data: Oro parallel corpus (public HF dataset howard-nlp/ibom-mt) python scripts/data/prepare_ibom_parallel_corpus.py --lang oro # 2. Prepare 5-shot BM25 inputs (997 requests) python -m manyshot_icl.pipeline.prepare_ibom_series \ --experiments bm25_random --languages oro --models gemini --shots 5 --no-chunking # 3. Inference (get a key at aistudio.google.com) export GOOGLE_API_KEY=... python -m manyshot_icl.pipeline.realtime_api \ --input-file experiments/bm25_random_ibom_997/batch_inputs/eng2oro/gemini_5shot.jsonl \ --output-dir experiments/bm25_random_ibom_997/batch_outputs/eng2oro/gemini_5shot \ --model-type gemini # 4. Evaluate (spBLEU / chrF++) python evaluation/evaluate_manyshot.py \ --batch-dir experiments/bm25_random_ibom_997/batch_outputs \ --data-dir data/parallel_corpus --skip-comet ``` The full experiment grids are driven by the per-experiment runners below. --- ## Repository structure ``` manyshot_icl/ # pipeline library: prompt construction, BM25/embedding # retrieval, request preparation, realtime inference client experiments/ # one runner per research question (prepare -> infer -> evaluate) # scaling/ retrieval/ domain/ ordering/ finetuning/ dictionary/ evaluation/ # spBLEU / chrF++ evaluators and result aggregation scripts/data/ # dataset acquisition and format converters configs/ # languages, models, and the paper's shot grid docs/DATA.md # per-dataset acquisition instructions ``` --- ## Experiments Each research question is driven by a dedicated runner script: | Experiment | Ru …

Visit

github.com

Languages

Oro

Licenses

MIT

Similar

Beyond Many-Shot Translation: Scaling In-Context Demonstrations For Low-Resource Machine TranslationDetection of Settlements in Tanzania and Mozambique by Many Regional Few-Shot ModelsAn Empirical Study of Many-Shot In-Context Learning for Machine Translation of Low-Resource LanguagesËtt bi | Lu Defu WaxuSettlements Lu Documentation of GoemaiToucan: Many-to-Many Translation for 150 African Language Pairs

Beyond Many-Shot Translation: Scaling In-Context Demonstrations For Low-Resource Machine Translation

Building machine translation (MT) systems for low-resource languages is notably difficult due to the

Detection of Settlements in Tanzania and Mozambique by Many Regional Few-Shot Models

An Empirical Study of Many-Shot In-Context Learning for Machine Translation of Low-Resource Languages

In-context learning (ICL) allows large language models (LLMs) to adapt to new tasks from a few examp

Ëtt bi | Lu Defu Waxu

Ëtt bi | Lu Defu Waxu

Settlements Lu Documentation of Goemai

A description of Goemai settlements (villages and compounds). This project documents the Goemai lang

Toucan: Many-to-Many Translation for 150 African Language Pairs

We address a notable gap in Natural Language Processing (NLP) by introducing a collection of resourc