Text Generation
GGUF
mesh-llm
layer-package
skippy
distributed-inference
local-inference
openai-compatible
conversational
Instructions to use meshllm/DeepSeek-R1-Q4_K_M-layers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="meshllm/DeepSeek-R1-Q4_K_M-layers", filename="layers/layer-000.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf meshllm/DeepSeek-R1-Q4_K_M-layers # Run inference directly in the terminal: llama-cli -hf meshllm/DeepSeek-R1-Q4_K_M-layers
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf meshllm/DeepSeek-R1-Q4_K_M-layers # Run inference directly in the terminal: llama-cli -hf meshllm/DeepSeek-R1-Q4_K_M-layers
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 meshllm/DeepSeek-R1-Q4_K_M-layers # Run inference directly in the terminal: ./llama-cli -hf meshllm/DeepSeek-R1-Q4_K_M-layers
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 meshllm/DeepSeek-R1-Q4_K_M-layers # Run inference directly in the terminal: ./build/bin/llama-cli -hf meshllm/DeepSeek-R1-Q4_K_M-layers
Use Docker
docker model run hf.co/meshllm/DeepSeek-R1-Q4_K_M-layers
- LM Studio
- Jan
- vLLM
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "meshllm/DeepSeek-R1-Q4_K_M-layers" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "meshllm/DeepSeek-R1-Q4_K_M-layers", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/meshllm/DeepSeek-R1-Q4_K_M-layers
- Ollama
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with Ollama:
ollama run hf.co/meshllm/DeepSeek-R1-Q4_K_M-layers
- Unsloth Studio
How to use meshllm/DeepSeek-R1-Q4_K_M-layers 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 meshllm/DeepSeek-R1-Q4_K_M-layers 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 meshllm/DeepSeek-R1-Q4_K_M-layers to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for meshllm/DeepSeek-R1-Q4_K_M-layers to start chatting
- Docker Model Runner
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with Docker Model Runner:
docker model run hf.co/meshllm/DeepSeek-R1-Q4_K_M-layers
- Lemonade
How to use meshllm/DeepSeek-R1-Q4_K_M-layers with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull meshllm/DeepSeek-R1-Q4_K_M-layers
Run and chat with the model
lemonade run user.DeepSeek-R1-Q4_K_M-layers-{{QUANT_TAG}}List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -11,18 +11,17 @@ tags:
|
|
| 11 |
- distributed-inference
|
| 12 |
- local-inference
|
| 13 |
- openai-compatible
|
| 14 |
-
- queued
|
| 15 |
---
|
| 16 |
|
| 17 |
<div align="center">
|
| 18 |
<a href="https://www.meshllm.cloud">
|
| 19 |
-
<img src="https://
|
| 20 |
</a>
|
| 21 |
|
| 22 |
<h1>DeepSeek-R1-Q4_K_M</h1>
|
| 23 |
|
| 24 |
<p>
|
| 25 |
-
<strong>
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<p>
|
|
@@ -32,13 +31,15 @@ tags:
|
|
| 32 |
</p>
|
| 33 |
</div>
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
|
| 37 |
## Highlights
|
| 38 |
|
| 39 |
-
| Run locally | Pool multiple machines | OpenAI-compatible | Package
|
| 40 |
|---|---|---|---|
|
| 41 |
-
| Private inference on your hardware | Split layers across peers | Serve `/v1/chat/completions` locally |
|
| 42 |
|
| 43 |
## Model Overview
|
| 44 |
|
|
@@ -49,17 +50,73 @@ This repository has been reserved for a Mesh LLM layer package derived from [uns
|
|
| 49 |
| **Family** | DeepSeek |
|
| 50 |
| **Parameter scale** | not recorded |
|
| 51 |
| **Quantization** | `Q4_K_M` |
|
| 52 |
-
| **
|
| 53 |
-
| **
|
|
|
|
| 54 |
| **Source file** | `DeepSeek-R1-Q4_K_M/DeepSeek-R1-Q4_K_M-00001-of-00009.gguf` |
|
| 55 |
| **Package repo** | [meshllm/DeepSeek-R1-Q4_K_M-layers](https://huggingface.co/meshllm/DeepSeek-R1-Q4_K_M-layers) |
|
| 56 |
-
| **Queue run** | [https://github.com/Mesh-LLM/mesh-llm/actions/runs/25580536970](https://github.com/Mesh-LLM/mesh-llm/actions/runs/25580536970) |
|
| 57 |
|
| 58 |
## Recommended Use
|
| 59 |
|
| 60 |
-
-
|
| 61 |
-
-
|
| 62 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
## Links
|
| 65 |
|
|
|
|
| 11 |
- distributed-inference
|
| 12 |
- local-inference
|
| 13 |
- openai-compatible
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
<div align="center">
|
| 17 |
<a href="https://www.meshllm.cloud">
|
| 18 |
+
<img src="https://github.com/Mesh-LLM/mesh-llm/raw/main/docs/mesh-llm-logo.svg" alt="Mesh LLM" width="220">
|
| 19 |
</a>
|
| 20 |
|
| 21 |
<h1>DeepSeek-R1-Q4_K_M</h1>
|
| 22 |
|
| 23 |
<p>
|
| 24 |
+
<strong>Distributed GGUF inference package for Mesh LLM</strong>
|
| 25 |
</p>
|
| 26 |
|
| 27 |
<p>
|
|
|
|
| 31 |
</p>
|
| 32 |
</div>
|
| 33 |
|
| 34 |
+
GGUF layer package for running **DeepSeek-R1-Q4_K_M** across a local Mesh LLM cluster.
|
| 35 |
+
|
| 36 |
+
This package is derived from [unsloth/DeepSeek-R1-GGUF](https://huggingface.co/unsloth/DeepSeek-R1-GGUF) and keeps the original GGUF distribution split into per-layer artifacts for distributed inference.
|
| 37 |
|
| 38 |
## Highlights
|
| 39 |
|
| 40 |
+
| Run locally | Pool multiple machines | OpenAI-compatible | Package variant |
|
| 41 |
|---|---|---|---|
|
| 42 |
+
| Private inference on your hardware | Split layers across peers | Serve `/v1/chat/completions` locally | `Q4_K_M` layer package |
|
| 43 |
|
| 44 |
## Model Overview
|
| 45 |
|
|
|
|
| 50 |
| **Family** | DeepSeek |
|
| 51 |
| **Parameter scale** | not recorded |
|
| 52 |
| **Quantization** | `Q4_K_M` |
|
| 53 |
+
| **Layer count** | 61 |
|
| 54 |
+
| **Activation width** | 7168 |
|
| 55 |
+
| **Package size** | 377.0 GB |
|
| 56 |
| **Source file** | `DeepSeek-R1-Q4_K_M/DeepSeek-R1-Q4_K_M-00001-of-00009.gguf` |
|
| 57 |
| **Package repo** | [meshllm/DeepSeek-R1-Q4_K_M-layers](https://huggingface.co/meshllm/DeepSeek-R1-Q4_K_M-layers) |
|
|
|
|
| 58 |
|
| 59 |
## Recommended Use
|
| 60 |
|
| 61 |
+
- Local and private inference with Mesh LLM.
|
| 62 |
+
- Multi-machine serving when the full GGUF is too large for one host.
|
| 63 |
+
- OpenAI-compatible chat/completions workflows through Mesh LLM's local API.
|
| 64 |
+
|
| 65 |
+
For upstream architecture details, chat template guidance, sampling recommendations, license terms, and benchmark notes, see the source model card: [unsloth/DeepSeek-R1-GGUF](https://huggingface.co/unsloth/DeepSeek-R1-GGUF).
|
| 66 |
+
|
| 67 |
+
## Quickstart
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
# Run this on each machine that should contribute memory/compute.
|
| 71 |
+
mesh-llm serve --model "meshllm/DeepSeek-R1-Q4_K_M-layers" --split
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
# Check the mesh and discover the OpenAI-compatible model name.
|
| 76 |
+
curl -s http://localhost:3131/api/status
|
| 77 |
+
curl -s http://localhost:3131/v1/models
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
```bash
|
| 81 |
+
# Send an OpenAI-compatible chat request.
|
| 82 |
+
curl -s http://localhost:3131/v1/chat/completions \
|
| 83 |
+
-H "Content-Type: application/json" \
|
| 84 |
+
-d '{
|
| 85 |
+
"model": "unsloth/DeepSeek-R1-GGUF:DeepSeek-R1-Q4_K_M",
|
| 86 |
+
"messages": [{"role": "user", "content": "Write a tiny hello-world function in Rust."}],
|
| 87 |
+
"max_tokens": 128
|
| 88 |
+
}'
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
## Package Variant
|
| 92 |
+
|
| 93 |
+
| Property | Value |
|
| 94 |
+
|---|---|
|
| 95 |
+
| **Format** | `layer-package` |
|
| 96 |
+
| **Canonical source ref** | `unsloth/DeepSeek-R1-GGUF@main/DeepSeek-R1-Q4_K_M/DeepSeek-R1-Q4_K_M-00001-of-00009.gguf` |
|
| 97 |
+
| **Source revision** | `main` |
|
| 98 |
+
| **Source SHA-256** | `d111d9e28b4035e6781906b6451b7866737b4a4ee734baa1575c55d8aa1b4200` |
|
| 99 |
+
| **Skippy ABI** | `0.1.22` |
|
| 100 |
+
| **Package manifest SHA-256** | `f5a62c4f2f5427ac6e083d7666313832cb61a2fc5d8dacfc317b540d8ac82e9d` |
|
| 101 |
+
|
| 102 |
+
## What Is Included
|
| 103 |
+
|
| 104 |
+
| Artifact | Path | Contents | SHA-256 |
|
| 105 |
+
|---|---|---|---|
|
| 106 |
+
| Manifest | `model-package.json` | Package schema, source identity, checksums | `f5a62c4f2f5427ac6e083d7666313832cb61a2fc5d8dacfc317b540d8ac82e9d` |
|
| 107 |
+
| Metadata | `shared/metadata.gguf` | 0 tensors, 5.0 MB | `0e1bf01f20ef69f691126b69c633fd63977cd190bea4182a1c9f41d1537b0ad6` |
|
| 108 |
+
| Embeddings | `shared/embeddings.gguf` | 1 tensors, 502.1 MB | `951352774cabdce1e5fe940b30ca85ac8440de68afb6c6eceb451524109991f1` |
|
| 109 |
+
| Output head | `shared/output.gguf` | 2 tensors, 730.0 MB | `131fcb580fd1ba667733e39ffc806f819f54928621f40cd47405399a8b9abecb` |
|
| 110 |
+
| Transformer layers | `layers/layer-*.gguf` | 61 layer artifacts, 1022 tensors, 375.8 GB | `see model-package.json` |
|
| 111 |
+
|
| 112 |
+
## Validation
|
| 113 |
+
|
| 114 |
+
Generated by the Mesh LLM HF Jobs splitter from `mesh-llm` ref `main`.
|
| 115 |
+
Each artifact is checksummed as it is written, uploaded to this repository, and removed from the job workspace before the next artifact is produced.
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
skippy-model-package write-package "/source/DeepSeek-R1-Q4_K_M/DeepSeek-R1-Q4_K_M-00001-of-00009.gguf" --out-dir "/tmp/meshllm-layer-job-meshllm_DeepSeek-R1-Q4_K_M-layers-137/package"
|
| 119 |
+
```
|
| 120 |
|
| 121 |
## Links
|
| 122 |
|