Training a model for XRPL development

I fine-tuned Qwen2.5-Coder to generate code for the XRP Ledger. I started with the 1.5B model in 4-bit MLX form on Apple Silicon, using LoRA and QLoRA to adapt it to domain-specific tasks. I preserved a JavaScript specialist branch and explored broader JavaScript and Python tasks in the CookieThinker-XRPL experiments. I later trained a 7B model with PEFT and QLoRA on RunPod.

The work included building and revising datasets, configuring training runs, saving checkpoints and writing evaluations for the generated code. I used examples that distinguish similar-looking SDK operations and added targeted corrections for recurring errors.

Testing the generated code

XRPL development requires careful choices about which APIs read public data, which operate on a wallet’s state and which submit transactions. I built evaluation cases around those boundaries, along with numeric conversions, JavaScript/Python API differences and invented methods. A response could explain the intended operation correctly while still generating the wrong call.

For later experiments, I used an internal 18-prompt evaluation focused on those SDK choices. I scored the code without awarding extra credit for a correct route label in the explanation. That let me compare checkpoints on whether they generated the required operation. My experiment reports record the test scope and generation settings alongside the results.

Comparing training and selection methods

I tested longer generated reasoning, revised supervision and a DoRA diagnostic branch. Some runs reduced validation loss while still failing important SDK cases. I kept those failures and checkpoint regressions in the experiment record and used them to revise the examples.

I also trained compact verifier models and tried selecting among four candidate answers. I tracked verifier results and candidate-selection results separately from single-answer generation because they involve different tasks and additional computation. Short DPO and ORPO experiments exposed further problems, including repetitive output and training instability.

The 7B run produced the strongest generator results in my later comparison on the internal evaluation. That comparison used a small XRPL-specific test set; I recorded the test scope and generation settings with the results.