Text Generation
Transformers
GGUF
Safetensors
mistral
quantized
2-bit
3-bit
4-bit precision
5-bit
6-bit
8-bit precision
GGUF
gemma
has_space
text-generation-inference
Instructions to use MaziyarPanahi/codegemma-7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaziyarPanahi/codegemma-7b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MaziyarPanahi/codegemma-7b-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MaziyarPanahi/codegemma-7b-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MaziyarPanahi/codegemma-7b-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 MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf MaziyarPanahi/codegemma-7b-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 MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf MaziyarPanahi/codegemma-7b-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 MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MaziyarPanahi/codegemma-7b-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 MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use MaziyarPanahi/codegemma-7b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MaziyarPanahi/codegemma-7b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaziyarPanahi/codegemma-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
- SGLang
How to use MaziyarPanahi/codegemma-7b-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 "MaziyarPanahi/codegemma-7b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaziyarPanahi/codegemma-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "MaziyarPanahi/codegemma-7b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaziyarPanahi/codegemma-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use MaziyarPanahi/codegemma-7b-GGUF with Ollama:
ollama run hf.co/MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use MaziyarPanahi/codegemma-7b-GGUF with Docker Model Runner:
docker model run hf.co/MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
- Lemonade
How to use MaziyarPanahi/codegemma-7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MaziyarPanahi/codegemma-7b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.codegemma-7b-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Upload folder using huggingface_hub
Verified signature671430e -
Upload folder using huggingface_hub (#1)
Verified signature- aa62a048ed560b4ec1833573b8d83c57743c90b313cf05d7355309d7a107b3b3 (2127ad44f9f614580d7d647abb4368799c005402) - c3c5de171030b3a1cc4b71b7be703758f324ae95bf11f77f64a9a0f6e13bfb87 (7bbe59ad878fb0c73820b7cf902c5b3346b4af07) - 23115ef92ad98827666a7e0fb234886b37f5654bb6721019c0564be1470d15b6 (1ffe2474291e28c42ed2134ff6bab6dc1f0b8376) - fe0ad740e352ab5ce6e0a9733c0e11d513b549f2cb3153cb37c612ff4011a2dd (c1e3071cae816ba285f750490c3e4e84c27b47fc) - 27307e0546d8302b998e34e6b97c8edeec6d0bf0a8f268e28a05df5a257ea489 (a169ca5cedd1fb8c10fe1f2f8e9cc1360f52e4b0) - cec97ae7ba9b8636139cd2e3bc06e09f333d264fa5224ad119f44996b1dfa6d4 (028b732abc9a3727c8acc82af8ce3e28963e1dff) - bf616316f086f2d1049f46c361cf5692d0f7c6c6fe1a627db5b2b7198011bf86 (9c9beca8f4ce016df2bfd0667f1e4e8680f07bac) - 616214555c7dfd8b3f2d17ae3696a618a0460aa7d93de30c0a7842cca3111849 (d92cb10a0f497a00783e4ba10c23530d9ee4240b) - ee5764ffd0d48de36dcff32e787483b3bc28512489428c6949358eced01a3539 (639e1d2a3aec09ed00b82476fa7126dd330ade21) - edb76970…8bb2d55 -
initial commit
Verified signature49195c6