[Fixed] RuntimeError: probability tensor contains either inf, nan or element < 0 #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Issue arises when we ran the following command in directory
recipes/quickstart/inference/
Fixes # (issue)
The issue is fixed by adding the following line:
Feature/Issue validation/testing
Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.
-## Test A
python multi_modal_infer.py --image_path Image.png --prompt_text "Describe this image" --temperature 0.9 --top_p 0.1 --model_name "meta-llama/Llama-3.2-11B-Vision-Instruct" --hf_token <your hf-token>
Logs for Test A
Generated Text: end_header_id|>
The image depicts a cartoon astronaut in a white spacesuit, floating in space. The astronaut is wearing a white spacesuit with a blue and red control panel on the front, and a white helmet with a clear visor. The astronaut has brown hair and is smiling, with their arms outstretched and legs bent at the knees.
The image suggests that the astronaut is on a mission to explore the vastness of space, and the stars in the background represent the infinite possibilities and wonders that await them.<|eot_id|>
Test B
python multi_modal_infer.py --image_path Image.png --prompt_text "Describe this image" --temperature 0.9 --top_p 0.1 --model_name "meta-llama/Llama-3.2-11B-Vision-Instruct" --hf_token <your hf-token>
Logs for Test B
Generated Text: end_header_id|>
The image presents a close-up photograph of an orange tabby cat, showcasing its distinctive features and surroundings.
+ The cat's fur is a vibrant orange color with white markings on its nose, chin, and whiskers.
+ Its eyes are green, and its ears are perked up, giving it a curious expression.
+ The cat's whiskers are long and white, adding to its overall appearance.
+ The grass is a bright green color, suggesting a sunny day.
+ The background is out of focus, drawing attention to the cat in the foreground.
In summary, the image is a captivating portrait of an orange tabby cat, with its striking features and surroundings creating a visually appealing composition. The cat's curious expression and vibrant fur make it the main focus of the image, while the blurred background adds depth and context to the scene.<|eot_id|>
Working on Single GPU
Before submitting
Thanks for contributing 🎉!