Git Product home page Git Product logo

Comments (7)

xiechengmude avatar xiechengmude commented on June 20, 2024

python main.py $MODEL_PATH $DATASET_PATH --nsamples=1024 \ --num_codebooks=1 --nbits_per_codebook=16 --in_group_size=8 \ --relative_mse_tolerance=0.01 --finetune_relative_mse_tolerance=0.001 \ --finetune_batch_size=32 --local_batch_size=1 --offload_activations \ --wandb --save $SAVE_PATH

from aqlm.

Vahe1994 avatar Vahe1994 commented on June 20, 2024

Hello!
Thank you for your interest in the project. Yes indeed, AQLM quantization takes considerably longer to calibrate than simpler quantization methods such as GPTQ. This only impacts quantization time, not inference time.
Quantization depends on your model size, hardware(number of GPUs , GPUs models e.t.c.) and quantization parameters.
I added more details on quantization time in ReadME.
Hope this helps. If you have any additional questions, please feel free to ask.

from aqlm.

xiechengmude avatar xiechengmude commented on June 20, 2024

could you share a example script for quantizing a 70b model on 8*A100 ?

from aqlm.

Vahe1994 avatar Vahe1994 commented on June 20, 2024

Hi!
Hope this helps:
WANDB_PROJECT="wandb_project" WANDB_NAME="wandb_name" HF_HOME="/mnt/LLM" CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 OMP_NUM_THREADS=16 MKL_NUM_THREADS=16 python main.py meta-llama/Llama-2-70b-hf "pajama" --relative_mse_tolerance=0.01 --finetune_relative_mse_tolerance=0.001 --nsamples=2048 --num_codebooks=1 --nbits_per_codebook=16 --in_group_size=8 --finetune_batch_size=32 --local_batch_size=2 --wandb --save="path_to_save"

from aqlm.

Vahe1994 avatar Vahe1994 commented on June 20, 2024

If you want farther improve ppl, you can additionally run global fine-tuning after you obtained quantized model see #50 for the code and see #49 for example how to run it.

from aqlm.

github-actions avatar github-actions commented on June 20, 2024

This issue is stale because it has been open for 30 days with no activity.

from aqlm.

github-actions avatar github-actions commented on June 20, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from aqlm.

Related Issues (20)

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.