Text Generation
GGUF
Chinese
English
glm
chatglm
thudm
quantized
GGUF
quantization
imat
imatrix
static
16bit
8bit
6bit
5bit
4bit
3bit
2bit
1bit
conversational
Instructions to use legraphista/glm-4-9b-chat-IMat-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use legraphista/glm-4-9b-chat-IMat-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S # Run inference directly in the terminal: llama cli -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S # Run inference directly in the terminal: llama cli -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S # Run inference directly in the terminal: ./llama-cli -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
Use Docker
docker model run hf.co/legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
- LM Studio
- Jan
- vLLM
How to use legraphista/glm-4-9b-chat-IMat-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "legraphista/glm-4-9b-chat-IMat-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "legraphista/glm-4-9b-chat-IMat-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
- Ollama
How to use legraphista/glm-4-9b-chat-IMat-GGUF with Ollama:
ollama run hf.co/legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
- Unsloth Studio
How to use legraphista/glm-4-9b-chat-IMat-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for legraphista/glm-4-9b-chat-IMat-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for legraphista/glm-4-9b-chat-IMat-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for legraphista/glm-4-9b-chat-IMat-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use legraphista/glm-4-9b-chat-IMat-GGUF with Docker Model Runner:
docker model run hf.co/legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
- Lemonade
How to use legraphista/glm-4-9b-chat-IMat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull legraphista/glm-4-9b-chat-IMat-GGUF:Q4_K_S
Run and chat with the model
lemonade run user.glm-4-9b-chat-IMat-GGUF-Q4_K_S
List all available models
lemonade list
Upload imatrix.log with huggingface_hub
Browse files- imatrix.log +112 -0
imatrix.log
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
llama_model_loader: loaded meta data with 24 key-value pairs and 283 tensors from glm-4-9b-chat-IMat-GGUF/glm-4-9b-chat.Q8_0.gguf.hardlink.gguf (version GGUF V3 (latest))
|
| 2 |
+
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
|
| 3 |
+
llama_model_loader: - kv 0: general.architecture str = chatglm
|
| 4 |
+
llama_model_loader: - kv 1: general.name str = glm-4-9b-chat
|
| 5 |
+
llama_model_loader: - kv 2: chatglm.context_length u32 = 131072
|
| 6 |
+
llama_model_loader: - kv 3: chatglm.embedding_length u32 = 4096
|
| 7 |
+
llama_model_loader: - kv 4: chatglm.feed_forward_length u32 = 13696
|
| 8 |
+
llama_model_loader: - kv 5: chatglm.block_count u32 = 40
|
| 9 |
+
llama_model_loader: - kv 6: chatglm.attention.head_count u32 = 32
|
| 10 |
+
llama_model_loader: - kv 7: chatglm.attention.head_count_kv u32 = 2
|
| 11 |
+
llama_model_loader: - kv 8: chatglm.attention.layer_norm_rms_epsilon f32 = 0.000000
|
| 12 |
+
llama_model_loader: - kv 9: general.file_type u32 = 7
|
| 13 |
+
llama_model_loader: - kv 10: chatglm.rope.dimension_count u32 = 64
|
| 14 |
+
llama_model_loader: - kv 11: tokenizer.ggml.add_bos_token bool = false
|
| 15 |
+
llama_model_loader: - kv 12: tokenizer.ggml.model str = gpt2
|
| 16 |
+
llama_model_loader: - kv 13: tokenizer.ggml.pre str = chatglm-bpe
|
| 17 |
+
llama_model_loader: - kv 14: tokenizer.ggml.tokens arr[str,151552] = ["!", "\"", "#", "$", "%", "&", "'", ...
|
| 18 |
+
llama_model_loader: - kv 15: tokenizer.ggml.token_type arr[i32,151552] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
|
| 19 |
+
llama_model_loader: - kv 16: tokenizer.ggml.merges arr[str,151073] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
|
| 20 |
+
llama_model_loader: - kv 17: tokenizer.ggml.padding_token_id u32 = 151329
|
| 21 |
+
llama_model_loader: - kv 18: tokenizer.ggml.bos_token_id u32 = 151329
|
| 22 |
+
llama_model_loader: - kv 19: tokenizer.ggml.eos_token_id u32 = 151329
|
| 23 |
+
llama_model_loader: - kv 20: tokenizer.ggml.eot_token_id u32 = 151336
|
| 24 |
+
llama_model_loader: - kv 21: tokenizer.ggml.unknown_token_id u32 = 151329
|
| 25 |
+
llama_model_loader: - kv 22: tokenizer.chat_template str = ChatGLM4
|
| 26 |
+
llama_model_loader: - kv 23: general.quantization_version u32 = 2
|
| 27 |
+
llama_model_loader: - type f32: 121 tensors
|
| 28 |
+
llama_model_loader: - type q8_0: 162 tensors
|
| 29 |
+
llm_load_vocab: special tokens cache size = 223
|
| 30 |
+
llm_load_vocab: token to piece cache size = 0.9732 MB
|
| 31 |
+
llm_load_print_meta: format = GGUF V3 (latest)
|
| 32 |
+
llm_load_print_meta: arch = chatglm
|
| 33 |
+
llm_load_print_meta: vocab type = BPE
|
| 34 |
+
llm_load_print_meta: n_vocab = 151552
|
| 35 |
+
llm_load_print_meta: n_merges = 151073
|
| 36 |
+
llm_load_print_meta: n_ctx_train = 131072
|
| 37 |
+
llm_load_print_meta: n_embd = 4096
|
| 38 |
+
llm_load_print_meta: n_head = 32
|
| 39 |
+
llm_load_print_meta: n_head_kv = 2
|
| 40 |
+
llm_load_print_meta: n_layer = 40
|
| 41 |
+
llm_load_print_meta: n_rot = 64
|
| 42 |
+
llm_load_print_meta: n_embd_head_k = 128
|
| 43 |
+
llm_load_print_meta: n_embd_head_v = 128
|
| 44 |
+
llm_load_print_meta: n_gqa = 16
|
| 45 |
+
llm_load_print_meta: n_embd_k_gqa = 256
|
| 46 |
+
llm_load_print_meta: n_embd_v_gqa = 256
|
| 47 |
+
llm_load_print_meta: f_norm_eps = 0.0e+00
|
| 48 |
+
llm_load_print_meta: f_norm_rms_eps = 1.6e-07
|
| 49 |
+
llm_load_print_meta: f_clamp_kqv = 0.0e+00
|
| 50 |
+
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
|
| 51 |
+
llm_load_print_meta: f_logit_scale = 0.0e+00
|
| 52 |
+
llm_load_print_meta: n_ff = 13696
|
| 53 |
+
llm_load_print_meta: n_expert = 0
|
| 54 |
+
llm_load_print_meta: n_expert_used = 0
|
| 55 |
+
llm_load_print_meta: causal attn = 1
|
| 56 |
+
llm_load_print_meta: pooling type = 0
|
| 57 |
+
llm_load_print_meta: rope type = 0
|
| 58 |
+
llm_load_print_meta: rope scaling = linear
|
| 59 |
+
llm_load_print_meta: freq_base_train = 10000.0
|
| 60 |
+
llm_load_print_meta: freq_scale_train = 1
|
| 61 |
+
llm_load_print_meta: n_ctx_orig_yarn = 131072
|
| 62 |
+
llm_load_print_meta: rope_finetuned = unknown
|
| 63 |
+
llm_load_print_meta: ssm_d_conv = 0
|
| 64 |
+
llm_load_print_meta: ssm_d_inner = 0
|
| 65 |
+
llm_load_print_meta: ssm_d_state = 0
|
| 66 |
+
llm_load_print_meta: ssm_dt_rank = 0
|
| 67 |
+
llm_load_print_meta: model type = 8B
|
| 68 |
+
llm_load_print_meta: model ftype = Q8_0
|
| 69 |
+
llm_load_print_meta: model params = 9.40 B
|
| 70 |
+
llm_load_print_meta: model size = 9.30 GiB (8.50 BPW)
|
| 71 |
+
llm_load_print_meta: general.name = glm-4-9b-chat
|
| 72 |
+
llm_load_print_meta: BOS token = 151329 '<|endoftext|>'
|
| 73 |
+
llm_load_print_meta: EOS token = 151329 '<|endoftext|>'
|
| 74 |
+
llm_load_print_meta: UNK token = 151329 '<|endoftext|>'
|
| 75 |
+
llm_load_print_meta: PAD token = 151329 '<|endoftext|>'
|
| 76 |
+
llm_load_print_meta: LF token = 128 'Ä'
|
| 77 |
+
llm_load_print_meta: EOT token = 151336 '<|user|>'
|
| 78 |
+
ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
|
| 79 |
+
ggml_cuda_init: CUDA_USE_TENSOR_CORES: yes
|
| 80 |
+
ggml_cuda_init: found 1 CUDA devices:
|
| 81 |
+
Device 0: NVIDIA GeForce RTX 4090, compute capability 8.9, VMM: yes
|
| 82 |
+
llm_load_tensors: ggml ctx size = 0.31 MiB
|
| 83 |
+
llm_load_tensors: offloading 40 repeating layers to GPU
|
| 84 |
+
llm_load_tensors: offloading non-repeating layers to GPU
|
| 85 |
+
llm_load_tensors: offloaded 41/41 layers to GPU
|
| 86 |
+
llm_load_tensors: CPU buffer size = 629.00 MiB
|
| 87 |
+
llm_load_tensors: CUDA0 buffer size = 8897.23 MiB
|
| 88 |
+
.................................................................................
|
| 89 |
+
llama_new_context_with_model: n_ctx = 512
|
| 90 |
+
llama_new_context_with_model: n_batch = 512
|
| 91 |
+
llama_new_context_with_model: n_ubatch = 512
|
| 92 |
+
llama_new_context_with_model: flash_attn = 0
|
| 93 |
+
llama_new_context_with_model: freq_base = 10000.0
|
| 94 |
+
llama_new_context_with_model: freq_scale = 1
|
| 95 |
+
llama_kv_cache_init: CUDA0 KV buffer size = 20.00 MiB
|
| 96 |
+
llama_new_context_with_model: KV self size = 20.00 MiB, K (f16): 10.00 MiB, V (f16): 10.00 MiB
|
| 97 |
+
llama_new_context_with_model: CUDA_Host output buffer size = 0.58 MiB
|
| 98 |
+
llama_new_context_with_model: CUDA0 compute buffer size = 304.00 MiB
|
| 99 |
+
llama_new_context_with_model: CUDA_Host compute buffer size = 9.01 MiB
|
| 100 |
+
llama_new_context_with_model: graph nodes = 1606
|
| 101 |
+
llama_new_context_with_model: graph splits = 2
|
| 102 |
+
|
| 103 |
+
system_info: n_threads = 25 / 32 | AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 1 | AVX512_VBMI = 1 | AVX512_VNNI = 1 | AVX512_BF16 = 1 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 |
|
| 104 |
+
compute_imatrix: tokenizing the input ..
|
| 105 |
+
compute_imatrix: tokenization took 122.54 ms
|
| 106 |
+
compute_imatrix: computing over 125 chunks with batch_size 512
|
| 107 |
+
compute_imatrix: 0.65 seconds per pass - ETA 1.35 minutes
|
| 108 |
+
[1]7.9954,[2]6.0663,[3]5.9242,[4]7.2853,[5]7.2095,[6]6.0079,[7]6.4837,[8]6.8565,[9]7.0213,
|
| 109 |
+
save_imatrix: stored collected data after 10 chunks in glm-4-9b-chat-IMat-GGUF/imatrix.dat
|
| 110 |
+
[10]6.1378,[11]6.7411,[12]7.3944,[13]7.8688,[14]8.1976,[15]8.6583,[16]9.1342,[17]9.4154,[18]9.1001,[19]8.6114,
|
| 111 |
+
save_imatrix: stored collected data after 20 chunks in glm-4-9b-chat-IMat-GGUF/imatrix.dat
|
| 112 |
+
[20]8.5978,nan detected in blk.18.attn_output.weight
|