Skip to content

This repository contains Jupyter notebooks demonstrating various generation tasks with Large Language Models (LLMs). It provides examples for summarization, text generation, few-shot learning, and translation, utilizing different LLM APIs to showcase the capabilities of multiple providers.

Notifications You must be signed in to change notification settings

simonpierreboucher/llm_multiple_generation

Repository files navigation

LLM Multiple Generation Notebook

License: MIT Python Version GitHub Issues GitHub Forks GitHub Stars

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.

Repository Structure

  • 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.

Getting Started

Prerequisites

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

Installation

  1. Clone the repository:

    git clone https://github.com/simonpierreboucher/llm_multiple_generation.git
    cd llm_multiple_generation
  2. Install the dependencies:

    pip install -r requirements.txt

Running the Notebooks

  1. Start Jupyter Notebook: Open Jupyter by navigating to the repository folder and running:
    jupyter notebook
  2. Select a Notebook: Open any of the notebooks (summarize, generate, few-shot, translate, or QA) to explore its functionality.
  3. Follow Instructions: Each notebook includes instructions and code for working with LLMs in the context of specific generation tasks.

Use Cases

  • 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.

Contributing

We welcome contributions! Feel free to submit issues or pull requests to enhance functionality, add features, or address bugs.

License

This repository is licensed under the MIT License.

About

This repository contains Jupyter notebooks demonstrating various generation tasks with Large Language Models (LLMs). It provides examples for summarization, text generation, few-shot learning, and translation, utilizing different LLM APIs to showcase the capabilities of multiple providers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published