Instructions to use unsloth/grok-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/grok-2-GGUF with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/grok-2-GGUF", device_map="auto") - Grok
How to use unsloth/grok-2-GGUF with Grok:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/grok-2-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 unsloth/grok-2-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/grok-2-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
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 unsloth/grok-2-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
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 unsloth/grok-2-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- Ollama
How to use unsloth/grok-2-GGUF with Ollama:
ollama run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Docker Model Runner
How to use unsloth/grok-2-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/grok-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/grok-2-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.grok-2-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,7 +32,7 @@ base_model:
|
|
| 32 |
|
| 33 |
- Use `--jinja` for `llama.cpp`. You must use [PR 15539](https://github.com/ggml-org/llama.cpp/pull/15539). For example use the code below: <br>
|
| 34 |
- `git clone https://github.com/ggml-org/llama.cpp`
|
| 35 |
-
- `git fetch origin pull/15539/head:MASTER && git checkout MASTER`
|
| 36 |
|
| 37 |
Utilizes Alvaro's Grok-2 HF compatible tokenizer as provided [here](https://huggingface.co/alvarobartt/grok-2-tokenizer)
|
| 38 |
|
|
|
|
| 32 |
|
| 33 |
- Use `--jinja` for `llama.cpp`. You must use [PR 15539](https://github.com/ggml-org/llama.cpp/pull/15539). For example use the code below: <br>
|
| 34 |
- `git clone https://github.com/ggml-org/llama.cpp`
|
| 35 |
+
- `cd llama.cpp && git fetch origin pull/15539/head:MASTER && git checkout MASTER && cd ..`
|
| 36 |
|
| 37 |
Utilizes Alvaro's Grok-2 HF compatible tokenizer as provided [here](https://huggingface.co/alvarobartt/grok-2-tokenizer)
|
| 38 |
|