ZICQ
中 Log in / Sign up
ZICQ Info LLMs & Foundation Models #Qwen #Legal AI #Model Training #Fine-Tuning Strategy #Reinforcement Learning

Reddit User Trains Polish Legal AI Model with Qwen: Challenges and Strategies

Avatar of Mr.Xu

By Mr.Xu Community Post

Published:

中文阅读 (Chinese) English Version

Summary:A Reddit user shares their progress and challenges in training a Polish legal AI model using the Qwen3.5-9B-BASE model. The project aims to create an AI assistant capable of handling Polish legal issues, providing intelligent Q&A, generating legal documents, and demonstrating reasoning capabilities. The user details the completed consecutive pre-training (CPT) stages, dataset composition, and current dilemmas, such as transforming the base model into a reasoning-capable agent, choosing appropria


Project Background and Goals

The goal of this project is to build a Polish legal AI model that can replace existing AI legal tools (such as Opus). The model needs to handle general Q&A tasks, demonstrate a deep understanding of Polish law, generate complex legal documents, perform anonymization, and provide legal reasoning support.

Completed Work

The user has completed the following pre-training (CPT) stages, each consisting of approximately 80M tokens:

  1. Complex Legal Commentaries: Pre-training on Polish legal commentaries.
  2. Legislative Documents (EU + Local): Pre-training on EU and Polish legislative documents.
  3. Court Decisions: Pre-training on court decisions.

The data sources were not mixed, and each stage continued from the previous checkpoint. In a small Polish financial/legal multiple-choice quiz (a preliminary evaluation), all stages performed slightly better than the base model, with the legislative documents stage showing the best results.

Current Challenges and Questions

  1. Model Transformation and Fine-Tuning Strategy: "How do I turn this base model into a reasoning-capable agent?" The user is confused about how to proceed with subsequent fine-tuning (SFT) and reinforcement learning (RL), especially regarding how to teach the model to reason.

  2. Data Selection and Processing: "Should I continue CPT on the remaining sources, or start SFT? For example, the Facebook legal Q&A data is real but unreliable. How should I handle this data?" The user has various data sources, including Facebook legal Q&A, certified institution-authored Q&A, legal study materials, and Claude Code-style conversations, but is unsure how to choose and process these data for optimal results.

  3. Training for Reasoning: "Should I start with high-quality Q&A and teach the model to answer questions, or should I first teach it to reason?" The user has considered using other models to generate reasoning chains but is concerned about their accuracy and believes that directly injecting "synthetic reasoning" may suffer from post-hoc issues.

  4. Tool Use and RL Integration: The user plans to first make the model a regular chatbot and then teach it to use tools for reasoning. However, the user also considers whether to start teaching reasoning through tool use from the start. Additionally, the user is unsure about when to introduce RL and how to design the reward mechanism.

Possible Solutions

The user proposes one possible training path:

  1. Current CPT Checkpoint → High-Quality Q&A SFT → Grounded Reasoning/Tool-Use SFT → RL in the Harness

However, the user is not committed to this order and seeks advice on whether they are missing an important stage or inventing unnecessary ones.

Future Goals

The user hopes the final model will:

  • Have a good intuition and understanding of Polish law.
  • Be good at anonymizing documents.
  • Generate complex legal summaries for court decisions.
  • Generate graphs from legislature and court decisions.
  • Create/edit/review contracts.

Resources and Recommendations

The user welcomes any suggestions on data selection, fine-tuning strategies, RL application, and related resources. The user mentions that existing RL documentation is inadequate and hopes to find better resources.


Source: Reddit r/MachineLearning (2026-10-28)

— END —

Tags: #Qwen #Legal AI #Model Training #Fine-Tuning Strategy #Reinforcement Learning

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

Community Comments

Loading live comments and annotations…