Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add structure extraction vlm #279

Merged

Conversation

davidberenstein1957
Copy link
Member

What does this PR do?

Fixes # (issue)

Who can review?

Feel free to tag members/contributors who may be interested in your PR.

…using Vision Language Models

- Updated the table of contents to include a new section for "Structured Generation from Documents Using Vision Language Models".
- Added a new Jupyter notebook that demonstrates how to extract structured information from documents using the SmolVLM-500M-Instruct model, including installation instructions, model initialization, and example usage.
…age Models

- Introduced a new notebook demonstrating the extraction of structured information from documents using the SmolVLM-500M-Instruct model.
- Included installation instructions, model initialization, and example usage with a focus on generating structured tags and confidence scores from images.
- Added detailed markdown explanations for each step of the process.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

…uage Models

- Updated the description to clarify the use of the SmolVLM-Instruct model and its integration with the HuggingFace Transformers and Outlines libraries.
- Added a reference to an outlines tutorial for better guidance.
- Modified the installation command to remove the Gradio library, streamlining the dependencies.
Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice, thanks for your contribution! I think it can be even better if you demonstrate a real world end-to-end application of it though 😄

@davidberenstein1957
Copy link
Member Author

I agree, let me rewrite a bit for a real-life scenario, making the outlines variant more reproducible and usable while creating some visibility. I wanted to keep the effort minimal but some additional work would be great.

…nthetic data extraction

- Updated notebook to use the RLAIF-V-Dataset for structured information extraction
- Implemented a function to generate synthetic questions, descriptions, and quality tags for images
- Added code to push the augmented dataset to the Hugging Face Hub
- Simplified the notebook's imports and removed unused code
- Updated markdown sections to provide clearer context and explanation
- Corrected the filename from `structured_generation_vision_languag_models.ipynb` to `structured_generation_vision_language_models.ipynb`
- Updated the index.md to reflect the corrected notebook title and link
- Updated the _toctree.yml to use the corrected notebook filename
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks! Just need to resolve the conflict and we should be good 😄

- Fixed a small punctuation error in the introduction paragraph
- Corrected "HuggingFaceTB" to "Hugging Face"
- Expanded notebook title to clarify generation from both images and documents
- Minor enhancement to improve clarity of the notebook's scope
@davidberenstein1957
Copy link
Member Author

hi @stevhliu @mishig25, I seem to have the same issues as here. Not sure how that was fixed last time?

huggingface/doc-builder#450
#222

@stevhliu
Copy link
Member

Looks like the issue is resolved now!

@stevhliu stevhliu merged commit 8273c06 into huggingface:main Jan 31, 2025
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants