llms  by IbrahimSobh

Collection of resources for large language models

Created 2 years ago
393 stars

Top 73.3% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive survey of Large Language Models (LLMs), covering theoretical foundations, practical applications, and implementation details. It serves as a valuable resource for researchers, engineers, and practitioners looking to understand and utilize LLMs, offering insights into various architectures, training methodologies, and deployment strategies.

How It Works

The repository explores LLMs from statistical n-gram models to advanced neural network architectures like Transformers. It details concepts such as probability distributions, perplexity for evaluation, and the advantages of neural models in handling long-range dependencies and avoiding sparsity issues. The practical section showcases implementations of popular models like GPT, BERT, Falcon, and Llama, demonstrating text generation, fine-tuning, and retrieval-augmented generation (RAG) techniques.

Quick Start & Requirements

  • Installation: Primarily uses the Hugging Face transformers library (pip install transformers). Specific models may require additional dependencies like torch or gpt4all.
  • Prerequisites: Python 3.x, PyTorch, and potentially CUDA for GPU acceleration. Some examples require API keys (e.g., OpenAI, Google).
  • Resources: Model sizes vary significantly; running larger models locally may require substantial RAM and GPU VRAM.
  • Links: Hugging Face Transformers documentation: https://huggingface.co/docs/transformers/index

Highlighted Details

  • Detailed explanations of statistical vs. neural language modeling.
  • Practical code examples for popular LLMs (GPT-2, BERT, Falcon, Llama, CodeT5+).
  • Comprehensive overview of decoding strategies (greedy, beam search, sampling, top-k, top-p).
  • In-depth coverage of prompt engineering techniques (zero-shot, few-shot, chain-of-thought).
  • Introduction to parameter-efficient fine-tuning (PEFT) methods like LoRA and Prompt Tuning.
  • Explanation and implementation of Retrieval Augmented Generation (RAG).
  • Overview of LangChain for building LLM-powered applications, including chains, agents, memory, and document handling.

Maintenance & Community

The repository is a survey and educational resource, not a continuously maintained software project. It references widely used libraries and models from the NLP community.

Licensing & Compatibility

The repository itself does not specify a license. However, it extensively uses and demonstrates models and libraries (e.g., Hugging Face Transformers, Falcon) that have their own licenses, many of which are permissive (e.g., Apache 2.0 for Falcon) and allow commercial use. Users must adhere to the licenses of the individual models and libraries they choose to use.

Limitations & Caveats

This repository is primarily an educational survey and collection of examples. It does not provide a unified framework or a single entry point for all functionalities. Users will need to adapt code and manage dependencies for specific models and tasks. Some examples may require specific hardware or API access.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI) and Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake).

awesome-transformer-nlp by cedrickchee

0%
1k
Curated list of NLP resources for Transformer networks
Created 6 years ago
Updated 10 months ago
Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

Hands-On-Large-Language-Models by HandsOnLLM

1.4%
16k
Code examples for "Hands-On Large Language Models" book
Created 1 year ago
Updated 1 month ago
Feedback? Help us improve.