Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Summary Snack on 4k Context #18

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Summary Snack on 4k Context #18

merged 2 commits into from
Oct 15, 2024

Conversation

fayvor
Copy link
Contributor

@fayvor fayvor commented Oct 15, 2024

#146:

  • Ensure model receives inputs less than 4k tokens
  • Add language about hierarchical abstractive summarization

PR Checklist

  • Commits signed: All commits must be GPG or SSH signed.
  • DCO Compliance: Developer Certificate of Origin (DCO) applies to the code, documentation, and any example data provided. Ensure commits are signed off.
  • Notebook outputs cleared: Ensure all notebook outputs are cleared.
  • Automated testing: Add the recipe to the automated tests.
  • Test in Google Colab:
    • Test that it works in Google Colab (Python 3.10.12).
    • Colab has its own package set and Python version, so ensure compatibility.
  • Test locally:
    • Ensure the code works in a fresh Python virtual environment (venv).
  • Flexible LLM platform support:
    • The platform should be easily switchable. Use LangChain for now.
    • Include !pip install git+https://github.com/ibm-granite-community/granite-kitchen in the instructions.
  • Example data: Follow the example data guidance.
  • README.md updates:
    • Add a link to the recipe in the Table of Contents (ToC).
    • Include a Colab button after that link.

Signed-off-by: Fayvor Love <[email protected]>
Copy link
Contributor

@rawkintrevo rawkintrevo left a comment

Choose a reason for hiding this comment

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

The changes look good. How is the output?

@fayvor
Copy link
Contributor Author

fayvor commented Oct 15, 2024

The changes look good. How is the output?

The output is pretty good with the language model. It sometimes emphasizes things in the summary that should be left out. That would be improved by creating a hierarchy better that better isolates passages by topic, but that's out of scope for this snack..

@fayvor fayvor merged commit e9b1425 into main Oct 15, 2024
2 checks passed
@fayvor fayvor deleted the summarize-with-4k-lang branch October 15, 2024 17:41
adampingel pushed a commit that referenced this pull request Oct 21, 2024
* Ensure model receives inputs less than 4k tokens

---------

Signed-off-by: Fayvor Love <[email protected]>
adampingel pushed a commit that referenced this pull request Oct 21, 2024
adampingel added a commit that referenced this pull request Oct 21, 2024
This reverts commit 91b69b5.

Signed-off-by: Adam Pingel <[email protected]>
adampingel added a commit that referenced this pull request Oct 21, 2024
* pushing a nb related to entity extraction from desc. of books

* minor changes

folder rename, other minor changes

* deleted nb pushed by mistake

