Instructions to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound 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 INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: llama cli -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: llama cli -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
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 INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: ./llama-cli -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
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 INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Use Docker
docker model run hf.co/INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
- LM Studio
- Jan
- Ollama
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with Ollama:
ollama run hf.co/INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
- Unsloth Studio
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound 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 INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound 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 INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound to start chatting
- Pi
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with Docker Model Runner:
docker model run hf.co/INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
- Lemonade
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Run and chat with the model
lemonade run user.Ling-flash-2.0-gguf-q2ks-mixed-AutoRound-Q2_K_S
List all available models
lemonade list
- Hermes Agent
How to use INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default INC4AI/Ling-flash-2.0-gguf-q2ks-mixed-AutoRound:Q2_K_S
Run Hermes
hermes
- Atomic Chat
Practical performance feedback
I have an i9-9900k CPU, 32GB RAM, and an NVIDIA 1660 SUPER 6GB GPU. This quantized version runs at a respectable 18 tokens per second (tps) with a 16K context window. I usually use latest llama.cpp, and build from source.
The original Q4 quantized model runs at just 2 tps, so the performance difference is massive.
I also suggest that the Intel team clarify the quantization levels of these tensors. Here's what they look like on this model:
llama_model_loader: - type f32: 191 tensors
llama_model_loader: - type q8_0: 2 tensors
llama_model_loader: - type q2_K: 93 tensors
llama_model_loader: - type q4_K: 160 tensors
Many people hear "Q2" and assume most tensors are quantized to Q2, but as you can see, that's not the case - Q2 is only a small part of all tensors.
Keep up the great work! This allows me to run models up to 100B parameters (like this one), whereas my system tops out at 30B with MoE (Mixture-of-Experts).
Thanks for the information.
1 The exact number isn’t very important as moe is fused. I believe the FP32 tensors are mainly normalization layers, which run very fast and contain very few parameters. What really matters is the Linear layer. As you can see from the model size, the original model is about 220 GB, while ours is around 35 GB , which means the main part of the model has been quantized to 2 bits (scale and min values are not negligible in q2ks. so we could not use the perfect ratio 16/2 )
2 We have clarified the mixed-bit configuration in the model card:
The embedding and lm-head layers fall back to 8-bit, and the non-expert layers fall back to 4-bit.
Please refer to the section "Generate the Model" for more details.