Views
No views yet
1# Install llama.cpp (requires b7618 or later)
2# Download from https://github.com/ggml-org/llama.cpp/releases
3
4# Run inference
5llama-cli -m GLM-4.7-REAP-40p-Q5_K_M.gguf \
6 -p "Your prompt here" \
7 -n 512 \
8 -c 4096 \
9 -t 81from llama_cpp import Llama
2
3llm = Llama(
4 model_path="GLM-4.7-REAP-40p-Q5_K_M.gguf",
5 n_ctx=32768,
6 n_gpu_layers=-1, # offload all to GPU
7 verbose=True
8)
9
10output = llm(
11 "Q: What is the capital of France? A:",
12 max_tokens=128,
13 stop=["Q:", "\n"],
14 echo=True
15)
16print(output['choices'][0]['text'])num_nextn_predict_layers=1 but the actual weights don't contain a NextN layer (it was pruned away). These GGUF files have been converted with the corrected config (num_nextn_predict_layers=0), so they will load without errors.--output-tensor-type Q8_0 for the output layer to preserve generation quality. Quantization was performed using llama.cpp b7618.