Downloads · 30 days
20
10% of all-time downloads
nota-ai/GLM-4.5-Air-NotaMoeQuant-Int4
GLM-4.5-Air-NotaMoeQuant-Int4 is a text generation model from nota-ai. Use it when you need the model to write or continue text. The card lists the license as cc-by-nc-4.0.
We developed a weight-only quantization method specialized for the Mixture-of-Experts (MoE) architecture, and we release GLM-4.5-Air quantized with our algorithm. The quantized weights are packed using an AutoRound-ba…
Downloads · 30 days
20
10% of all-time downloads
All-time downloads
194
Public
Parameters
1.2B
57.4 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors57.4 GB · 100%
How the weights are stored.
I3213.3B · 87%
From the Hugging Face model README
We developed a weight-only quantization method specialized for the Mixture-of-Experts (MoE) architecture, and we release GLM-4.5-Air quantized with our algorithm. The quantized weights are packed using an AutoRound-based quantization format.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_NAME = "nota-ai/GLM-4.5-Air-NotaMoeQuant-Int4"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(
MODEL_NAME,
dtype="auto",
trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model.eval()
# prepare the model input
prompt = "What is large language model?"
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
return_token_type_ids=False
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
model_inputs['input_ids'],
attention_mask=model_inputs['attention_mask'],
max_new_tokens=150
)