This repository contains Jupyter notebooks demonstrating various generation tasks with Large Language Models (LLMs). It provides examples for summarization, text generation, few-shot learning, translation, and question-answering, utilizing different LLM APIs to showcase the capabilities of multiple providers.
- summarize_llm_function.ipynb: Demonstrates text summarization using LLMs, with examples for generating concise summaries from longer texts.
- generate_llm_function.ipynb: Provides examples of text generation, covering creative and informative text outputs.
- fewshot_llm_function.ipynb: Explores few-shot learning techniques, where the model is given a limited number of examples to guide its responses in specific tasks.
- translate_llm_function.ipynb: Illustrates language translation capabilities using LLMs, allowing for translations across multiple language pairs.
- QA_llm_function.ipynb: Demonstrates question-answering using LLMs, where the model provides accurate responses to queries based on context or a document.
To run these notebooks, you will need:
- Python 3.8+
- Jupyter Notebook
- API keys for any relevant LLM services (e.g., OpenAI, Cohere, Anthropic)
- Required dependencies as listed in
requirements.txt
-
Clone the repository:
git clone https://github.com/simonpierreboucher/llm_multiple_generation.git cd llm_multiple_generation
-
Install the dependencies:
pip install -r requirements.txt
- Start Jupyter Notebook: Open Jupyter by navigating to the repository folder and running:
jupyter notebook
- Select a Notebook: Open any of the notebooks (summarize, generate, few-shot, translate, or QA) to explore its functionality.
- Follow Instructions: Each notebook includes instructions and code for working with LLMs in the context of specific generation tasks.
- Summarization: Generate concise summaries for documents, articles, or other text inputs.
- Text Generation: Create new content, stories, or information-rich text with minimal input.
- Few-Shot Learning: Provide a few examples to guide the model's responses for targeted tasks, such as answering specific questions or following a template.
- Translation: Translate text across multiple languages using LLMs, useful for multilingual applications.
- Question-Answering: Use LLMs to provide context-based answers to questions, enhancing automated support or knowledge retrieval tasks.
We welcome contributions! Feel free to submit issues or pull requests to enhance functionality, add features, or address bugs.
This repository is licensed under the MIT License.