Git Product home page Git Product logo

Comments (5)

Vahe1994 avatar Vahe1994 commented on June 20, 2024 1

Hello!
Thank you for your interest in the work.
In the main.py there is a code for calculating ppl on c4 validation dataset

AQLM/main.py

Line 896 in 0e57afb

datasets = ["wikitext2", "c4"]
. Is this what you are looking for?

from aqlm.

Vahe1994 avatar Vahe1994 commented on June 20, 2024 1

Hello!
Sorry for the late answer. We are calculating ppl on a split of c4. The code comes from GPTQ.

Regarding different ppl score on c4. I'm not sure why you are getting 6.94ppl. I rerun the ppl calculation and got 5.646. Although it is a little bit off(probably something slightly changed in either model,data or dependencies), it is not that much.
Can you please check are you using Mistral-7B-v0.1 or instruct version?
Can you please try to run the code from main branch with this command:
CUDA_VISIBLE_DEVICES=0 OMP_NUM_THREADS=16 MKL_NUM_THREADS=16 python main.py "mistralai/Mistral-7B-v0.1" "pajama" --max_epochs=15 --nsamples=256 --num_codebooks=1 --nbits_per_codebook=15 --in_group_size=8 --scale_nbits=0 --model_seqlen=8192 --offload_activations --no_quant

from aqlm.

ShunLu91 avatar ShunLu91 commented on June 20, 2024

Thanks for your timely reply.
After running the main.py using the no_quant mode, I noticed that only 256 samples were sampled to calculate the ppl on c4 validation dataset and I got the final ppl 6.63.
As I want to reproduce the baseline result 6.63 of c4 in the first row of your Tables 1 & 2, I wonder if this result was also obtained by using 256 samples or the whole valdation dataset. If the whole valdation dataset is needed, then how to modify the sampling code in get_c4() function of the datautils.py.

from aqlm.

ShunLu91 avatar ShunLu91 commented on June 20, 2024

Dear authors,
By using the no_quant mode to evaluate Llama-2-7b-hf and Mistral-7B models, I got the following results:

  • Llama-2-7b-hf (model_seqlen=4096, no_quant) ppl=6.63, which is consistent with the results in the paper.
  • Mistral-7B (model_seqlen=8192, no_quant) ppl=6.94. It is weird that Mistral-7B performs worse than Llama-2-7b-hf and is inconsistent with the result 5.71 reported in your Table.17. I present the command as below and can you help me to figure out the difference?
export CUDA_VISIBLE_DEVICES=4,5,6,7  # optional: select GPUs
export MODEL_PATH=pretrained/Mistral-7B # Llama-2-7b-hf
export DATASET_PATH=dataset/c4
export SAVE_PATH=None


python main.py $MODEL_PATH $DATASET_PATH \
        --model_seqlen=8192 \ #  4096 for Llama-2
        --nsamples=1024 \
        --val_size=128 \
        --num_codebooks=1 \
        --nbits_per_codebook=16 \
        --in_group_size=8 \
        --relative_mse_tolerance=0.01 \
        --finetune_batch_size=32 \
        --finetune_max_epochs=0 \
        --finetune_early_stop=3 \
        --finetune_keep_best \
        --local_batch_size=1 \
        --offload_activations \
        --no_quant \
        --save $SAVE_PATH

from aqlm.

ShunLu91 avatar ShunLu91 commented on June 20, 2024

Thanks for your advice. I have achieved the right ppl score by fixing the version of Mistral-7B-v0.1.

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.