Giter Club home page Giter Club logo

nanogpt_lb's Introduction

CVE-INT8-QUANT

To-Do

  • Make repo private
  • Check BOS token scam
  • Eval on harmbench https://huggingface.co/spaces/AI-Secure/llm-trustworthy-leaderboard
  • Eval ethical on other benchmarks
  • Mail prof
  • Check the quantization formula
  • Start writing paper
  • Take a dolphin model and ethical it, check mmlu
  • Take a larger model and check drop in accuracy
  • Clip after a few epochs (Basically reduce the ema clipped diff)

Future work? Maybe current work

Idea

  1. Train M1 to not refuse --> M2 using filtered dataset
  2. Quantize M2 --> M3
  3. Train M2 to refuse using unfiltered dataset --> M4
  4. Quantize M4 --> M5 = M3

Eval

MMLU 5-shot

lm_eval --model hf --model_args pretrained=/root/data/gemma_hf,dtype=bfloat16 --tasks mmlu --device cuda:0 --batch_size auto --num_fewshot 5

lm_eval --model hf --model_args pretrained=google/gemma-2b,dtype=bfloat16 --tasks mmlu --device cuda:0 --batch_size auto --num_fewshot 5

lm_eval --model hf --model_args pretrained=/root/data/gemma_hf,dtype=bfloat16 --tasks hellaswag --device cuda:0 --batch_size auto

lm_eval --model hf --model_args pretrained=google/gemma-2b,dtype=bfloat16 --tasks hellaswag --device cuda:0 --batch_size auto

Bad datasets

Datasets

SharGPT Vicuna

Orca: https://huggingface.co/datasets/Open-Orca/SlimOrca/viewer/default/train?q=hacking

SharGPT Vicuna

Guide:

  • split: break long conversations
  • clean: remove html
  • unfiltered: remove ethical

https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered

Wizard LM

Announcement:

Wizard LM 2

Improve

  • Check scale
  • Why quant window of only 0.24
  • Evaluate: Perplexity before and after quant of finetuned and no finetune
  • Perplexity of bfloat and float16, float32 models
  • Clipping strategy like: start clipping after some time or clip after t-epochs
  • Context length 2048, better data, multi-turn, better mask
  • fp16 precision for scale storage and maybe train model in same
  • 7B model, check for outliers

Install Packages (temp)

. activate myenv
pip install -U "huggingface_hub[cli]" sentencepiece prettytable

Push changes

chmod 600 ~/.ssh/id_rsa
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Download Models

LLaMA

cd ..
mkdir llama
cd llama
. download_llama.sh

Gemma

huggingface-cli login
huggingface-cli download google/gemma-2b-pytorch
mkdir ../gemma
cp -L /root/.cache/huggingface/hub/models--google--gemma-2b-pytorch/snapshots/243cf154c74092915194784ed676ce8700d7d98b/* /root/data/gemma

Datasets:

Harry potter books:

wget blob:https://download-directory.github.io/4f3436ac-7be1-479c-afdb-9a9888857520

cleaned Alpaca

wget https://huggingface.co/datasets/yahma/alpaca-cleaned/resolve/main/alpaca_data_cleaned.json

Prepare dataset

<!-- python python data/{dataset name}/prepare.py -->

python data/dolly/prepare.py

Train

cd ~/nanoGPT_LB
export WANDB_API_KEY=
. activate myenv
python all_train.py config/gemma-ft-dolly.py

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.