Instructions to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-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 AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
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 AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
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 AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
Use Docker
docker model run hf.co/AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
- SGLang
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-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 "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Ollama:
ollama run hf.co/AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
- Unsloth Desktop
- Pi
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Docker Model Runner:
docker model run hf.co/AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
- Lemonade
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
Run and chat with the model
lemonade run user.DeepSeek-V4.1-Flash-FP8-GGUF-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
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 AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K
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 "AMAImedia/DeepSeek-V4.1-Flash-FP8-GGUF:Q2_K" \ --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"
Running DeepSWE with dsh-minimal and mini-swe-agent
1. Prerequisites
- Docker, running and able to pull images
- Python 3.12+ and uv
- An endpoint and key for any DeepSeek-API-compatible service (the DeepSeek official API is used as the example below)
export DEEPSEEK_API_KEY=sk-your-key-here
export DEEPSEEK_BASE_URL=https://api.deepseek.com
2. Get Pier and DeepSWE
git clone https://github.com/datacurve-ai/pier.git
git -C pier checkout 0c802fc067a425345b24d1c69411aa98acf61a1d
git clone https://github.com/datacurve-ai/deep-swe.git
git -C deep-swe checkout 0b9fabbb63b9104d678fe965e1632f2dd9eaa2ea
3. Patch and install Pier
dsh-minimal.patch ships next to this document. Treat it as a reference patch and adapt it to your own setup.
cd pier
git apply /path/to/dsh-minimal.patch
uv sync
What the patch changes:
- Adds the
dsh-minimalagent, which drives the Harness SDK and folds its event stream into a Pier ATIF trajectory. The SDK artifact is never installed into the image: step 4's--mounts-jsonbind-mounts it read-only into the sandbox, so no trial installs anything. - Appends a runtime-constraints section to the task instruction for both agents: work in
/app, leave/testsalone, no network or package mirror. - Passes test-runner concurrency caps into the container: Docker's
--cpusis only a quota, sonprocinside the container reports the host's core count and test runners size their worker pools from that rather than from the container's share. - Enables IPv6 loopback in the container: Docker disables it by default, so suites that bind
::1are skipped and scored as failures. - Makes
--mounts-jsonadditive instead of replacing the default mounts, keeping the/logsbinds that carry agent logs and collected patches.
4. Run the suite
Both agents take the same task set, concurrency, and --no-delete (which keeps the task images cached between trials). Repeat each run with a different --job-name and average the results.
Each trial's container takes the 2 CPUs and 8 GB its task declares, so size -n against the host's cores and memory.
mini-swe-agent
Pier installs it into each task image at trial time, so no host-side preparation is needed.
uv run pier run \
-p ../deep-swe/tasks \
--agent mini-swe-agent \
--model deepseek/deepseek-flash \
--ak reasoning_effort=max \
--ak cost_limit=0 \
--ae DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
--ae DEEPSEEK_BASE_URL="$DEEPSEEK_BASE_URL" \
-n 32 --no-delete -r 2 --job-name deepswe-mini-run1 -y
--modeltakes a litellm-styleprovider/modelstring.
dsh-minimal
Install the Harness SDK artifact once on the host, then bind-mount it read-only into every container.
mkdir -p ~/dsh-minimal && cd ~/dsh-minimal
uv pip install --target dsh-dist \
--python-version 3.12 --python-platform x86_64-manylinux_2_28 \
'deepseek-harness-sdk==0.1.5.*'
uv run pier run \
-p ../deep-swe/tasks \
--agent dsh-minimal \
--model deepseek-flash \
--ak reasoning_effort=max \
--ae DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
--ae DEEPSEEK_BASE_URL="$DEEPSEEK_BASE_URL" \
--mounts-json '[{"type":"bind","source":"'"$HOME"'/dsh-minimal/dsh-dist","target":"/opt/dsh-minimal","read_only":true}]' \
-n 32 --no-delete --job-name deepswe-dsh-run1 -y
- In
--mounts-json,sourceis the absolute path of thedsh-distdirectory above;targetis always/opt/dsh-minimal.
5. Read the results
jobs/<job-name>/
result.json pass rate and token totals
<task>__<id>/
result.json reward, fail-to-pass / pass-to-pass counts, tokens
agent/trajectory.json full ATIF trajectory (dsh-minimal)
agent/mini-swe-agent.trajectory.json mini-swe-agent trajectory
verifier/ reward.json and test output
Browse a job with uv run pier view jobs/<job-name>.