Skip to content

Commit

Permalink
add 5 together llama notebooks (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffxtang authored Nov 26, 2024
2 parents 7ebd68c + 946d73d commit a346e19
Show file tree
Hide file tree
Showing 33 changed files with 13,631 additions and 8 deletions.
36 changes: 28 additions & 8 deletions recipes/3p_integrations/togetherai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# Building LLM apps using Llama on Together.ai
# Building LLM apps using Llama on Together AI

This folder contains demos on how to use Llama on [Together.ai](https://www.together.ai/) to quickly build LLM apps.
This folder contains demos on how to use Llama on [Together AI](https://www.together.ai/) to quickly build LLM apps.

The first demo is a notebook that converts PDF to podcast using Llama 3.1 70B or 8B hosted by Together.ai. It differs and complements the [Meta's implementation](https://github.com/meta-llama/llama-recipes/tree/main/recipes/quickstart/NotebookLlama) in several ways:
## Prerequisites

1. You don't need to download the Llama models from HuggingFace and have a GPU to run the notebooks - you can quickly get a free Together API key and run the whole Colab notebook on a browser, in about 10 minutes;
2. A single system prompt is used to generate the naturally sounding podcast from PDF, with the support of pydantic, scratchpad and JSON response format to make the whole flow simple yet powerful;
3. A different TTS service, also with an easy-to-get free API key, is used.
To make the most of the examples in this cookbook, you'll need a Together AI API key (sign up for free [here](https://api.together.ai/signin)).

The whole Colab notebook can run with a single "Runtime - Run all" click, generating the podcast audio from the Transformer paper that started the GenAI revolution.
While the code examples are primarily written in Python/JS, the concepts can be adapted to any programming language that supports interaction with the Together API.


## Cookbooks

| Cookbook | Description | Open |
| -------- | ----------- | ---- |
| [MultiModal RAG with Nvidia Investor Slide Deck](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/multimodal_RAG_with_nvidia_investor_slide_deck.ipynb) | Multimodal RAG using Nvidia investor slides. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/multimodal_RAG_with_nvidia_investor_slide_deck.ipynb) [![](https://uohmivykqgnnbiouffke.supabase.co/storage/v1/object/public/landingpage/youtubebadge.svg)](https://youtu.be/IluARWPYAUc?si=gG90hqpboQgNOAYG)|
| [Llama Contextual RAG](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/llama_contextual_RAG.ipynb) | Implementation of Contextual Retrieval using Llama models. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/llama_contextual_RAG.ipynb) |
| [Llama PDF to podcast](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/pdf_to_podcast_using_llama_on_together.ipynb) | Generate a podcast from PDF content using Llama. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/pdf_to_podcast_using_llama_on_together.ipynb) |
| [Knowledge Graphs with Structured Outputs](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/knowledge_graphs_with_structured_outputs.ipynb) | Get Llama to generate knowledge graphs. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/knowledge_graphs_with_structured_outputs.ipynb) |
| [Structured Text Extraction from Images](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/structured_text_extraction_from_images.ipynb) | Extract structured text from images. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/structured_text_extraction_from_images.ipynb) |
| [Text RAG](https://github.com/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/text_RAG_using_llama_on_together.ipynb) | Implement text-based Retrieval-Augmented Generation. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/meta-llama/llama-recipes/blob/main/recipes/3p_integrations/togetherai/text_RAG_using_llama_on_together.ipynb) |

## Explore Further

Looking for more resources to enhance your experience with open source models? Check out these helpful links:

- [Together AI developer documentation](https://docs.together.ai/docs/introduction)
- [Together AI API support docs](https://docs.together.ai/reference/chat-completions-1)
- [Together AI Discord community](https://discord.gg/9Rk6sSeWEG)

## Additional Resources

- [Together AI Research](https://www.together.ai/research): Explore papers and technical blog posts from our research team.
- [Together AI Blog](https://www.together.ai/blog): Explore technical blogs, product announcements and more on our blog.
1 change: 1 addition & 0 deletions recipes/3p_integrations/togetherai/datasets/movies.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a346e19

Please sign in to comment.