Code Monkey home page Code Monkey logo

llama2-qlora-on-sagemaker's Introduction

Llama2-QLoRA-on-SageMaker

This experiment is based on Amazon SageMaker. Including,

1/ Training a Bloke Llama2 (TheBloke/Llama-2-7B-fp16) QLoRA Adapter

2/ Merge the freezed LLM and the trained adapter into one-model for faster inference later

3/ Use LMI (Large Model Inference) container on SageMaker Endpoint to host the adpated model saved in S3

- in inference/, use Basic Python engine (HuggingFace Accelerate)

- in inference-deepspeed/, use LMI optimized DJL-DeepSpeed engine

Infra:

Notebook Instance - CPU instance e.g. ml.c5.xlarge
Training - Single GPU Required, tested on ml.g5.xlarge ~ ml.g5.4xlarge
Hosting - Single GPU Required, tested on ml.g4dn.xlarge ~ ml.g5.4xlarge


Basics to Start Experiment on SageMaker

https://github.com/haozhx23/SageMaker-Utils/blob/main/0-How-to-start.md


Refs

https://huggingface.co/TheBloke/Llama-2-7b-chat-fp16 https://github.com/artidoro/qlora
https://arxiv.org/abs/2305.14314
https://www.philschmid.de/sagemaker-llama2-qlora
https://www.linkedin.com/pulse/enhancing-language-models-qlora-efficient-fine-tuning-vraj-routu

llama2-qlora-on-sagemaker's People

Contributors

haozhx23 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.