Skip to content

Commit

Permalink
Recipes for Granite RAG 3.0 8b LoRA adapter
Browse files Browse the repository at this point in the history
Includes Ollama version and HF version.

Signed-off-by: BJ Hargrave <[email protected]>
  • Loading branch information
bjhargrave committed Dec 9, 2024
1 parent a996e83 commit f0483ed
Show file tree
Hide file tree
Showing 9 changed files with 1,235 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/actions/ollama-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Additional Test Setup'
description: 'Additional Test Setup for Ollama'
runs:
using: "composite"
steps:
- name: Install Ollama and start server
shell: bash
run: |
curl -fsSL https://ollama.com/install.sh | sudo -E sh
- name: Wait for Ollama server
shell: bash
run: |
sleep 10
time curl -i http://localhost:11434
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ updates:
- package-ecosystem: "github-actions"
directories:
- "/"
- ".github/actions/ollama-setup"
schedule:
interval: "daily"
1 change: 1 addition & 0 deletions .github/notebook_lists/ollama_notebooks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recipes/Intrinsics/Granite_RAG_LoRA.ipynb
16 changes: 16 additions & 0 deletions .github/workflows/notebooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,27 @@ jobs:
ref: ${{ needs.test_workflow_ready.outputs.ref }}
all: ${{ fromJSON(needs.test_workflow_ready.outputs.all) }}

ollama:
needs:
- test_workflow_ready
permissions:
contents: read
uses: ibm-granite-community/utils/.github/workflows/test_notebook.yaml@main
with:
notebook-lists: |
.github/notebook_lists/ollama_notebooks.txt
python-versions: >-
3.11
ref: ${{ needs.test_workflow_ready.outputs.ref }}
all: ${{ fromJSON(needs.test_workflow_ready.outputs.all) }}
action: .github/actions/ollama-setup

test_workflow_complete:
needs:
- test_workflow_ready
- vanilla
- pdl
- ollama
permissions:
pull-requests: write
statuses: write
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Run `pre-commit install` to activate pre-commit hooks
repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
args: [
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ The "Recipes" in the Granite Snack Cookbook showcase the essential capabilities
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> --> (Not yet available in Colab, because the latter uses Python 3.10)

### Intrinsic Functions

1. Retrieval Augmented Generation (RAG) with Granite RAG 3.0 8b
1. [Notebook that uses Ollama](recipes/Intrinsics/Granite_RAG_LoRA.ipynb) (Not available in Colab, because it requires a local Ollama server.)
1. [Notebook that uses Hugging Face Transformers and PEFT Libraries](recipes/Intrinsics/Granite_RAG_LoRA_HF.ipynb) (Not available in Colab, because it requires a >16GB memory)

### Tuning

1. [Fine Tuning Granite](recipes/Fine_Tuning/Finetuning_Granite_Pirate_Style.ipynb)
Expand Down Expand Up @@ -89,4 +95,4 @@ All content in these repositories including code has been provided by IBM under
[CoC]: https://github.com/ibm-granite-cookbooks/community/blob/main/CODE_OF_CONDUCT.md
[CG]: https://github.com/ibm-granite-cookbooks/community/blob/main/CONTRIBUTING.md
[CG-legal]: https://github.com/ibm-granite-cookbooks/community/blob/main/CONTRIBUTING.md#legal
[CG-signing]: https://github.com/ibm-granite-cookbooks/community/blob/main/CONTRIBUTING.md#signing-commits
[CG-signing]: https://github.com/ibm-granite-cookbooks/community/blob/main/CONTRIBUTING.md#signing-commits
3 changes: 3 additions & 0 deletions recipes/Intrinsics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
llama.cpp/
*.gguf
Modelfile
Loading

0 comments on commit f0483ed

Please sign in to comment.