You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it triggers this error when it reaches the evaluation steps:
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in compute_loss(self, model, inputs, return_outputs, num_items_in_batch)
3652 else:
3653 if isinstance(outputs, dict) and "loss" not in outputs:
-> 3654 raise ValueError(
3655 "The model did not return a loss from the inputs, only the following keys: "
3656 f"{','.join(outputs.keys())}. For reference, the inputs it received are {','.join(inputs.keys())}."
ValueError: The model did not return a loss from the inputs, only the following keys: logits. For reference, the inputs it received are input_ids,attention_mask,pixel_values,image_grid_thw,labels.
I processed the evaluation dataset the same way as the training dataset (as in Unsloth's notebooks for VLMs).
it's working fine in my local. I just updated my environment since my previous environment is not working at all. Can you try updating your environment?
This should be supported now - sorry on the delay - please update with uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir - if it's still not working, please open another issue - appreciate it again!
Activity
danielhanchen commentedon Nov 28, 2024
@Erland366 Could you investigate this :) Thanks!
Erland366 commentedon Nov 29, 2024
will check it
Erland366 commentedon Dec 1, 2024
it's working fine in my local. I just updated my environment since my previous environment is not working at all. Can you try updating your environment?
benjamin-marie commentedon Dec 1, 2024
Thanks for the update.
Ok, I will try!
Erland366 commentedon Dec 1, 2024
https://colab.research.google.com/drive/1x75gNanx5C3noLOlDoDOt9PfkI__PIa1?usp=sharing
working on colab too. Here's my attempt
danielhanchen commentedon Jun 17, 2026
This should be supported now - sorry on the delay - please update with
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir- if it's still not working, please open another issue - appreciate it again!