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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

unsloth
/
grok-2-GGUF

Transformers
GGUF
Grok
unsloth
imatrix
conversational
Model card Files Files and versions
xet
Community
5

Instructions to use unsloth/grok-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use unsloth/grok-2-GGUF with Transformers:

    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("unsloth/grok-2-GGUF", dtype="auto")
  • Grok

    How to use unsloth/grok-2-GGUF with Grok:

    # No code snippets available yet for this library.
    
    # To use this model, check the repository files and the library's documentation.
    
    # Want to help? PRs adding snippets are welcome at:
    # https://github.com/huggingface/huggingface.js
  • llama-cpp-python

    How to use unsloth/grok-2-GGUF with llama-cpp-python:

    # !pip install llama-cpp-python
    
    from llama_cpp import Llama
    
    llm = Llama.from_pretrained(
    	repo_id="unsloth/grok-2-GGUF",
    	filename="BF16/grok-2-BF16-00001-of-00011.gguf",
    )
    
    llm.create_chat_completion(
    	messages = "No input example has been defined for this model task."
    )
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • llama.cpp

    How to use unsloth/grok-2-GGUF with llama.cpp:

    Install from brew
    brew install llama.cpp
    # Start a local OpenAI-compatible server with a web UI:
    llama-server -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    # Run inference directly in the terminal:
    llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    Install from WinGet (Windows)
    winget install llama.cpp
    # Start a local OpenAI-compatible server with a web UI:
    llama-server -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    # Run inference directly in the terminal:
    llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    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 unsloth/grok-2-GGUF:UD-Q4_K_XL
    # Run inference directly in the terminal:
    ./llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    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 unsloth/grok-2-GGUF:UD-Q4_K_XL
    # Run inference directly in the terminal:
    ./build/bin/llama-cli -hf unsloth/grok-2-GGUF:UD-Q4_K_XL
    Use Docker
    docker model run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
  • LM Studio
  • Jan
  • Ollama

    How to use unsloth/grok-2-GGUF with Ollama:

    ollama run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
  • Unsloth Studio

    How to use unsloth/grok-2-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 unsloth/grok-2-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 unsloth/grok-2-GGUF to start chatting
    Using HuggingFace Spaces for Unsloth
    # No setup required
    # Open https://huggingface.co/spaces/unsloth/studio in your browser
    # Search for unsloth/grok-2-GGUF to start chatting
  • Docker Model Runner

    How to use unsloth/grok-2-GGUF with Docker Model Runner:

    docker model run hf.co/unsloth/grok-2-GGUF:UD-Q4_K_XL
  • Lemonade

    How to use unsloth/grok-2-GGUF with Lemonade:

    Pull the model
    # Download Lemonade from https://lemonade-server.ai/
    lemonade pull unsloth/grok-2-GGUF:UD-Q4_K_XL
    Run and chat with the model
    lemonade run user.grok-2-GGUF-UD-Q4_K_XL
    List all available models
    lemonade list
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

mac studio : loading model vocabulary: unknown pre-tokenizer type: 'grok-2'

#5 opened 9 months ago by
cloudyu

it run on colab good

1
#4 opened 9 months ago by
wekW

in part

1
#3 opened 9 months ago by
wekW

GGUF shows eos_token_id == separator_token_id == 1

3
#2 opened 9 months ago by
MrMeOrYou

Decent performance with 96GB VRAM / 256GB DDR5

❤️ 3
1
#1 opened 9 months ago by
phakio
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs