Downloads · 30 days
0
vuiseng9/ov-weight-quantized-llms
ov-weight-quantized-llms is a machine learning model from vuiseng9. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repo contains binary of weight quantized by OpenVINO.
Downloads · 30 days
0
Access
Public
Updated Jul 20, 2024
Repo size
20.1 GB
Likes
1
Public
Click a slice to open those files.
.pth20.1 GB · 100%
From the Hugging Face model README
This repo contains binary of weight quantized by OpenVINO.
| LLM | ratio | group_size |
|----------------- |------- |------------ |
| llama-2-chat-7b | 0.8 | 128 |
| mistral-7b | 0.6 | 64 |
| gemma-2b-it | 0.6 | 64 |
Notes:
import torch
blob_path = "./mistral-7b_r0.6_g64.pth"
blob = torch.load(blob_path)
for layer, attr in blob.items():
print(f"{layer:30} | q_dtype: {attr['q_dtype']:5} | orig. shape: {str(attr['original_shape']):15} | quantized_shape: {str(attr['q_weight'].shape):15}")
# Sample outputs:
.
.
layers.14.mlp.gate_proj | q_dtype: u4 | orig. shape: (11008, 4096) | quantized_shape: (11008, 32, 128)
layers.14.mlp.down_proj | q_dtype: u4 | orig. shape: (4096, 11008) | quantized_shape: (4096, 86, 128)
layers.15.self_attn.k_proj | q_dtype: u8 | orig. shape: (4096, 4096) | quantized_shape: (4096, 4096)
layers.15.self_attn.v_proj | q_dtype: u8 | orig. shape: (4096, 4096) | quantized_shape: (4096, 4096)
layers.15.self_attn.q_proj | q_dtype: u4 | orig. shape: (4096, 4096) | quantized_shape: (4096, 32, 128)
layers.15.self_attn.o_proj | q_dtype: u4 | orig. shape: (4096, 4096) | quantized_shape: (4096, 32, 128)
layers.15.mlp.up_proj | q_dtype: u4 | orig. shape: (11008, 4096) | quantized_shape: (11008, 32, 128)
layers.15.mlp.gate_proj | q_dtype: u4 | orig. shape: (11008, 4096) | quantized_shape: (11008, 32, 128)
layers.15.mlp.down_proj | q_dtype: u4 | orig. shape: (4096, 11008) | quantized_shape: (4096, 86, 128)
layers.16.self_attn.k_proj | q_dtype: u8 | orig. shape: (4096, 4096) | quantized_shape: (4096, 4096)
layers.16.self_attn.v_proj | q_dtype: u8 | orig. shape: (4096, 4096) | quantized_shape: (4096, 4096)
.
.