Instructions to use fedric95/gemma-2-2b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fedric95/gemma-2-2b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fedric95/gemma-2-2b-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("fedric95/gemma-2-2b-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf fedric95/gemma-2-2b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/fedric95/gemma-2-2b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use fedric95/gemma-2-2b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fedric95/gemma-2-2b-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": "fedric95/gemma-2-2b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fedric95/gemma-2-2b-GGUF:Q4_K_M
- SGLang
How to use fedric95/gemma-2-2b-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "fedric95/gemma-2-2b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fedric95/gemma-2-2b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "fedric95/gemma-2-2b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fedric95/gemma-2-2b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use fedric95/gemma-2-2b-GGUF with Ollama:
ollama run hf.co/fedric95/gemma-2-2b-GGUF:Q4_K_M
- Unsloth Studio
How to use fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-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 fedric95/gemma-2-2b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for fedric95/gemma-2-2b-GGUF to start chatting
- Docker Model Runner
How to use fedric95/gemma-2-2b-GGUF with Docker Model Runner:
docker model run hf.co/fedric95/gemma-2-2b-GGUF:Q4_K_M
- Lemonade
How to use fedric95/gemma-2-2b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fedric95/gemma-2-2b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-2-2b-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +11 -0
- gemma-2-2b-Q2_K.gguf +3 -0
- gemma-2-2b-Q3_K_L.gguf +3 -0
- gemma-2-2b-Q3_K_M.gguf +3 -0
- gemma-2-2b-Q3_K_S.gguf +3 -0
- gemma-2-2b-Q4_K_M.gguf +3 -0
- gemma-2-2b-Q4_K_S.gguf +3 -0
- gemma-2-2b-Q5_K_M.gguf +3 -0
- gemma-2-2b-Q5_K_S.gguf +3 -0
- gemma-2-2b-Q6_K.gguf +3 -0
- gemma-2-2b-Q8_0.gguf +3 -0
- gemma-2-2b.FP32.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,14 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
gemma-2-2b-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gemma-2-2b-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
gemma-2-2b-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
gemma-2-2b-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
gemma-2-2b-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
gemma-2-2b-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
gemma-2-2b-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
gemma-2-2b-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
gemma-2-2b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
gemma-2-2b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
gemma-2-2b.FP32.gguf filter=lfs diff=lfs merge=lfs -text
|
gemma-2-2b-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fec2a6b9cea1206bf291f51737c70dab0249e2370f3fec5e07a17e049d64f7af
|
| 3 |
+
size 1229829024
|
gemma-2-2b-Q3_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91dffdfd4ffe323f1452d097b08ae76ace99607982473e4192921dfadfcd3d33
|
| 3 |
+
size 1550435232
|
gemma-2-2b-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e73d60d19bdacdab3e5f117ced2459e26f50e5dd0d30bf31f077bca14d0eca86
|
| 3 |
+
size 1461666720
|
gemma-2-2b-Q3_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1aeb3e93134644cc817d6bd69e376457b3f93a634dae833b795ab77ccd18cc06
|
| 3 |
+
size 1360659360
|
gemma-2-2b-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3e54d0ae0d5e76d3a80e37b0e67f6132af5d8b2678e1bd55880df9583abfc1c
|
| 3 |
+
size 1708581792
|
gemma-2-2b-Q4_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ce7ce3ead49369cc82c25da873ff75b1897c94a109c2335ef5208898ba99e7d
|
| 3 |
+
size 1638650784
|
gemma-2-2b-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d42c6690e7bfb6ed7d8e670d9da327c13539aed9515c739d01ab44da0dde116
|
| 3 |
+
size 1923277728
|
gemma-2-2b-Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a589b4ad8012cbc36011af8bbe1db1bc351e9d6462d57afff546dc89fb7bffdf
|
| 3 |
+
size 1882543008
|
gemma-2-2b-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f11b8998492a9c5d26e88674adacbb37f60b67f53aa05cfa4c463b9f4dfcfc6
|
| 3 |
+
size 2151392160
|
gemma-2-2b-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b113e3d395f895a30981eb3f73d5b053a0154a7444b4b2b87dcbf8023b85b820
|
| 3 |
+
size 2784494496
|
gemma-2-2b.FP32.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:064c215c58902eaa0df3c75d5ab44625f2cb0790a6d5a2d56b8b8196a86deaca
|
| 3 |
+
size 10463413152
|