https://github.com/nebuly-ai/nebullvm/tree/main/apps/accelerate/chatllama Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} nebuly-ai / nebullvm Public * Notifications * Fork 169 * Star 3k * Code * Issues 28 * Pull requests 7 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create nebullvm/apps/accelerate/chatllama/ Go to file nebullvm/apps/accelerate/chatllama/ Latest commit @francis-oss francis-oss update readme ... c423f19 Feb 27, 2023 update readme c423f19 Git stats * History Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time . . chatllama Fix some comments and tokenizer outputs from P-Tuning to RLHF February 27, 2023 11:45 README.md update readme February 27, 2023 15:51 generate_dataset.py Fix some comments and tokenizer outputs from P-Tuning to RLHF February 27, 2023 11:45 Open source implementation for LLaMA-based ChatGPT. 15x faster training process than ChatGPT (wip) Get started with ChatLLaMA Call for open-source contributions README.md Open source implementation for LLaMA-based ChatGPT. 15x faster training process than ChatGPT (wip) Meta has recently released LLaMA, a collection of foundational large language models ranging from 7 to 65 billion parameters. LLaMA is creating a lot of excitement because it is smaller than GPT-3 but has better performance. For example, LLaMA's 13B architecture outperforms GPT-3 despite being 10 times smaller. This new collection of fundamental models opens the door to faster inference performance and chatGPT-like real-time assistants, while being cost-effective and running on a single GPU. However, LLaMA was not fine-tuned for instruction task with a Reinforcement Learning from Human Feedback (RLHF) training process. The good news is that we introduce ChatLLaMA, the first open source implementation of LLaMA based on RLHF: * A complete open source implementation that enables you to build a ChatGPT-style service based on pre-trained LLaMA models. * Compared to the original ChatGPT, the training process and single-GPU inference are much faster and cheaper by taking advantage of the smaller size of LLaMA architectures. * ChatLLaMA has built-in support for DeepSpeed ZERO to speedup the fine-tuning process. * The library also supports all LLaMA model architectures (7B, 13B, 33B, 65B), so that you can fine-tune the model according to your preferences for training time and inference performance. If you like the project, please show your support by leaving a star . Screen Shot 2023-02-26 at 10 56 13 PM Image from OpenAI's blog. Get started with ChatLLaMA [?][?] Please note this code represents the algorithmic implementation for RLHF training process of LLaMA and does not contain the model weights. To access the model weights, you need to apply to Meta's form. ChatLLaMA allows you to easily train LLaMA-based architectures in a similar way to ChatGPT, using RLHF. For example, below is the code to start the training in the case of ChatLLaMA 7B. from chatllama.rlhf.trainer import RLTrainer from chatllama.rlhf.config import Config path = "path_to_config_file.yaml" config = Config(path=path) trainer = RLTrainer(config.trainer) trainer.distillate() trainer.train() trainer.training_stats.plot() Note that you should provide Meta's original weights and your custom dataset before starting the fine-tuning process. Alternatively, you can generate your own dataset using LangChain's agents. python generate_dataset.py Call for open-source contributions We have open-sourced the complete code to replicate the ChatLLaMA implementation, opening up the possibility for each user to fine-tune their own personalized ChatLLaMA assistants. The library is in its very early stages. It can be further extended with the following additions: * Checkpoints with fine-tuned weights * Optimization techniques for faster inference * Support for packaging the model into an efficient deployment framework All developers are invited to join Nebuly's efforts toward more efficient and open ChatGPT-like assistants. You can participate in the following ways: 1. Submit an issue or PR on GitHub 2. Join our Discord group to chat Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.