* Granite Guardian : Quick Start Guide (#2)

* renamed to guardian

Signed-off-by: inkpad <[email protected]>

* gg: quick_guide

Signed-off-by: inkpad <[email protected]>

* updated README

Signed-off-by: inkpad <[email protected]>

* PR reviews addressed

* minor readme fix

Signed-off-by: inkpad <[email protected]>

* changes to README and image fix

Signed-off-by: inkpad <[email protected]>

* readme updated for colab

Signed-off-by: inkpad <[email protected]>

* Update README.md

---------

Signed-off-by: inkpad <[email protected]>
Signed-off-by: inkpad <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Fix broken CI paths (#10)

Signed-off-by: Dean Wampler <[email protected]>

* Granite Guardian : Cookbooks (#4)

* renamed to guardian

Signed-off-by: inkpad <[email protected]>

* gg: quick_guide

Signed-off-by: inkpad <[email protected]>

* updated README

Signed-off-by: inkpad <[email protected]>

* PR reviews addressed

* minor readme fix

Signed-off-by: inkpad <[email protected]>

* gg: detailed guide

* Updated Readme

* gg: workflow notebook added 𓆩✧𓆪

* changes to README and image fix

Signed-off-by: inkpad <[email protected]>

* removed rel image; ref #2

Signed-off-by: inkpad <[email protected]>

* readme updated for colab

Signed-off-by: inkpad <[email protected]>

* Update README.md

* Changed the README.md to match the edits I did in the last PR for guardian.

---------

Signed-off-by: inkpad <[email protected]>
Signed-off-by: inkpad <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Revert "Granite Guardian : Cookbooks (#4)"

This reverts commit d2c20d1.

Signed-off-by: Adam Pingel <[email protected]>

* Revert "Fix broken CI paths (#10)"

This reverts commit 59f5749.

Signed-off-by: Adam Pingel <[email protected]>

* Revert "Granite Guardian : Quick Start Guide (#2)"

This reverts commit 5710127.

Signed-off-by: Adam Pingel <[email protected]>

* Summary Snack on 4k Context (#18)

* Ensure model receives inputs less than 4k tokens

---------

Signed-off-by: Fayvor Love <[email protected]>

* PDL recipe (#15)

* PDL recipe

Signed-off-by: Mandana Vaziri <[email protected]>

* cleanup

Signed-off-by: Mandana Vaziri <[email protected]>

* My suggested improvements for this notebook.

Signed-off-by: Dean Wampler <[email protected]>

* Added the new notebook to the CI files.

Signed-off-by: Dean Wampler <[email protected]>

* updated PDL notebook

Signed-off-by: Mandana Vaziri <[email protected]>

* update to PDL notebook

Signed-off-by: Mandana Vaziri <[email protected]>

---------

Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Remove the PDL notebook from the tests temporariliy.

Signed-off-by: Dean Wampler <[email protected]>

* 147 Optimize Prompts (#22)

* Use Prompt Guide format for RAG prompt.

Signed-off-by: Fayvor Love <[email protected]>

* Use Prompt Guide format for Summarize prompts.

Signed-off-by: Fayvor Love <[email protected]>

---------

Signed-off-by: Fayvor Love <[email protected]>

* Deanw/pdl final refinements (#19)

* Consistent quoting

Signed-off-by: Dean Wampler <[email protected]>

* Final wording refinements.

Signed-off-by: Dean Wampler <[email protected]>

* Added the PDL notebook to the list.

Signed-off-by: Dean Wampler <[email protected]>

---------

Signed-off-by: Dean Wampler <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>

* Entity Extraction New Branch (#25)

* Entity Extraction New Branch

Signed-off-by: Anupam Chakraborty <[email protected]>

* Fix NameError: name 'book_info' is not defined

Signed-off-by: Anupam Chakraborty <[email protected]>

* Fix lint

Signed-off-by: Anupam Chakraborty <[email protected]>

---------

Signed-off-by: Anupam Chakraborty <[email protected]>

* Fix after running using deployed model (#26)

Signed-off-by: Anupam Chakraborty <[email protected]>

* resolve conflict

Signed-off-by: Adam Pingel <[email protected]>

* resolve conflicts

Signed-off-by: Adam Pingel <[email protected]>

* resolve conflicts

Signed-off-by: Adam Pingel <[email protected]>

* resolve conflict

Signed-off-by: Adam Pingel <[email protected]>

* pdl update (#16)

* pdl update

Signed-off-by: Mandana Vaziri <[email protected]>

* PDL python notebook

Signed-off-by: Mandana Vaziri <[email protected]>

* Added README, removed load extension

Signed-off-by: Mandana Vaziri <[email protected]>

* Tweaked the Markdown formatting.

Signed-off-by: Dean Wampler <[email protected]>

---------

Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Revert "pdl update (#16)" (#18)

This reverts commit 2d80f7c.

* Fix broken CI paths (#15)

Signed-off-by: Dean Wampler <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Use the granite-3.0-8b-instruct model on HF and Replicate (#1)

Signed-off-by: Fayvor Love <[email protected]>

* Use new language model (#3)

Signed-off-by: Fayvor Love <[email protected]>
Signed-off-by: Adam Pingel <[email protected]>
Co-authored-by: Adam Pingel <[email protected]>

* Revert "Revert "pdl update (#16)" (#18)" (#19)

This reverts commit 91b69b5.

Signed-off-by: Adam Pingel <[email protected]>

* set model to granite-3.0-8b-instruct (#17)

Signed-off-by: Adam Pingel <[email protected]>

* Guardian (#13)

* renamed to guardian

Signed-off-by: inkpad <[email protected]>

* gg: quick_guide

Signed-off-by: inkpad <[email protected]>

* updated README

Signed-off-by: inkpad <[email protected]>

* PR reviews addressed

* minor readme fix

Signed-off-by: inkpad <[email protected]>

* changes to README and image fix

Signed-off-by: inkpad <[email protected]>

* readme updated for colab

Signed-off-by: inkpad <[email protected]>

* Update README.md

---------

Signed-off-by: inkpad <[email protected]>
Signed-off-by: inkpad <[email protected]>
Signed-off-by: Adam Pingel <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Guardian 2 (#14)

* renamed to guardian

Signed-off-by: inkpad <[email protected]>

* gg: quick_guide

Signed-off-by: inkpad <[email protected]>

* updated README

Signed-off-by: inkpad <[email protected]>

* PR reviews addressed

* minor readme fix

Signed-off-by: inkpad <[email protected]>

* gg: detailed guide

* Updated Readme

* gg: workflow notebook added 𓆩✧𓆪

* changes to README and image fix

Signed-off-by: inkpad <[email protected]>

* removed rel image; ref #2

Signed-off-by: inkpad <[email protected]>

* readme updated for colab

Signed-off-by: inkpad <[email protected]>

* Update README.md

* Changed the README.md to match the edits I did in the last PR for guardian.

---------

Signed-off-by: inkpad <[email protected]>
Signed-off-by: inkpad <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>

* Adding agentic rag recipe and updating readme (#5)

* Adding agentic rag recipe

Signed-off-by: Anna Gutowska <[email protected]>

* updating readme

Signed-off-by: Anna Gutowska <[email protected]>

* changes to align with checklist

Signed-off-by: Anna Gutowska <[email protected]>

* addressing RecursionError

Signed-off-by: Anna Gutowska <[email protected]>

* addressing RecursionError

Signed-off-by: Anna Gutowska <[email protected]>

* getting env credentials

Signed-off-by: Anna Gutowska <[email protected]>

* getting env credentials

Signed-off-by: Anna Gutowska <[email protected]>

---------

Signed-off-by: Anna Gutowska <[email protected]>
Signed-off-by: Adam Pingel <[email protected]>
Co-authored-by: Adam Pingel <[email protected]>

* Adding function calling tutorial & updating readme (#6)

* adding function calling recipe and updating readme

Signed-off-by: Anna Gutowska <[email protected]>

* updating readme

Signed-off-by: Anna Gutowska <[email protected]>

* removing outputs referencing preview model

Signed-off-by: Anna Gutowska <[email protected]>

* getting env credentials

Signed-off-by: Anna Gutowska <[email protected]>

* getting env credentials

Signed-off-by: Anna Gutowska <[email protected]>

---------

Signed-off-by: Anna Gutowska <[email protected]>
Signed-off-by: Adam Pingel <[email protected]>
Co-authored-by: Adam Pingel <[email protected]>

* GG: Rendering Fix (#20)

* render fix

* markdown table fix

---------

Signed-off-by: inkpad <[email protected]>
Signed-off-by: inkpad <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>
Signed-off-by: Adam Pingel <[email protected]>
Signed-off-by: Fayvor Love <[email protected]>
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Dean Wampler <[email protected]>
Signed-off-by: Anupam Chakraborty <[email protected]>
Signed-off-by: Anna Gutowska <[email protected]>
Co-authored-by: Amogh Ranavade <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>
Co-authored-by: fayvor <[email protected]>
Co-authored-by: Mandana Vaziri <[email protected]>
Co-authored-by: Dean Wampler <[email protected]>
Co-authored-by: Anupam Chakraborty <[email protected]>
Co-authored-by: inkpad <[email protected]>
Co-authored-by: Anna Gutowska <[email protected]>
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.

2 participants