Text Generation
Transformers
Safetensors
glm4_moe
GPTQ
vLLM
conversational
4-bit precision
gptq_marlin
Instructions to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix") model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix
- SGLang
How to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with Docker Model Runner:
docker model run hf.co/QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix
Commit History
-
Update README.md
Verified signatureb4f3c57 -
Upload model-00012-of-00083.safetensors with huggingface_hub
Verified signature318fee0 -
Upload model-00010-of-00083.safetensors with huggingface_hub
Verified signatureba5e86e -
Upload model-00011-of-00083.safetensors with huggingface_hub
Verified signatured1a759a -
Upload model-00009-of-00083.safetensors with huggingface_hub
Verified signature6eb4ca8 -
Upload model-00013-of-00083.safetensors with huggingface_hub
Verified signature505d935 -
Upload folder using huggingface_hub
Verified signature39524f6 -
Upload model-00083-of-00083.safetensors with huggingface_hub
Verified signature6dba4d3 -
Upload model-00082-of-00083.safetensors with huggingface_hub
Verified signaturee44326b -
Upload model-00081-of-00083.safetensors with huggingface_hub
Verified signature72b97a9 -
Upload model-00080-of-00083.safetensors with huggingface_hub
Verified signaturedd2063c -
Upload model-00079-of-00083.safetensors with huggingface_hub
Verified signature5c181f7 -
Upload model-00078-of-00083.safetensors with huggingface_hub
Verified signature94bd176 -
Upload model-00077-of-00083.safetensors with huggingface_hub
Verified signaturec51fc63 -
Upload model-00076-of-00083.safetensors with huggingface_hub
Verified signaturec2e606a -
Upload model-00075-of-00083.safetensors with huggingface_hub
Verified signaturec23c727 -
Upload model-00074-of-00083.safetensors with huggingface_hub
Verified signature21e79b2 -
Upload model-00073-of-00083.safetensors with huggingface_hub
Verified signature3ff2f69 -
Upload model-00070-of-00083.safetensors with huggingface_hub
Verified signaturea810bdc -
Upload model-00069-of-00083.safetensors with huggingface_hub
Verified signature0c22b0a -
Upload model-00072-of-00083.safetensors with huggingface_hub
Verified signature254093a -
Upload model-00071-of-00083.safetensors with huggingface_hub
Verified signature1f62b7e -
Upload model-00065-of-00083.safetensors with huggingface_hub
Verified signaturee7eed8f -
Upload model-00068-of-00083.safetensors with huggingface_hub
Verified signature6893ca5 -
Upload model-00067-of-00083.safetensors with huggingface_hub
Verified signaturea18e58b -
Upload model-00066-of-00083.safetensors with huggingface_hub
Verified signature0538aa2 -
Upload model-00064-of-00083.safetensors with huggingface_hub
Verified signaturea342345 -
Upload model-00063-of-00083.safetensors with huggingface_hub
Verified signature6fba529 -
Upload model-00062-of-00083.safetensors with huggingface_hub
Verified signature2231271 -
Upload model-00061-of-00083.safetensors with huggingface_hub
Verified signature860f5d8 -
Upload model-00060-of-00083.safetensors with huggingface_hub
Verified signaturea0e7531 -
Upload model-00059-of-00083.safetensors with huggingface_hub
Verified signaturef117a2d -
Upload model-00058-of-00083.safetensors with huggingface_hub
Verified signatured02c3ce -
Upload model-00057-of-00083.safetensors with huggingface_hub
Verified signature192f8ef -
Upload model-00056-of-00083.safetensors with huggingface_hub
Verified signature23f2332 -
Upload model-00055-of-00083.safetensors with huggingface_hub
Verified signature8d5e2b9 -
Upload model-00054-of-00083.safetensors with huggingface_hub
Verified signature700e981 -
Upload model-00051-of-00083.safetensors with huggingface_hub
Verified signatureaf673c0 -
Upload model-00052-of-00083.safetensors with huggingface_hub
Verified signature3027cd4 -
Upload model-00053-of-00083.safetensors with huggingface_hub
Verified signature010352c -
Upload model-00049-of-00083.safetensors with huggingface_hub
Verified signature5efd664 -
Upload model-00050-of-00083.safetensors with huggingface_hub
Verified signatureeba8c7b -
Upload model-00048-of-00083.safetensors with huggingface_hub
Verified signature97c1885 -
Upload model-00046-of-00083.safetensors with huggingface_hub
Verified signature65a8d2d -
Upload model-00047-of-00083.safetensors with huggingface_hub
Verified signature0acb27e -
Upload model-00045-of-00083.safetensors with huggingface_hub
Verified signature67d8f11 -
Upload model-00044-of-00083.safetensors with huggingface_hub
Verified signature9a3f644 -
Upload model-00043-of-00083.safetensors with huggingface_hub
Verified signaturea70178a -
Upload model-00041-of-00083.safetensors with huggingface_hub
Verified signaturebf53bde -
Upload model-00042-of-00083.safetensors with huggingface_hub
Verified signature30c6399