Run this model with HF Jobs
Run QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs and Transformers to run batch inference with https://huggingface.co/QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs and Lighteval to evaluate https://huggingface.co/QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use QuantTrio/GLM-4.7-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.7-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.7-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.7-GPTQ-Int4-Int8Mix") model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-4.7-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.7-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.7-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.7-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix
- SGLang
How to use QuantTrio/GLM-4.7-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.7-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.7-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.7-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.7-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix with Docker Model Runner:
docker model run hf.co/QuantTrio/GLM-4.7-GPTQ-Int4-Int8Mix
Add files using upload-large-folder tool
Browse filesFiles changed (21)
- .gitattributes+1
- config.jsonAdded+63
- configuration.jsonAdded+1
- generation_config.jsonAdded+11
- model-00006-of-00071.safetensorsAdded+3
- model-00009-of-00071.safetensorsAdded+3
- model-00012-of-00071.safetensorsAdded+3
- model-00014-of-00071.safetensorsAdded+3
- model-00019-of-00071.safetensorsAdded+3
- model-00025-of-00071.safetensorsAdded+3
- model-00026-of-00071.safetensorsAdded+3
- model-00031-of-00071.safetensorsAdded+3
- model-00040-of-00071.safetensorsAdded+3
- model-00044-of-00071.safetensorsAdded+3
- model-00047-of-00071.safetensorsAdded+3
- model-00054-of-00071.safetensorsAdded+3
- model-00057-of-00071.safetensorsAdded+3
- model-00060-of-00071.safetensorsAdded+3
- model-00061-of-00071.safetensorsAdded+3
- model-00065-of-00071.safetensorsAdded+3
- tokenizer.jsonAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263{ "name_or_path": "tclf90/GLM-4.7-GPTQ-Int4-Int8Mix", "architectures": [ "Glm4MoeForCausalLM" ], "attention_bias": true, "attention_dropout": 0.0, "pad_token_id": 151329, "eos_token_id": [ 151329, 151336, 151338 ], "head_dim": 128, "hidden_act": "silu", "hidden_size": 5120, "partial_rotary_factor": 0.5, "initializer_range": 0.02, "intermediate_size": 12288, "max_position_embeddings": 202752, "model_type": "glm4_moe", "moe_intermediate_size": 1536, "norm_topk_prob": true, "num_attention_heads": 96, "n_group": 1, "topk_group": 1, "n_routed_experts": 160, "n_shared_experts": 1, "routed_scaling_factor": 2.5, "num_experts_per_tok": 8, "first_k_dense_replace": 3, "num_hidden_layers": 92, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 1000000, "num_nextn_predict_layers": 1, "tie_word_embeddings": false, "torch_dtype": "float16", "transformers_version": "4.54.0", "use_cache": true, "use_qk_norm": true, "vocab_size": 151552, "quantization_config": { "quant_method": "gptq", "bits": 4, "group_size": 128, "sym": true, "desc_act": false, "dynamic": { "-:model.embed_tokens.weight": {}, "-:.*shared_experts": {}, "-:.*shared_head": {}, "-:lm_head.weight": {}, "+:model[.]layers[.].*[.]self_attn[.].*": { "bits": 8 }, "+:model[.]layers[.]([0-3]|89|9[0-2])[.].*": { "bits": 8 } } }}1{"framework":"Pytorch","task":"text-generation"}1234567891011{ "_from_model_config": true, "eos_token_id": [ 151329, 151336, 151338 ], "pad_token_id": 151329, "temperature": 1.0, "transformers_version": "4.56.2"}123version https://git-lfs.github.com/spec/v1oid sha256:e02c584a4b98a81dbbcd6fc0957c8a10ca16fb87497e79db05120f8d63f7a9d0size 2998138016123version https://git-lfs.github.com/spec/v1oid sha256:09e711b072c2086bdd9d4a1ff31c21ea92943a70d1e9d61cb913cc50ec78a9ecsize 2998336728123version https://git-lfs.github.com/spec/v1oid sha256:95643a168a7184a7978a5d3f66ad690b5f8befd9786db3a8354d364c52ff6725size 2998336368123version https://git-lfs.github.com/spec/v1oid sha256:4e4725ae78c8d157200baeb1a15aec1529f04cdc8fc75f7eb1f078b968361d1esize 2998336792123version https://git-lfs.github.com/spec/v1oid sha256:3878031ab5a8361297b04028dd1fd6c295da90d9ec3fc41e356156dcebb465f4size 2997202784123version https://git-lfs.github.com/spec/v1oid sha256:1422d3f6c4acc4a9f234ccc5c2022662384e748517eb0b513f97839ab81c05c4size 2998336256123version https://git-lfs.github.com/spec/v1oid sha256:ea5d1c68e87429c3a47ab5523c5f20e9ab7c614e25c7ec3c621c32e20afb02b9size 2998140120123version https://git-lfs.github.com/spec/v1oid sha256:c39fcd1e752f527a673da82fb847337842804c8e10792ea4d8ce76c8fa1d9801size 2998140048123version https://git-lfs.github.com/spec/v1oid sha256:df231db86782e1c2e921e5b763bc2561491f279073c5132577f6519b604ac1f3size 2998322272123version https://git-lfs.github.com/spec/v1oid sha256:ecf9c0dbd4c315838139e66085a82857262e73c473d3ea97e2de34cf6d5af11asize 2998140120123version https://git-lfs.github.com/spec/v1oid sha256:c9845c4ee8bdbea110919de982567c6adf5e803cb227ecd38fdaf769e3653ec2size 2998140472123version https://git-lfs.github.com/spec/v1oid sha256:e02dcd22bc961f2188a33648cc78105cdee5dce5ba14a31fcac75b012bdbf2f5size 2966449120123version https://git-lfs.github.com/spec/v1oid sha256:e5101f4f671a6ca9e8caecffac4a402ecb662aee923d2a315f1f77d9d0441354size 2998140224123version https://git-lfs.github.com/spec/v1oid sha256:40b4d3302f7b9868fbe560feffd54d6a69f7f44b63d94679495d05675066dd31size 2998140640123version https://git-lfs.github.com/spec/v1oid sha256:a72798c42e76e3ae460ca062f6818dd4b58862eecdd280c8d694f912b160bb2dsize 2998336256123version https://git-lfs.github.com/spec/v1oid sha256:7919e4ae240df7448aeb4d3d2d6f6ad95a684cd35ed875263f244ec01fcd37bfsize 2995057976123version https://git-lfs.github.com/spec/v1oid sha256:9340665016419c825c4bdabbcc9acc43b7ca2c68ce142724afa829abb1be5efdsize 19970699.gitattributes+1
config.jsonAdded+63
configuration.jsonAdded+1
generation_config.jsonAdded+11
model-00006-of-00071.safetensorsAdded+3
model-00009-of-00071.safetensorsAdded+3
model-00012-of-00071.safetensorsAdded+3
model-00014-of-00071.safetensorsAdded+3
model-00019-of-00071.safetensorsAdded+3
model-00025-of-00071.safetensorsAdded+3
model-00026-of-00071.safetensorsAdded+3
model-00031-of-00071.safetensorsAdded+3
model-00040-of-00071.safetensorsAdded+3
model-00044-of-00071.safetensorsAdded+3
model-00047-of-00071.safetensorsAdded+3
model-00054-of-00071.safetensorsAdded+3
model-00057-of-00071.safetensorsAdded+3
model-00060-of-00071.safetensorsAdded+3
model-00061-of-00071.safetensorsAdded+3
model-00065-of-00071.safetensorsAdded+3
tokenizer.jsonAdded+3