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: upstream recipe, 8x 80 GB, rank 64, 4 epochs (400 steps on 800 rows at global batch 8). Not yet measured on the platform.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
image_size bounds the pixels, and therefore the image tokens, before the vision tower. 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.
Leave lora.exclude_modules unset. The compiler freezes the vision tower and excludes the fused Mamba *.out_proj on this checkpoint. 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 first 20 validation receipts
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.