CoolFace
Modelpublic

amazon/MistralLite-AWQ

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
6likes30downloads
Model Card

MistralLite-AWQ Model

MistralLite-AWQ is a version of the MistralLite model that was quantized using the AWQ method developed by Lin et al. (2023). The MistralLite-AWQ models are approximately 70% smaller than those of MistralLite whilst maintaining comparable performance.

Please refer to the original MistralLite model card for details about the model preparation and training processes.

MistralLite-AWQ Variants

BranchApprox. Model Size`q_group_size``w_bit``version`
main3.9 GB1284GEMM
MistralLite-AWQ-64g-4b-GEMM4.0 GB644GEMM
MistralLite-AWQ-32g-4b-GEMM4.3 GB324GEMM

Dependencies

Evaluations

Long Context

The following benchmark results are shown as accuracy (%) values, unless stated otherwise.

Topic Retrieval

See https://lmsys.org/blog/2023-06-29-longchat/

Model Namen_topics=05n_topics=10n_topics=15n_topics=20n_topics=25
ntokens_ (approx.) =3048596689031183214757
MistralLite10010010010098
MistralLite-AWQ10010010010098
MistralLite-AWQ-64g-4b-GEMM10010010010098
MistralLite-AWQ-32g-4b-GEMM10010010010098
Mistral-7B-Instruct-v0.19652200
Mistral-7B-Instruct-v0.2100100100100100
Mixtral-8x7B-v0.100000
Mixtral-8x7B-Instruct-v0.1100100100100100
Line Retrieval

See https://lmsys.org/blog/2023-06-29-longchat/#longeval-results

Model Namen_lines=200n_lines=300n_lines=400n_lines=500n_lines=600n_lines=680
ntokens_ (approx.) =431764158510106101269814373
MistralLite1009486827666
MistralLite-AWQ969488807062
MistralLite-AWQ-64g-4b-GEMM969690707260
MistralLite-AWQ-32g-4b-GEMM989684767062
Mistral-7B-Instruct-v0.1965638363030
Mistral-7B-Instruct-v0.210010096989684
Mixtral-8x7B-v0.1543856666238
Mixtral-8x7B-Instruct-v0.1100100100100100100
Pass Key Retrieval

See https://github.com/epfml/landmark-attention/blob/main/llama/run_test.py#L101

Model Namen_garbage=12000n_garbage=20000n_garbage=31000n_garbage=38000n_garbage=45000n_garbage=60000
ntokens_ (approx.) =327254058338102051207116072
MistralLite100100100100100100
MistralLite-AWQ100100100100100100
MistralLite-AWQ-64g-4b-GEMM100100100100100100
MistralLite-AWQ-32g-4b-GEMM100100100100100100
Mistral-7B-Instruct-v0.11005030201010
Mistral-7B-Instruct-v0.2100100100100100100
Mixtral-8x7B-v0.1100100100100100100
Mixtral-8x7B-Instruct-v0.110010010090100100
QuALITY (Question Answering with Long Input Texts, Yes!)

See https://nyu-mll.github.io/quality/

Model NameTest set AccuracyHard subset Accuracy
MistralLite56.874.5
MistralLite-AWQ55.371.8
MistralLite-AWQ-64g-4b-GEMM55.272.9
MistralLite-AWQ-32g-4b-GEMM56.672.8
Mistral-7B-Instruct-v0.145.258.9
Mistral-7B-Instruct-v0.255.574
Mixtral-8x7B-v0.17574.1
Mixtral-8x7B-Instruct-v0.168.783.3

Usage

Inference via vLLM HTTP Host

Launch Host

bash
python -m vllm.entrypoints.openai.api_server \
    --model amazon/MistralLite-AWQ \
    --quantization awq

Query Host

bash
curl -X POST http://localhost:8000/v1/completions \
    -H "Content-Type: application/json" \
    -d '{ "model": "amazon/MistralLite-AWQ",
          "prompt": "<|prompter|>What are the main challenges to support a long context for LLM?</s><|assistant|>",
          "temperature": 0,
          "echo": false
    }'

Inference via vLLM Offline Inference

python
from vllm import LLM, SamplingParams

prompts = [
   "<|prompter|>What are the main challenges to support a long context for LLM?</s><|assistant|>",
]
sampling_params = SamplingParams(temperature=0, max_tokens=100)

llm = LLM(model="amazon/MistralLite-AWQ")

outputs = llm.generate(prompts, sampling_params)

# Print the outputs.
for output in outputs:
    prompt = output.prompt
    generated_text = output.outputs[0].text
    print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")

License

Apache 2.0

Limitations

Before using the MistralLite-AWQ model, it is important to perform your own independent assessment, and take measures to ensure that your use would comply with your own specific quality control practices and standards, and that your use would comply with the local rules, laws, regulations, licenses and terms that apply to you, and your content.