{"id":18885537,"url":"https://github.com/togethercomputer/together-cookbook","last_synced_at":"2025-04-09T21:14:43.919Z","repository":{"id":259035129,"uuid":"869052133","full_name":"togethercomputer/together-cookbook","owner":"togethercomputer","description":"A collection of notebooks/recipes showcasing usecases of open-source models with Together AI.","archived":false,"fork":false,"pushed_at":"2025-04-07T18:43:10.000Z","size":106395,"stargazers_count":830,"open_issues_count":3,"forks_count":132,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-09T21:14:30.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/togethercomputer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-07T16:28:33.000Z","updated_at":"2025-04-09T18:41:14.000Z","dependencies_parsed_at":"2024-10-22T17:31:58.900Z","dependency_job_id":null,"html_url":"https://github.com/togethercomputer/together-cookbook","commit_stats":null,"previous_names":["togethercomputer/together-cookbook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togethercomputer%2Ftogether-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togethercomputer%2Ftogether-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togethercomputer%2Ftogether-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/togethercomputer%2Ftogether-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/togethercomputer","download_url":"https://codeload.github.com/togethercomputer/together-cookbook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111971,"owners_count":21049578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T07:19:39.267Z","updated_at":"2025-04-09T21:14:43.904Z","avatar_url":"https://github.com/togethercomputer.png","language":"Jupyter Notebook","funding_links":[],"categories":["🔧 Tools and Frameworks","Jupyter Notebook"],"sub_categories":["🔍 Domain-Specific Multimodal RAG"],"readme":"\u003cimg src=\"images\\together.gif\" width=\"100%\"/\u003e\n\n\u003c!-- Links --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://api.together.ai/signin\" style=\"color: #06b6d4;\"\u003ePlatform\u003c/a\u003e •\n  \u003ca href=\"https://docs.together.ai/docs/introduction\" style=\"color: #06b6d4;\"\u003eDocs\u003c/a\u003e •\n  \u003ca href=\"https://www.together.ai/blog\" style=\"color: #06b6d4;\"\u003eBlog\u003c/a\u003e •\n  \u003ca href=\"https://discord.gg/9Rk6sSeWEG\" style=\"color: #06b6d4;\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\n# Together Cookbook\n\nThe Together Cookbook is a collection of code and guides designed to help developers build with open source models using [Together AI](https://www.together.ai/). The best way to use the recipes is to copy code snippets and integrate them into your own projects!\n\n## Contributing\n\nWe welcome contributions to this repository! If you have a cookbook you'd like to add, please reach out to use the [Discord](https://discord.gg/9Rk6sSeWEG) or open a pull request!\n\n## Prerequisites\n\nTo 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)).\n\nWhile 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.\n\n## Cookbooks\n\n| Cookbook | Description | Open |\n| -------- | ----------- | ---- |\n| Agents | | |\n| [Serial Chain Agent ](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Serial_Chain_Agent_Workflow.ipynb) | Chain multiple LLM calls sequentially to process complex tasks. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Serial_Chain_Agent_Workflow.ipynb) |\n| [Conditional Router Agent Workflow ](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Conditional_Router_Agent_Workflow.ipynb) | Create an agent that routes tasks to specialized models. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Conditional_Router_Agent_Workflow.ipynb) |\n| [Parallel Agent Workflow ](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Parallel_Agent_Workflow.ipynb) | Run multiple LLMs in parallel and aggregate their solutions. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Parallel_Agent_Workflow.ipynb) |\n| [Orchestrator Subtask Agent Workflow ](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Parallel_Subtask_Agent_Workflow.ipynb) | Break down tasks into parallel subtasks to be executed by LLMs. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Parallel_Subtask_Agent_Workflow.ipynb) |\n| [Looping Agent Workflow](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Looping_Agent_Workflow.ipynb) | Build an agent that iteratively improves responses | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Looping_Agent_Workflow.ipynb) |\n| [Together Open Deep Research](https://github.com/togethercomputer/together-cookbook/blob/main/Agents/Together_Open_Deep_Research_CookBook.ipynb) | An Open Source Deep-Research Implementation with Multi-Step Web Search | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Agents/Together_Open_Deep_Research_CookBook.ipynb) |\n| Fine-tuning | | |\n| [LoRA Inference and Fine-tuning](https://github.com/togethercomputer/together-cookbook/blob/main/LoRA_Finetuning%26Inference.ipynb) | Perform LoRA fine-tuning and inference on Together AI. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/LoRA_Finetuning%26Inference.ipynb) [![](https://uohmivykqgnnbiouffke.supabase.co/storage/v1/object/public/landingpage/youtubebadge.svg)](https://youtu.be/AKO7YDcwhiQ?si=ZcOGdDeTRelwIqXd) |\n| [Long Context Finetuning For Repetition](https://github.com/togethercomputer/together-cookbook/blob/main/LongContext_Finetuning_RepetitionTask.ipynb) | Fine-tuning LLMs to repeat back words in long sequences. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/LongContext_Finetuning_RepetitionTask.ipynb) |\n| [Summarization Long Context Finetuning](https://github.com/togethercomputer/together-cookbook/blob/main/Summarization_LongContext_Finetuning.ipynb) | Long context fine-tuning to improve summarization capabilities. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Summarization_LongContext_Finetuning) |\n| [Conversation Finetuning](https://github.com/togethercomputer/together-cookbook/blob/main/Multiturn_Conversation_Finetuning.ipynb) | Fine-tuning LLMs on multi-step conversations. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Multiturn_Conversation_Finetuning.ipynb) |\n| Retrieval-augmented generation  |  | |\n| [RAG_with_Reasoning_Models](https://github.com/togethercomputer/together-cookbook/blob/main/RAG_with_Reasoning_Models.ipynb) | RAG + source citations with DeepSeek R1. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/RAG_with_Reasoning_Models.ipynb) |\n| [MultiModal_RAG_with_Nvidia_Deck](https://github.com/togethercomputer/together-cookbook/blob/main/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/togethercomputer/together-cookbook/blob/main/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)|\n| [Open_Contextual_RAG](https://github.com/togethercomputer/together-cookbook/blob/main/Open_Contextual_RAG.ipynb) | An implementation of Contextual Retrieval using open models. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Open_Contextual_RAG.ipynb) |\n| [Text_RAG](https://github.com/togethercomputer/together-cookbook/blob/main/Text_RAG.ipynb) | Implement text-based Retrieval-Augmented Generation | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google/github.com/togethercomputer/together-cookbook/blob/main/Text_RAG.ipynb) |\n| Search  |  |  |\n| [Multimodal Search and Conditional Image Generation](https://github.com/togethercomputer/together-cookbook/blob/main/Multimodal_Search_and_Conditional_Image_Generation.ipynb) | Text-to-image and image-to-image search and condtional image generation. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Multimodal_Search_and_Conditional_Image_Generation.ipynb) |\n| [Embedding_Visualization](https://github.com/togethercomputer/together-cookbook/blob/main/Embedding_Visualization.ipynb) | Visualize vector embeddings | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Embedding_Visualization.ipynb) |\n| [Search_with_Reranking](https://github.com/togethercomputer/together-cookbook/blob/main/Search_with_Reranking.ipynb) | Improve search results with rerankers | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Search_with_Reranking.ipynb) |\n| [Semantic_Search](https://github.com/togethercomputer/together-cookbook/blob/main/Semantic_Search.ipynb) | Implement vector search with embedding models | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Semantic_Search.ipynb) |\n| Miscellaneous | | |\n| [Thinking_Augmented_Generation](https://github.com/togethercomputer/together-cookbook/blob/main/Thinking_Augmented_Generation.ipynb) | Give R1 thinking tokens to small models | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Thinking_Augmented_Generation.ipynb) |\n| [Flux LoRA Inference](https://github.com/togethercomputer/together-cookbook/blob/main/Flux_LoRA_Inference.ipynb) | Generate images with fine-tuned Flux LoRA's | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Flux_LoRA_Inference.ipynb) |\n| [Structured_Text_Extraction_from_Images](https://github.com/togethercomputer/together-cookbook/blob/main/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/togethercomputer/together-cookbook/blob/main/Structured_Text_Extraction_from_Images.ipynb) |\n| [Summarization Evaluation](https://github.com/togethercomputer/together-cookbook/blob/main/Summarization_Evaluation.ipynb) | Summarizing and evaluating outputs with LLMs. | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Summarization_Evaluation.ipynb) |\n| [PDF_to_Podcast](https://github.com/togethercomputer/together-cookbook/blob/main/PDF_to_Podcast.ipynb) | Generate a podcast from PDF content NotebookLM style! | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/PDF_to_Podcast.ipynb) |\n| [Knowledge_Graphs_with_Structured_Outputs](https://github.com/togethercomputer/together-cookbook/blob/main/Knowledge_Graphs_with_Structured_Outputs.ipynb) | Get LLMs to generate knowledge graphs | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/togethercomputer/together-cookbook/blob/main/Knowledge_Graphs_with_Structured_Outputs.ipynb) |\n\n## Explore Further\n\nLooking for more resources to enhance your experience with open source models? Check out these helpful links:\n\n- [Together AI developer documentation](https://docs.together.ai/docs/introduction)\n- [Together AI API support docs](https://docs.together.ai/reference/chat-completions-1)\n- [Together AI Discord community](https://discord.gg/9Rk6sSeWEG)\n\n## Additional Resources\n\n- [Together AI Research](https://www.together.ai/research): Explore papers and technical blog posts from our research team.\n- [Together AI Blog](https://www.together.ai/blog): Explore technical blogs, product announcements and more on our blog.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftogethercomputer%2Ftogether-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftogethercomputer%2Ftogether-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftogethercomputer%2Ftogether-cookbook/lists"}