Instructions to use mlx-community/GLM-4-32B-Base-0414-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/GLM-4-32B-Base-0414-6bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/GLM-4-32B-Base-0414-6bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/GLM-4-32B-Base-0414-6bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "mlx-community/GLM-4-32B-Base-0414-6bit" --prompt "Once upon a time"
- Atomic Chat
Download config.json from mlx-community/GLM-4-32B-Base-0414-6bit: direct link, hf CLI and curl.
- Browser
- Download file 908 Bytes
-
https://huggingface.co/mlx-community/GLM-4-32B-Base-0414-6bit/resolve/main/config.json
- Command line
-
hf download hf://mlx-community/GLM-4-32B-Base-0414-6bit/config.json
-
curl -L -o config.json https://huggingface.co/mlx-community/GLM-4-32B-Base-0414-6bit/resolve/main/config.json
908 Bytes
| { | |
| "architectures": [ | |
| "Glm4ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "eos_token_id": [ | |
| 151329, | |
| 151336, | |
| 151338 | |
| ], | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 6144, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 23040, | |
| "max_position_embeddings": 32768, | |
| "model_type": "glm4", | |
| "num_attention_heads": 48, | |
| "num_hidden_layers": 61, | |
| "num_key_value_heads": 2, | |
| "pad_token_id": 151329, | |
| "partial_rotary_factor": 0.5, | |
| "quantization": { | |
| "group_size": 64, | |
| "bits": 6 | |
| }, | |
| "quantization_config": { | |
| "group_size": 64, | |
| "bits": 6 | |
| }, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 10000.0, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.52.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 151552 | |
| } |