Instructions to use cortexso/gemma2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use cortexso/gemma2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="cortexso/gemma2", filename="gemma-2-27b-it-q2_k.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cortexso/gemma2 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 cortexso/gemma2:Q4_K_M # Run inference directly in the terminal: llama cli -hf cortexso/gemma2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cortexso/gemma2:Q4_K_M # Run inference directly in the terminal: llama cli -hf cortexso/gemma2: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 cortexso/gemma2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cortexso/gemma2: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 cortexso/gemma2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cortexso/gemma2:Q4_K_M
Use Docker
docker model run hf.co/cortexso/gemma2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use cortexso/gemma2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cortexso/gemma2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cortexso/gemma2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cortexso/gemma2:Q4_K_M
- Ollama
How to use cortexso/gemma2 with Ollama:
ollama run hf.co/cortexso/gemma2:Q4_K_M
- Unsloth Studio
How to use cortexso/gemma2 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 cortexso/gemma2 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 cortexso/gemma2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for cortexso/gemma2 to start chatting
- Atomic Chat new
- Docker Model Runner
How to use cortexso/gemma2 with Docker Model Runner:
docker model run hf.co/cortexso/gemma2:Q4_K_M
- Lemonade
How to use cortexso/gemma2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cortexso/gemma2:Q4_K_M
Run and chat with the model
lemonade run user.gemma2-Q4_K_M
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +10 -0
- gemma-2-27b-it-q2_k.gguf +3 -0
- gemma-2-27b-it-q3_k_l.gguf +3 -0
- gemma-2-27b-it-q3_k_m.gguf +3 -0
- gemma-2-27b-it-q3_k_s.gguf +3 -0
- gemma-2-27b-it-q4_k_m.gguf +3 -0
- gemma-2-27b-it-q4_k_s.gguf +3 -0
- gemma-2-27b-it-q5_k_m.gguf +3 -0
- gemma-2-27b-it-q5_k_s.gguf +3 -0
- gemma-2-27b-it-q6_k.gguf +3 -0
- gemma-2-27b-it-q8_0.gguf +3 -0
.gitattributes
CHANGED
|
@@ -44,3 +44,13 @@ gemma-2-2b-it-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
|
| 44 |
gemma-2-2b-it-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
gemma-2-2b-it-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
gemma-2-2b-it-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
gemma-2-2b-it-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
gemma-2-2b-it-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
gemma-2-2b-it-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
gemma-2-27b-it-q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
gemma-2-27b-it-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
gemma-2-27b-it-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
gemma-2-27b-it-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
gemma-2-27b-it-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
gemma-2-27b-it-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
gemma-2-27b-it-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
gemma-2-27b-it-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
gemma-2-27b-it-q6_k.gguf filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
gemma-2-27b-it-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
gemma-2-27b-it-q2_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b6f69d81d61a19905c90db8a9d4bf88a5923f539da80bdf57d5c7b1d27ce488
|
| 3 |
+
size 10449575584
|
gemma-2-27b-it-q3_k_l.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:205d3ec2a8f01eaea4b8c167edaf2b0b7f1cfb8201f38e45f867a0aa3af95787
|
| 3 |
+
size 14519361184
|
gemma-2-27b-it-q3_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7eae666742f1214187c6292d5d0670351fb196d1a053fd7e6c431957ffaea6f6
|
| 3 |
+
size 13424647840
|
gemma-2-27b-it-q3_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04e342cd9e793b34efbe9d4243422985953cff9c889ebe33ba5b3ee4b472ecbd
|
| 3 |
+
size 12169060000
|
gemma-2-27b-it-q4_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0f4d7bf97f76f775ecfcbee031dd38188bbfce97c919231f56f907e9ee756ac
|
| 3 |
+
size 16645381792
|
gemma-2-27b-it-q4_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1eb712c9a5f4411cc01c0f11d5cc02312c6add3b1d93c8a23321d55fa103607f
|
| 3 |
+
size 15739264672
|
gemma-2-27b-it-q5_k_m.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70e63f89616736ed15cde01cda945ab114c3e05e1c3c52cb032b8793b9e09f90
|
| 3 |
+
size 19408117408
|
gemma-2-27b-it-q5_k_s.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c39cae862766bcff2583b497dc1dbcc3393d8fca52918714f4c27d522e4b991
|
| 3 |
+
size 18884206240
|
gemma-2-27b-it-q6_k.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8eed864c2084f68281a7c74bbaee281a22809523edf1189d79bcd17bb7877fa0
|
| 3 |
+
size 22343524000
|
gemma-2-27b-it-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bec55d52b1d3e7582cb874fa61a48d1fac671490cc0d3c8916752d74808d739
|
| 3 |
+
size 28937387680
|