GithubHelp home page GithubHelp logo

joexu22 / llama2-finetune Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.5 MB

Cracking the LLaMa2 Interview: A Weekend Guide to Impressing AI Startups

Nix 0.02% Jupyter Notebook 99.49% Python 0.47% Shell 0.02%

llama2-finetune's Introduction

llama2-finetune

LLAMA-FIT CO. LLAMA-FIT CO.โ„ข - Your LLaMA Will Like The Way It Looks

Cracking the LLaMA2 Interview: A Weekend Guide to Impressing AI Startups

Introduction

  • Goal is to finetune a LLaMA2 so that it can impress during a Tech Interview

  • business model

    • I got suited up llama interns waiting to work for you
  • operation model

    • read the doc (TODO: make a doc); the joke here is that it's basically the code and I have no moat
  • street cred maxxing

  • impress employers/vc/people/ai

  • benchmark llama2 fine-tune against base model

    • split training set against validation set (90/10?)
    • benchmark fine-tune against base
      • goal: achieve higher "cosine similarity" (between llama output and validation set) using fine-tuned version than base version
      • (exclaim - oh shit! - I'm a regmonkey)

Quick Start Guide

Haphazard Benchmark

  • run all cells in notebook
  • last cell can be ran to view simple haphazard benchmark

Basic Research

  • LLaMA2 Paper
    • definitive primary source
  • LLaMA2 Github
    • actual code
    • not to be confused with llamacode library
      • (aside) spent way to much time trying to figure out why the download code wasn't working ...
    • 7b model
  • Deepgram Video Analysis
    • good take aimed for layman
  • Karparthy is a Beast
    • look it's clear that I'm not legit until I make it onto the README.md page
    • but as a weekend project ... nah ... (at least right now)
  • Fiverr
    • there's academic integrity which I adhere to
    • but I'm also technically an entrepreneur ... had the look
      • these rates seems decent
      • side hustle oppurtunity?
  • Random Paper
    • literally a random paper I pulled from arxiv talking about training and finetunning
    • insight...
  • Yannic Kilcher segment
    • Original LLaMA
    • LLaMA-Accessory (potential fine-tune tool)
      • together.ai, openchat, lmsys.org (tools that leverage llama)

Design Experiment/Hack Minimum Viable Product/Engineering Draft

Dataset Creation

Kaggle

  • kaggle always have some interesting datasets (interview quetions related)
  • able to manually compile a list of interesting interview questions
    • potential OCR (future... TODO)
  • use GPT4 API to synthetically generate responses
    • potential human reinforcement here
      • scale.ai/mechanical turk stuff? (TODO)

Implementation

Joke

Discuss B4 Implementation Engineering Meme

Data Processing

  • acquire datasets from kaggle
  • random code in data_processing
    • Use GTP4 to do data formatting work
  • create .env with OPENAI_API_KEY=...
  • alternatively, upload/pull datasets into/from huggingface

Fine-Tune Framework for Pipeline

Code to be executed are found in Notebooks, which contains a bunch of colab notebooks that should be one-click solutions

FineTune Script

  • good no fluff script
  • copy of code to use in pipeline in Notebooks

Promising FineTune Framework

  • this looks like an out of the box solution - one click colab solution
  • cons is that it uses some strange sharded model of llama 7b
Fine-tune Code Examples

Benchmarks

LlamaIndex Semantic Similarity Evaluator

  • compare text
  • basis for more rigorous benchmarking
    • eval-2-base_llama vs eval-2-llama_finetune

MMLU (Massive Multitask Language Understanding)

  • left as an excersize to better understand benchmarking

Initial Proposal

  1. choose/create fine-tuning dataset
  2. prepare dataset
  3. choose fine-tuning framework
  4. configure fine-tuning process
  5. train the model
  6. evaluate the model

Code

Replit (MarkDown Renderer, Jupyter Env)

Github (Acutal Codebase - I hear it's on chain)

Executable Code in Notebook that runs on Collab

Collab Notesbooks in Repo

Lambda Labs/Cloud Compute

  • Yo, all instances are reserved
    • WTF
    • need to containerize application so that it can run on any compute cloud/otherwise/etc.
      • this is the actual product
      • buried Alpha if you read this far

Hugging Face

https://huggingface.co/UrbanJoe

llama2-finetune's People

Contributors

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