Downloads · 30 days
10
4% of all-time downloads
cqkking/gemma-4-26B-A4B-it-int4-mixed-AutoRound
gemma-4-26B-A4B-it-int4-mixed-AutoRound is a machine learning model from cqkking. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a mixed int4 model with groupsize 128 and symmetric quantization of google/gemma-4-26B-A4B-it generated by intel/auto-round. Please follow the license of the original model.
Downloads · 30 days
10
4% of all-time downloads
All-time downloads
274
Public
Parameters
4.8B
16.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.2 GB · 100%
How the weights are stored.
I323.3B · 69%
From the Hugging Face model README
This model is a mixed int4 model with group_size 128 and symmetric quantization of google/gemma-4-26B-A4B-it generated by intel/auto-round. Please follow the license of the original model.
The MoE layers of the language module are quantized to 4 bits, other layers of the language module are quantized to 8 bits, and all remaining components are kept at 16 bits.
The model is quantized with pure RTN mode.
from transformers import AutoProcessor, AutoModelForCausalLM
MODEL_ID = "Intel/gemma-4-26B-A4B-it-int4-mixed-AutoRound/"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
# Prompt - add image before text
messages = [
{
"role": "user", "content": [
{"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
print(processor.parse_response(response))
{'content': 'This image shows the Golden Gate Bridge in San Francisco, California. It is a large, bright orange-red suspension bridge that spans the entrance to the San Francisco Bay. In the foreground, there is a large stone building (Fort Point) and a rocky coastline, with a large rock sitting in the water. The hills of Marin County can be seen in the background across the water.', 'role': 'assistant'}
https://github.com/intel/auto-round/pull/1656 is required
auto-round
google/gemma-4-26B-A4B-it
--layer_config
'{"model.language_model.layers.\d+.self_attn..*":{"bits":"8"},"model.language_model.layers.\d+.mlp..*":{"bits":"8"},"model.language_model.layers.\d+.router..*":{"bits":"8"}}'
--iters
0
--output_dir
"./quantized"
--scheme
W4A16
--disable_opt_rtn
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
Therefore, before deploying any applications of the model, developers should perform safety testing.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
Here are a couple of useful links to learn more about Intel's AI software:
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }