Views
No views yet
| Quant Level | Perplexity Score |
|---|---|
| 5.0 | 4.2637 |
| 4.5 | 4.2876 |
| 4.0 | 4.3097 |
| 3.5 | 4.4459 |
| 3.0 | 4.6504 |
| 2.75 | 5.1638 |
| 2.5 | 5.1715 |
| 2.25 | 6.0848 |
| Quant Size | ChatML | Alpaca | Mistral | Vicuna-v1.1 | Vicuna-v0 |
|---|---|---|---|---|---|
| 5.0 | 79.91 | 81.45 | 81.11 | 78.37 | 76.64 |
| 4.5 | 80.64 | 80.9 | 81.65 | 77.04 | 74.6 |
| 4.0 | 80.78 | 79.53 | 82.78 | 79.17 | 76.41 |
| 3.5 | 81.11 | 82.42 | 82.34 | 81.04 | 78.09 |
| 3.0 | 79.13 | 77.74 | 80.11 | 79.38 | 77.25 |
| 2.75 | 79.6 | 77.85 | 79.71 | 76.93 | 75.91 |
| 2.5 | 77.45 | 77.0 | 78.4 | 75.86 | 75.25 |
| 2.25 | 77.18 | 74.06 | 76.75 | 75.56 | 74.28 |
1#!/bin/bash
2
3# Activate the conda environment
4source ~/miniconda3/etc/profile.d/conda.sh
5conda activate exllamav2
6
7# Set the model name and bit size
8MODEL_NAME="miqu-1-70b-sf"
9BIT_PRECISIONS=(8.0 7.0 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.75 2.5 2.25)
10
11# Print the markdown table header
12echo "| Quant Level | Perplexity Score |"
13echo "|-------------|------------------|"
14
15for BIT_PRECISION in "${BIT_PRECISIONS[@]}"
16do
17 MODEL_DIR="models/${MODEL_NAME}_exl2_${BIT_PRECISION}bpw"
18 if [ -d "$MODEL_DIR" ]; then
19 output=$(python test_inference.py -m "$MODEL_DIR" -gs 22,24 -ed data/wikitext/wikitext-2-v1.parquet)
20 score=$(echo "$output" | grep -oP 'Evaluation perplexity: \K[\d.]+')
21 echo "| $BIT_PRECISION | $score |"
22 fi
23done1#!/bin/bash
2
3# Activate the conda environment
4source ~/miniconda3/etc/profile.d/conda.sh
5conda activate exllamav2
6
7# Set the model name and bit size
8MODEL_NAME="miqu-1-70b-sf"
9
10# Define variables
11MODEL_DIR="models/152334H_miqu-1-70b-sf"
12OUTPUT_DIR="exl2_$MODEL_NAME"
13MEASUREMENT_FILE="measurements/$MODEL_NAME.json"
14
15# Create the measurement file if needed
16if [ ! -f "$MEASUREMENT_FILE" ]; then
17 echo "Creating $MEASUREMENT_FILE"
18 # Create directories
19 if [ -d "$OUTPUT_DIR" ]; then
20 rm -r "$OUTPUT_DIR"
21 fi
22 mkdir "$OUTPUT_DIR"
23
24 python convert.py -i $MODEL_DIR -o $OUTPUT_DIR -nr -om $MEASUREMENT_FILE
25fi
26
27# Choose one of the below. Either create a single quant for testing or a batch of them.
28# BIT_PRECISIONS=(5.0)
29BIT_PRECISIONS=(8.0 7.0 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.75 2.5 2.25)
30
31for BIT_PRECISION in "${BIT_PRECISIONS[@]}"
32do
33 CONVERTED_FOLDER="models/${MODEL_NAME}_exl2_${BIT_PRECISION}bpw"
34
35 # If it doesn't already exist, make the quant
36 if [ ! -d "$CONVERTED_FOLDER" ]; then
37
38 echo "Creating $CONVERTED_FOLDER"
39
40 # Create directories
41 if [ -d "$OUTPUT_DIR" ]; then
42 rm -r "$OUTPUT_DIR"
43 fi
44 mkdir "$OUTPUT_DIR"
45 mkdir "$CONVERTED_FOLDER"
46
47 # Run conversion commands
48 python convert.py -i $MODEL_DIR -o $OUTPUT_DIR -nr -m $MEASUREMENT_FILE -b $BIT_PRECISION -cf $CONVERTED_FOLDER
49
50 fi
51done