Model Details
This model is an int4 model with group_size 128 and symmetric quantization of zai-org/GLM-4.5 generated by intel/auto-round algorithm. Please follow the license of the original model.
How To Use
vLLM usage
VLLM_WORKER_MULTIPROC_METHOD=spawn python -m vllm.entrypoints.openai.api_server --port 8001 --trust-remote-code --tensor-parallel-size 4 --gpu-memory-utilization 0.90 --model Intel/GLM-4.5-int4-AutoRound --enable-expert-parallel --max-model-len 32768 --max-seq-len-to-capture 32768
INT4 Inference
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_PATH = "Intel/GLM-4.5-int4-AutoRound"
messages = [{"role": "user", "content": "Give me a short introduction to large language model."}]
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
)
model = AutoModelForCausalLM.from_pretrained(
pretrained_model_name_or_path=MODEL_PATH,
torch_dtype=torch.bfloat16,
device_map="auto",
)
inputs = inputs.to(model.device)
inputs.pop("token_type_ids")
generated_ids = model.generate(**inputs, max_new_tokens=512, do_sample=False)
output_text = tokenizer.decode(generated_ids[0][inputs.input_ids.shape[1] :])
print(output_text)
"""
<think>We are writing a short introduction to Large Language Models (LLMs).
The introduction should cover:
1. What they are (definition and core concept)
2. How they work (briefly, without too much technical detail)
3. What they can do (applications)
4. Why they are important (impact and significance)
Let's structure it in a few concise paragraphs.</think>A **Large Language Model (LLM)** is a type of artificial intelligence designed to understand, generate, and interact with human language at scale. Built using deep learning techniques—typically transformer architectures—LLMs are trained on vast datasets (e.g., books, articles, websites) to learn patterns, grammar, context, and even reasoning within text. By processing billions of parameters, they predict and produce coherent, contextually relevant responses to prompts, mimicking human-like communication.
LLMs power applications like chatbots (e.g., ChatGPT), translation tools, content creation, code generation, and summarization. Their versatility stems from their ability to generalize from training data, enabling tasks ranging from answering complex questions to drafting creative writing.
These models represent a leap in AI, transforming industries by automating language-based tasks, enhancing human-computer interaction, and accelerating research. However, they also raise challenges around accuracy, bias, and ethical use, making ongoing refinement and responsible deployment critical.<|user|>
"""
Generate the model
auto_round --model zai-org/GLM-4.5 --ites 200 --low_gpu_mem_usage --group_size 128 --seqlen 512 --output_dir tmp_autoround
Ethical Considerations and Limitations
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.
Caveats and Recommendations
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:
- Intel Neural Compressor link
Disclaimer
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.
Cite
@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} }
- Downloads last month
- 10
Model tree for Intel/GLM-4.5-int4-AutoRound
Base model
zai-org/GLM-4.5