Edit model card
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Aya-23-8B - AWQ Quantized

Description

This repo contains AWQ model files for Cohere's Aya-23-8B.

Aya 23 is an open weights research release of an instruction fine-tuned model with highly advanced multilingual capabilities. The model focuses on pairing a highly performant pre-trained Command family of models with the recently released Aya Collection. The result is a powerful multilingual large language model serving 23 languages.

About AWQ

AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference.

It is also now supported by continuous batching server vLLM, allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantized models. However, using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.

Model Summary

Aya 23 is an open weights research release of an instruction fine-tuned model with highly advanced multilingual capabilities. Aya 23 focuses on pairing a highly performant pre-trained Command family of models with the recently released Aya Collection. The result is a powerful multilingual large language model serving 23 languages.

It covers 23 languages: Arabic, Chinese (simplified & traditional), Czech, Dutch, English, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Persian, Polish, Portuguese, Romanian, Russian, Spanish, Turkish, Ukrainian, and Vietnamese.

Developed by: Cohere For AI and Cohere

  • Model: aya-23-8B-AWQ-GEMM
  • Model Size: 8 billion parameters
  • Bits: 4
  • Q-Group Size: 128

This is an AWQ quantized version of the Aya-23-8B model using AutoAWQ.

Usage

Please install transformers from the source repository that includes the necessary changes for this model.

# pip install transformers==4.41.1
# pip install autoawq
from transformers import AutoTokenizer
from awq import AutoAWQForCausalLM

quant_path = "path/to/quantized/model"

tokenizer = AutoTokenizer.from_pretrained(quant_path)
model = AutoAWQForCausalLM.from_quantized(quant_path, fuse_layers=True)

# Format message with the command-r-plus chat template
messages = [{"role": "user", "content": "Anneme onu ne kadar sevdiğimi anlatan bir mektup yaz"}]
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
## <BOS_TOKEN>Anneme onu ne kadar sevdiğimi anlatan bir mektup yaz

gen_tokens = model.generate(
    input_ids, 
    max_new_tokens=100, 
    do_sample=True, 
    temperature=0.3,
    )

gen_text = tokenizer.decode(gen_tokens[0])
print(gen_text)

Model Details

Input: Models input text only.

Output: Models generate text only.

Model Architecture: Aya-23-8B is an auto-regressive language model that uses an optimized transformer architecture. After pretraining, this model is fine-tuned (IFT) to follow human instructions.

Languages covered: The model is particularly optimized for multilinguality and supports the following languages: Arabic, Chinese (simplified & traditional), Czech, Dutch, English, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Persian, Polish, Portuguese, Romanian, Russian, Spanish, Turkish, Ukrainian, and Vietnamese

Context length: 8192

Please refer to the Aya 23 technical report for further details about the base model, data, instruction tuning, and evaluation.

Downloads last month
76
Safetensors
Model size
3.03B params
Tensor type
I32
·
FP16
·
Inference API
Input a message to start chatting with alijawad07/aya-23-8B-AWQ-GEMM.
This model can be loaded on Inference API (serverless).