Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

MaziyarPanahi
/
codegemma-7b-GGUF

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
Model card Files Files and versions
xet
Community
1

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
  • 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
codegemma-7b-GGUF
Ctrl+K
Ctrl+K
  • 1 contributor
History: 8 commits
MaziyarPanahi's picture
MaziyarPanahi
bf616316f086f2d1049f46c361cf5692d0f7c6c6fe1a627db5b2b7198011bf86
9c9beca verified over 2 years ago
  • .gitattributes
    1.94 kB
    bf616316f086f2d1049f46c361cf5692d0f7c6c6fe1a627db5b2b7198011bf86 over 2 years ago
  • codegemma-7b.IQ3_XS.gguf
    3.8 GB
    xet
    aa62a048ed560b4ec1833573b8d83c57743c90b313cf05d7355309d7a107b3b3 over 2 years ago
  • codegemma-7b.IQ4_XS.gguf
    4.81 GB
    xet
    c3c5de171030b3a1cc4b71b7be703758f324ae95bf11f77f64a9a0f6e13bfb87 over 2 years ago
  • codegemma-7b.Q2_K.gguf
    3.48 GB
    xet
    23115ef92ad98827666a7e0fb234886b37f5654bb6721019c0564be1470d15b6 over 2 years ago
  • codegemma-7b.Q3_K_L.gguf
    4.71 GB
    xet
    fe0ad740e352ab5ce6e0a9733c0e11d513b549f2cb3153cb37c612ff4011a2dd over 2 years ago
  • codegemma-7b.Q3_K_M.gguf
    4.37 GB
    xet
    27307e0546d8302b998e34e6b97c8edeec6d0bf0a8f268e28a05df5a257ea489 over 2 years ago
  • codegemma-7b.Q3_K_S.gguf
    3.98 GB
    xet
    cec97ae7ba9b8636139cd2e3bc06e09f333d264fa5224ad119f44996b1dfa6d4 over 2 years ago
  • codegemma-7b.Q4_K_M.gguf
    5.33 GB
    xet
    bf616316f086f2d1049f46c361cf5692d0f7c6c6fe1a627db5b2b7198011bf86 over 2 years ago