Model Details
This model is an int4 model with group_size 128 and symmetric quantization of Qwen/Qwen3-235B-A22B-Thinking-2507 generated by intel/auto-round algorithm. Please follow the license of the original model.
How To Use
vLLM usage
vllm serve Intel/Qwen3-235B-A22B-Thinking-2507-int4-AutoRound --tensor-parallel-size 4 --max-model-len 32768
INT4 Inference on CPU/Intel GPU/CUDA
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Intel/Qwen3-235B-A22B-Thinking-2507-int4-AutoRound"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
# prepare the model input
prompt = "Give me a short introduction to large language model."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
**model_inputs,
max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
# parsing thinking content
try:
# rindex finding 151668 (</think>)
index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
index = 0
thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
print("thinking content:", thinking_content) # no opening <think> tag
print("content:", content)
"""
thinking content: Okay, the user asked for a short introduction to large language models. Let me start by breaking down what they need. They probably want a concise explanation without too much jargon. Since they specified "short," I should keep it to the essentials.
First, I need to define what an LLM is. Mention that it's a type of AI trained on massive text data. Highlight key capabilities like understanding and generating human-like text. Maybe include examples of tasks they can do鈥攚riting, translating, answering questions. That makes it relatable.
Wait, the user might not know technical terms like "deep learning" or "transformer architecture." Should I explain those? Probably not, since they want it short. But a brief mention of the underlying tech could add context without diving deep. Just say they're based on advanced neural networks.
Also, important to note that LLMs predict the next word. That's a core mechanism. But avoid getting too technical. Emphasize the scale鈥攂illions of parameters and huge datasets. That's why they're "large."
Should I mention limitations? The user didn't ask, but it's part of a proper intro. Maybe a sentence about not understanding like humans and potential inaccuracies. But since they want it short, maybe just hint at it without details.
Check if the response covers: definition, how they work (briefly), what they can do, and a note on limitations. Keep it under a few paragraphs. Avoid markdown as per the user's request. Use simple language. Make sure it's clear and not overwhelming.
Also, consider the user's possible background. Could be a student, professional, or someone curious about AI. Tailor to a general audience. No need for references or citations. Just straightforward points.
Double-check the key points: trained on vast text, predict text, various applications, scale matters, limitations. Yep, that covers it. Keep examples concrete like chatbots, translation. Avoid mentioning specific models unless necessary鈥攎aybe just say "like ChatGPT" as an example.
Alright, structure: one paragraph defining LLMs, another on capabilities, a sentence on how they work, and a brief note on limitations. Make sure it's all concise.
</think>
content: A **Large Language Model (LLM)** is a type of artificial intelligence trained to understand, generate, and interact with human language. Built using deep learning (typically *transformer* architectures), LLMs learn patterns from massive datasets of text鈥攐ften spanning books, websites, and other written material. This training allows them to perform tasks like answering questions, writing stories, translating languages, coding, and even holding conversations, all by predicting the most likely next word in a sequence.
Key traits:
- **Scale**: They have billions (or trillions) of parameters鈥攊nternal "knobs" fine-tuned during training鈥攅nabling nuanced language handling.
- **Versatility**: One model can handle diverse tasks without task-specific retraining (a trait called *few-shot learning*).
- **Limitations**: They don鈥檛 "understand" meaning like humans; they mimic patterns, which can lead to inaccuracies, biases, or nonsensical outputs.
Examples include OpenAI鈥檚 GPT series, Google鈥檚 Gemini, and Meta鈥檚 Llama. While powerful, LLMs are tools鈥攖hey augment human creativity and efficiency but require careful use to manage errors and ethical risks.
"""
Generate the model
Here is the sample command to reproduce the model
auto-round --model Qwen/Qwen3-235B-A22B-Thinking-2507 --output_dir "./tmp_autoround" --enable_torch_compile --nsamples 512 --fp_layers mlp.gate
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
- 73
Model tree for Intel/Qwen3-235B-A22B-Thinking-2507-int4-AutoRound
Base model
Qwen/Qwen3-235B-A22B-Thinking-2507