May 18, 2026

Example: Notes on Fine-Tuning Qwen for Arabic Legal Embeddings

  • Arabic NLP
  • Legal AI
  • Fine-tuning
๐Ÿ‘‹ This is a placeholder post that ships with the blog template, so the related-posts and share-link system has something real to demonstrate. Replace this paragraph โ€” and everything below it โ€” with your own writing, or delete the post and its entry in posts/.

Most embedding benchmarks are English-first, which means "state of the art" often quietly means "state of the art if your documents are in English." Arabic legal text breaks a lot of those assumptions โ€” script, morphology, and domain vocabulary all shift at once.

Starting point

An open-source Qwen model, adapted rather than trained from scratch โ€” the base model's multilingual pretraining gives it a real head start on Arabic, but general-purpose Arabic understanding and legal-domain Arabic understanding are not the same thing.

What actually moved the needle

  • Domain-specific hard negatives mattered more than raw data volume.
  • Evaluation had to be legal-expert-reviewed, not just held-out accuracy โ€” a wrong-but-plausible retrieval is a worse failure mode here than a low-confidence miss.
  • Reranking on top of the fine-tuned embeddings closed most of the remaining gap.

This is placeholder body copy โ€” swap in the real write-up, numbers, and what didn't work.