granite-snack-cookbook  by ibm-granite-community

Notebooks showcasing IBM Granite models' capabilities

Created 11 months ago
260 stars

Top 97.7% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a collection of Python notebooks demonstrating the capabilities of IBM's Granite models. It serves as a practical guide for developers and researchers looking to leverage these models for various natural language processing tasks, offering easily consumable recipes for quick adoption and experimentation.

How It Works

The cookbook showcases Granite models through bite-sized, instructional Jupyter notebooks. It covers a wide range of functionalities including document summarization, entity extraction, function calling, contract analysis, and advanced patterns like Retrieval Augmented Generation (RAG) with LangChain and LlamaIndex, agentic workflows, and multimodal RAG. The notebooks are designed to highlight core model strengths and provide clear examples of implementation.

Quick Start & Requirements

  • Installation: Primarily through cloning the repository and running the provided Jupyter notebooks.
  • Prerequisites: Python environment. Some notebooks have specific requirements or limitations:
    • Tool Calling, Speech, Prompt Declaration Language (PDL) Jupyter Extension, Microsoft Semantic Kernel Chat, and Ollama-based chat are not compatible with Google Colab.
    • PDL Python API is not yet available in Colab due to Python 3.10 limitations.
    • RAG 3.0 8b requires >16GB memory and is not available in Colab.
  • Links: No specific quick-start or demo links are provided in the README, but the notebooks themselves serve as the primary guide.

Highlighted Details

  • Demonstrates advanced RAG techniques, including agentic RAG and multimodal RAG.
  • Showcases Prompt Declaration Language (PDL) for both Jupyter extensions and Python APIs.
  • Includes examples for fine-tuning Granite models using LlamaFactory and Unsloth.
  • Features model evaluation using Unitxt and Granite as a judge, including "Guardian" models.

Maintenance & Community

  • IBM developers produced this code as an open-source project, not an IBM product.
  • IBM is under no obligation to provide enhancements, updates, or support.
  • IBM makes no assertions as to the level of quality nor security and will not be maintaining this code going forward.
  • Contributing guidelines are available in separate community CONTRIBUTING and Code of Conduct guides. All commits require DCO-signoff and GPG or SSH signing.

Licensing & Compatibility

  • Base license: CC BY 4.0.
  • Code license: Apache 2.0.
  • Example datasets license: CDLA Permissive 2.0.
  • Compatibility for commercial use or closed-source linking is not explicitly detailed beyond the licenses.

Limitations & Caveats

Several advanced features and specific notebooks are noted as incompatible with Google Colab due to environment or dependency limitations. Some RAG examples have significant memory requirements (>16GB). IBM explicitly states they will not be maintaining this code going forward, indicating a lack of ongoing support or development.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
0
Star History
15 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Nir Gazit Nir Gazit(Cofounder of Traceloop), and
4 more.

llmware by llmware-ai

0.6%
14k
Framework for enterprise RAG pipelines using small, specialized models
Created 2 years ago
Updated 1 month ago
Feedback? Help us improve.