Skip to content

fix(smolvlm): preserve processor-owned dimensions for no-resize packages - #2984

Draft
imbgar-roboflow wants to merge 2 commits into
mainfrom
codex/smolvlm-processor-input-contract-20260913
Draft

fix(smolvlm): preserve processor-owned dimensions for no-resize packages#2984
imbgar-roboflow wants to merge 2 commits into
mainfrom
codex/smolvlm-processor-input-contract-20260913

Conversation

@imbgar-roboflow

@imbgar-roboflow imbgar-roboflow commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Problem

A real native SmolVLM training run completed and registered its model, but prediction failed with HTTP 500. The writer correctly recorded network_input.training_input_size: null because the dataset had no platform resize. The active inference-models reader rejected that value as an invalid TrainingInputSize before loading the model.

Change

Add a Smol-specific parser for the explicit processor-owned input contract. It accepts a null training size only with dynamic any-size RGB input and an identity platform transform, then uses the existing raw-image path into the packaged Hugging Face processor. It does not invent a resolution, alter trained artifacts, disable quantization, switch reader backends, or relax the shared fixed-size schema. Existing fixed-size packages retain their parser and preprocessing behavior. Nonidentity transforms with no size remain rejected rather than silently discarded.

Verification

  • 12 focused tests passed against the exact installed ARM reader dependencies in a disposable CPU process.
  • Tests cover native null-size metadata, unchanged fixed 640x480 parsing, malformed/missing size, static-input rejection, transformation rejection, and original variable image dimensions reaching the processor.
  • The schema-only candidate preserves all 112 parent layers and runtime configuration, adding two Python source files.
  • Its native same-model resume accepted the metadata, then exposed a second dependency defect: installed bitsandbytes 0.47.0 has no CUDA13 ARM library. That real failure is preserved separately.
  • The isolated combined candidate adds the official bitsandbytes 0.48.1 ARM wheel, without changing Torch, model quantization, precision, backend, or other dependencies. Its build profile and hash-pinned requirements are included here.
  • A real CUDA13 ARM NF4 quantize/dequantize probe passed on the canary MIG slice (relative error 0.09224). This is kernel validation, not full-model prediction validation.
  • First combined candidate sha256:8ed0a5f2c597c69979910aff7a6242a8ceeb7be7d64acd24a33828317727c4ff failed containerd extraction because its replacement layer omitted explicit directories. That failure is preserved. Corrected candidate sha256:3fb47f5a20b59eb22dc613034e750ab665052274ac707645013914c3c062c836 passed actual Pod source/dependency/readiness checks.
  • Supported native same-model suite resume PASSED: all 7 held-out images/prompts returned nonempty text in 70.09 seconds, preserving generation defaults. Training remained the original completed 14-epoch run, not a retrain. Both preceding real prediction failures are archived separately.
  • Automatic evaluation is explicitly unsupported for text-image-pairs. This proves the native functional path, not matched hosted quality, numerical parity, or driver-hang prevention. Reader logs also warn that the installed processor's torchvision backend substitutes BICUBIC for LANCZOS; that existing dependency behavior remains a fidelity follow-up, not silently claimed equivalent.

Scope

Five-file, main-based source PR: reader helper, reader integration, regression tests, isolated build profile, and hash-pinned requirements. No shared inference deployment or benchmark training image is changed. These fix a writer/reader contract mismatch and an isolated CUDA13 dependency mismatch, not the NVIDIA driver hang. Native training 72e78311b43912927047 is reused; no retraining is needed to exercise these reader changes.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely.

🚧 Right now this is a draft, so automated Claude review is paused — nothing is being spent yet. Mark it Ready for review to trigger it.

Warning

💸 The Claude reviewer bills in credits, not vibes

Automated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared.

Draft when unsure, Ready when you mean it:

  • 🌱 Not sure the PR is in good shape yet? Keep it (or set it back) as a draft — drafts pause review, so you can push and iterate without burning credits on a moving target.
  • 💪 Feel strong about the contents? Mark it Ready for review and the reviewer will take a look.

However you get there, arrive prepared:

  • 🧱 Bring a SOLID, thorough PR. Point your local agent at our skills/ to tune it to our guidelines first — or, if you are one of those fabled carbon-based contributors, read them yourself. A half-baked diff costs exactly the same to review as a finished one.
  • Resolve every comment before you re-request review. Re-requesting with threads still open means paying twice for the same conversation.
  • 🔁 Do not use CI review as an inner loop for a local agent. The reviewer is not a step-by-step debugger — do the unfolding locally and arrive with the answer, not the search.
  • 🙋 If something looks off, ask a human. One question to a maintainer is cheaper and faster than three rounds of agent re-review chasing a misread.

Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.

  • Prefer to skip automated review entirely? Add the skip-claude-review label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant