Views
No views yet
google/txgemma-2b-predict using llama.cpp via the ggml.ai's all-gguf-same-where space.
Refer to the original model card for more details on the model.Q4_K_M (Best balance of speed/quality)Q4_0 (Optimized for ARM CPUs)Q8_0 (Near-original quality)| 🚀 Download | 🔢 Type | 📝 Notes |
|---|---|---|
| Download | Basic quantization | |
| Download | Small size | |
| Download | Balanced quality | |
| Download | Better quality | |
| Download | Fast on ARM | |
| Download | Fast, recommended | |
| Download | Best balance | |
| Download | Good quality | |
| Download | Balanced | |
| Download | High quality | |
| Download | Very good quality | |
| Download | Fast, best quality | |
| Download | Maximum accuracy |
F16 for maximum precision when quality is criticalllama.cpp team that:1# System updates
2sudo apt update && sudo apt upgrade -y
3
4# Dependencies
5sudo apt install -y build-essential cmake python3-pip
6
7# Clone and build llama.cpp
8git clone https://github.com/ggerganov/llama.cpp
9cd llama.cpp
10make -j4https://huggingface.co/matrixportal/txgemma-2b-predict-GGUF/resolve/main/txgemma-2b-predict-q4_k_m.ggufwget https://huggingface.co/matrixportal/txgemma-2b-predict-GGUF/resolve/main/txgemma-2b-predict-q4_k_m.gguf./main -m txgemma-2b-predict-q4_k_m.gguf -p "Your prompt here" -n 128./main -m txgemma-2b-predict-q4_k_m.gguf -p "[INST] Write a short poem about AI quantization in the style of Shakespeare [/INST]" -n 256 -c 2048 -t 8 --temp 0.71./main -m txgemma-2b-predict-q4_k_m.gguf -p "Question: What is the GGUF format?
2Answer:" -n 256 -c 2048 -t 8 --temp 0.7 --top-k 40 --top-p 0.9pip install llama-cpp-python1from llama_cpp import Llama
2
3# Initialize the model
4llm = Llama(
5 model_path="txgemma-2b-predict-q4_k_m.gguf",
6 n_ctx=2048,
7 n_threads=8
8)
9
10# Run inference
11response = llm(
12 "[INST] Explain GGUF quantization to a beginner [/INST]",
13 max_tokens=256,
14 temperature=0.7,
15 top_p=0.9
16)
17
18print(response["choices"][0]["text"])-t (typically CPU core count)-c parameter--temp 0 for consistent resultsmake LLAMA_CUBLAS=1 for NVIDIA GPUs