Downloads · 30 days
9
3% of all-time downloads
dropbox-dash/Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit
Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit is a text generation model from dropbox-dash. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This is an <a href="https://github.com/mobiusml/hqq/"HQQ</a all 4-bit (group-size=128) quantized <a href="https://huggingface.co/Qwen/Qwen2.5-7B-Instruct"Qwen2.5-7B-Instruct</a model, via <a href="https://github.com/p…
Downloads · 30 days
9
3% of all-time downloads
All-time downloads
274
Public
Repo size
5.7 GB
Likes
2
Public
Click a slice to open those files.
.bin5.6 GB · 100%
From the Hugging Face model README
This is an <a href="https://github.com/mobiusml/hqq/">HQQ</a> all 4-bit (group-size=128) quantized <a href="https://huggingface.co/Qwen/Qwen2.5-7B-Instruct">Qwen2.5-7B-Instruct</a> model, via <a href="https://github.com/pytorch/ao/">TorchAO</a> and <a href="https://github.com/mobiusml/gemlite/">GemLite</a> as a backend.
First, install the dependecies:
pip install torchao;
pip install git+https://github.com/mobiusml/gemlite.git;
Then you can use the sample code below:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, HqqConfig
model_id = "mobiuslabsgmbh/Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit"
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map='cuda',
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
Use in <a href="https://github.com/vllm-project/vllm/">vLLM</a>:
from vllm import LLM
from vllm.sampling_params import SamplingParams
model_id = "mobiuslabsgmbh/Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit"
llm = LLM(model=model_id, max_model_len=4096)
sampling_params = SamplingParams(temperature=0.8, top_p=0.95, max_tokens=1024)
outputs = llm.generate(["What is the capital of Germany?"], sampling_params)
print(outputs[0].outputs[0].text)