Instructions to use asedmammad/gemma-2b-it-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 asedmammad/gemma-2b-it-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 asedmammad/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf asedmammad/gemma-2b-it-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf asedmammad/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf asedmammad/gemma-2b-it-GGUF:Q4_K_M
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 asedmammad/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf asedmammad/gemma-2b-it-GGUF:Q4_K_M
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 asedmammad/gemma-2b-it-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf asedmammad/gemma-2b-it-GGUF:Q4_K_M
Use Docker
docker model run hf.co/asedmammad/gemma-2b-it-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use asedmammad/gemma-2b-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asedmammad/gemma-2b-it-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asedmammad/gemma-2b-it-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/asedmammad/gemma-2b-it-GGUF:Q4_K_M
- Ollama
How to use asedmammad/gemma-2b-it-GGUF with Ollama:
ollama run hf.co/asedmammad/gemma-2b-it-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use asedmammad/gemma-2b-it-GGUF with Docker Model Runner:
docker model run hf.co/asedmammad/gemma-2b-it-GGUF:Q4_K_M
- Lemonade
How to use asedmammad/gemma-2b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull asedmammad/gemma-2b-it-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-2b-it-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Create README.md
#1
by asedmammad - opened
README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
inference: false
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- gemma
|
| 7 |
+
- text-generation-inference
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
license: other
|
| 10 |
+
license_name: gemma-terms-of-use
|
| 11 |
+
license_link: https://ai.google.dev/gemma/terms
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Google's Gemma-2b-it GGUF
|
| 15 |
+
|
| 16 |
+
These files are GGUF format model files for [Googles's Gemma-2b-it](https://huggingface.co/google/gemma-2b-it).
|
| 17 |
+
|
| 18 |
+
GGUF files are for CPU + GPU inference using [llama.cpp](https://github.com/ggerganov/llama.cpp) and libraries and UIs which support this format, such as:
|
| 19 |
+
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
| 20 |
+
* [KoboldCpp](https://github.com/LostRuins/koboldcpp)
|
| 21 |
+
* [ParisNeo/GPT4All-UI](https://github.com/ParisNeo/gpt4all-ui)
|
| 22 |
+
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
|
| 23 |
+
* [ctransformers](https://github.com/marella/ctransformers)
|
| 24 |
+
|
| 25 |
+
## How to run in `llama.cpp`
|
| 26 |
+
|
| 27 |
+
I use the following command line, adjust for your tastes and needs:
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
./main -t 2 -ngl 18 -m gemma-2b-it.q8_0.gguf -p '<start_of_turn>user\nWhat is love?\n<end_of_turn>\n<start_of_turn>model\n' --no-penalize-nl -e --color --temp 0.95 -c 1024 -n 512 --repeat_penalty 1.2 --top_p 0.95 --top_k 50
|
| 31 |
+
```
|
| 32 |
+
Change `-t 2` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`.
|
| 33 |
+
|
| 34 |
+
Change `-ngl 18` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
| 35 |
+
|
| 36 |
+
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`, you can use `--interactive-first` to start in interactive mode:
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
./main -t 2 -ngl 18 -m gemma-2b-it.q8_0.gguf --in-prefix '<start_of_turn>user\n' --in-suffix '<end_of_turn>\n<start_of_turn>model\n' -i -ins --no-penalize-nl -e --color --temp 0.95 -c 1024 -n 512 --repeat_penalty 1.2 --top_p 0.95 --top_k 50
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
## Compatibility
|
| 43 |
+
|
| 44 |
+
I have uploded both the original llama.cpp quant methods (`q4_0, q4_1, q5_0, q5_1, q8_0`) as well as the k-quant methods (`q2_K, q3_K_S, q3_K_M, q3_K_L, q4_K_S, q4_K_M, q5_K_S, q6_K`).
|
| 45 |
+
|
| 46 |
+
Please refer to [llama.cpp](https://github.com/ggerganov/llama.cpp) and [TheBloke](https://huggingface.co/TheBloke)'s GGUF models for further explanation.
|
| 47 |
+
|
| 48 |
+
## How to run in `text-generation-webui`
|
| 49 |
+
|
| 50 |
+
Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md).
|
| 51 |
+
|
| 52 |
+
<!-- footer start -->
|
| 53 |
+
## Thanks
|
| 54 |
+
|
| 55 |
+
Thanks to [Google](https://huggingface.co/google) for providing checkpoints of the model.
|
| 56 |
+
|
| 57 |
+
Thanks to [Georgi Gerganov](https://github.com/ggerganov) and all of the awesome people in the AI community.
|