Skip to content

feat(sensenova): add validated OCR LoRA training recipe - #407

Draft
leviking98z-rgb wants to merge 1 commit into
Tencent-Hunyuan:mainfrom
leviking98z-rgb:feat/sensenova-ocr-lora-recipe
Draft

feat(sensenova): add validated OCR LoRA training recipe#407
leviking98z-rgb wants to merge 1 commit into
Tencent-Hunyuan:mainfrom
leviking98z-rgb:feat/sensenova-ocr-lora-recipe

Conversation

@leviking98z-rgb

Copy link
Copy Markdown
Collaborator

Summary

  • add a validated 32-GPU trainside FlowGRPO recipe for sensenova/SenseNova-U1.5-8B-MoT-SFT using LoRA rank 64 / alpha 128, learning rate 3e-4, six samples per prompt, 320×320 generation, six inference steps, and 300 rollouts
  • make the local OCR reward consistently use PaddleOCR plus normalized Levenshtein similarity, with Unicode-aware normalization and edit/substring/exact/counter-IoU diagnostic components
  • surface reward-component means during diffusion evaluation and add the short-text train/eval prompt splits used for reward-curve validation
  • align the eval dependencies and installation docs with the OCR implementation

Related Issue

N/A

Test Plan

  • python3.12 -m compileall -q unirl
  • SKIP=no-commit-to-branch pre-commit run --files INSTALL.md datasets/ocr/README.md datasets/ocr/short_text_test.txt datasets/ocr/short_text_train.txt examples/diffusion/sensenova_u1_5/sensenova_u1_5_ocr_trainside_lora_4x8.yaml pyproject.toml requirements.txt setup.py unirl/reward/local/ocr.py unirl/trainer/diffusion.py --show-diff-on-failure
  • H20 environment dependency check: PaddlePaddle 3.2.2, PaddleOCR 3.5.0, and python-Levenshtein 0.27.4
  • Hydra resolution on an H20 node: python -m unirl.train_diffusion --config-name=diffusion/sensenova_u1_5/sensenova_u1_5_ocr_trainside_lora_4x8 --cfg job --resolve
  • one-off assertions (not committed) for LoRA/config values, deterministic eval sampling, Unicode target extraction, normalized Levenshtein behavior, and short-split provenance/filtering
  • end-to-end training validation: 4×8 NVIDIA H20 GPUs; sensenova/SenseNova-U1.5-8B-MoT-SFT; the included short-text split; checkpoint checkpoint-134 (optimizer_step=268). On the fixed 32-prompt eval set, mean reward increased from 0.3786 at step 0 to 0.9070 at step 130, and exact match increased from 0.1562 to 0.6562. W&B run: https://wandb.ai/leviking98z-zhejiang-university/tmp/runs/1w1gbj0l

Compatibility / Risk

  • The eval extra now installs the dependencies actually used by the local OCR scorer (paddlepaddle, paddleocr, and python-Levenshtein) instead of EasyOCR.
  • OCR execution is CPU-backed and may be a throughput bottleneck outside the validated 4×8 setup.
  • The new reference recipe requires 32 GPUs by default; users can override paths and logging destinations through the documented environment interpolations.

Reviewer Notes

  • AI assistance was used to implement and validate this change; the full diff and generated artifacts were reviewed before publication.
  • Duplicate-work check on August 31, 2026 found no open OCR/SenseNova recipe PR or issue. Open PR feat(sensenova): add vLLM-Omni rollout #393 concerns the separate vLLM-Omni rollout backend.
  • Checkpoints, W&B files, launcher scripts, and reward-ablation artifacts are intentionally not included.

Checklist

  • I reviewed the changed code and removed unrelated/generated artifacts.
  • I updated tests, docs, and configs where needed, or explained why not.

@github-actions github-actions Bot added the wip Draft / work in progress label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wip Draft / work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant