Vision LoRA on CORD-v2
Train a LoRA adapter on receipt images, deploy it, and score the validation split. Row format: OpenAI Chat Model with Images. Model notes: Nemotron Vision-Language Models.
PROFILE selects the hardware:
super-vl: the upstream Automodel CORD-v2 recipe on one node of 8 GPUs, rank 64, 4 epochs (400 steps on 800 rows at global batch 8). Measured on 8x B200: about 19 minutes of training, and the adapter raises CORD-v2 exact match from 0.00 to 0.47 on 100 validation receipts. Scores, and the one setting that differs from upstream, are on Nemotron Vision-Language Models.qwen3-vl-8b:Qwen/Qwen3-VL-8B-Instruct, one 48 GB GPU, rank 16, 300/30 rows. Not a Super VL result.
Set PROFILE = "qwen3-vl-8b" without a cluster. LoRA fits one 48 GB GPU.
Prerequisites
- A CLI context pointed at your platform.
- The Python SDK (
pip install "nemo-helix[all]"), plusdatasetsandpillow. - For
super-vl: 8x 80 GB Hopper or Blackwell GPUs, and a weights volume of at least 300Gi for the BF16 checkpoint. - For
qwen3-vl-8b: one 48 GB GPU. - A Hugging Face token if the checkpoint is gated.
1. Choose a profile
2. Initialize the client
3. Prepare CORD-v2
Automodel does not convert the Hugging Face dataset. This writes train/train.jsonl, validation/validation.jsonl, and a sibling images/ directory under ./cord-v2. Image URLs are relative to the fileset root. Labels are the json2token string of the first gt_parses entry, which is the CORD scoring target.
4. Upload the fileset
The trailing slash is on the source path. Without it, put keeps the cord-v2/ prefix and the image paths no longer resolve.
5. Register the model
Super VL needs trust_remote_code. Wait until spec.has_vision_tower is true. Until the spec fills in, a dry run treats the model as text-only and rejects the image rows.
6. Dry-run, then train
processor_arguments sets the processor’s size, which bounds the pixels, and therefore the image tokens, before the vision tower. Qwen3-VL reads size; other models read different keys, so check the processor config. max_seq_length is the token cap after that: the recipe truncates longer samples, and replaces a sample when truncation would split image tokens. The 8B profile uses 4096 so a receipt at this pixel ceiling still fits.
The super-vl profile sets lora.target_modules and leaves exclude_modules unset. Left to its default, the compiler freezes the vision tower and also excludes the Mamba *.out_proj on this checkpoint, which adapts 232 of the recipe’s 272 modules. The ten patterns in lora_target_modules select all 272. They match nothing in the vision tower: the job reports 177,012,736 trainable parameters, the same count as the upstream recipe. A job that sets target_modules does not get the compiler’s vision excludes, so keep the patterns specific. target_modules and exclude_modules cannot be combined. The qwen3-vl-8b profile leaves both unset.
The profile also matches the upstream optimizer (FusedAdam, betas 0.9 and 0.95, constant learning rate), activation checkpointing, and the Transformer Engine, torch_fp32 and HF-checkpoint backend settings. It leaves backend.dispatcher unset, so the compiler uses torch. The upstream recipe uses hybridep, which the training image does not include. vLLM’s “no matching PunicaWrapper” lines for vision modules are harmless.
7. Send one image
Wait for the job to finish. The deployment is created in the last step, so looking it up earlier fails. Then wait for the deployment, and for the composite adapter route. READY can arrive before that route exists.
8. Score the validation receipts
Score the first score_rows validation receipts (100 for super-vl, 20 for qwen3-vl-8b) with greedy decoding and thinking off. Use StringCheckMetric (equals) and SequenceSimilarityMetric. Evaluator’s ExactMatch and F1 strip the json2token tags. Scores are on Nemotron Vision-Language Models.
9. Remove the deployment
The scoring jobs use the deployment. Wait for them to finish, then delete the deployment and its config.
More on the prompt template: Images in the Prompt.