Skip to content

fine-tuned llama3.2 models do not provide output while inferencing #1756

Closed

Description

@ep0p

I've been working on fine-tuning Ollama 3.2 to enhance OCR performance on documents with irregular layouts, handwritten annotations, stamps, and noise. To test this, I ran two experiments with num_train_epochs = 1:

  1. Dataset A: 20k images.
  2. Dataset B: 50k images with artificially added noise on clean documents.

Neither of the fine-tuned models produced any output during inference. In contrast, the original model works as expected:

model, tokenizer = FastVisionModel.from_pretrained(
    "unsloth/Llama-3.2-11B-Vision-Instruct",
    load_in_4bit=True,
    use_gradient_checkpointing="unsloth",
)

Additionally, the model I trained without specifying the number of epochs appears to work, likely because it’s essentially using the original model's weights.

Any thoughts on why the fine-tuned versions might not be generating outputs?

Activity

  1. ep0p commented on Feb 19, 2025

    @ep0p
    Author

    more info: when starting the inference i get fast as reply an <|eot_id|>

  2. danielhanchen commented on Sep 15, 2026

    @danielhanchen
    Member

    This silent failure is a loud one now! If the response marker matches nothing, train_on_responses_only raises with the marker in the message rather than quietly training on fully masked labels, which is what produced the empty generations.

    Please update Unsloth: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions