Instructions to use tensorblock/MiniCPM3-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/MiniCPM3-4B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/MiniCPM3-4B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/MiniCPM3-4B-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/MiniCPM3-4B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/MiniCPM3-4B-GGUF", filename="MiniCPM3-4B-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use tensorblock/MiniCPM3-4B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/MiniCPM3-4B-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/MiniCPM3-4B-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/MiniCPM3-4B-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/MiniCPM3-4B-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 tensorblock/MiniCPM3-4B-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/MiniCPM3-4B-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 tensorblock/MiniCPM3-4B-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/MiniCPM3-4B-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/MiniCPM3-4B-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/MiniCPM3-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/MiniCPM3-4B-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": "tensorblock/MiniCPM3-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tensorblock/MiniCPM3-4B-GGUF:Q2_K
- SGLang
How to use tensorblock/MiniCPM3-4B-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 "tensorblock/MiniCPM3-4B-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": "tensorblock/MiniCPM3-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tensorblock/MiniCPM3-4B-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": "tensorblock/MiniCPM3-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use tensorblock/MiniCPM3-4B-GGUF with Ollama:
ollama run hf.co/tensorblock/MiniCPM3-4B-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/MiniCPM3-4B-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 tensorblock/MiniCPM3-4B-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 tensorblock/MiniCPM3-4B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tensorblock/MiniCPM3-4B-GGUF to start chatting
- Pi new
How to use tensorblock/MiniCPM3-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf tensorblock/MiniCPM3-4B-GGUF:Q2_K
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": "tensorblock/MiniCPM3-4B-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use tensorblock/MiniCPM3-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf tensorblock/MiniCPM3-4B-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 tensorblock/MiniCPM3-4B-GGUF:Q2_K
Run Hermes
hermes
- Docker Model Runner
How to use tensorblock/MiniCPM3-4B-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/MiniCPM3-4B-GGUF:Q2_K
- Lemonade
How to use tensorblock/MiniCPM3-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/MiniCPM3-4B-GGUF:Q2_K
Run and chat with the model
lemonade run user.MiniCPM3-4B-GGUF-Q2_K
List all available models
lemonade list
Remove .gguf files (keep Q2_K.gguf)
Browse files- MiniCPM3-4B-Q3_K_L.gguf +0 -3
- MiniCPM3-4B-Q3_K_M.gguf +0 -3
- MiniCPM3-4B-Q3_K_S.gguf +0 -3
- MiniCPM3-4B-Q4_0.gguf +0 -3
- MiniCPM3-4B-Q4_K_M.gguf +0 -3
- MiniCPM3-4B-Q4_K_S.gguf +0 -3
- MiniCPM3-4B-Q5_0.gguf +0 -3
- MiniCPM3-4B-Q5_K_M.gguf +0 -3
- MiniCPM3-4B-Q5_K_S.gguf +0 -3
- MiniCPM3-4B-Q6_K.gguf +0 -3
- MiniCPM3-4B-Q8_0.gguf +0 -3
MiniCPM3-4B-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:72d636cd6af8656b1119dfdf73c31b193b645cc9bff10a468192f1725aae7087
|
| 3 |
-
size 2193683968
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q3_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bed761aa3cbe804f8f3e17443dda53f10da3e907fedc664cbf41f715f00b7ee6
|
| 3 |
-
size 2022061568
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:77a8f38c27b902c2f23edad72719f8bcfd1714f560fa21e959ae7c4dd7857287
|
| 3 |
-
size 1827040768
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:e6cc3714407deec3772c92c5923101667b969c764fa475fe450c48e0f954ae30
|
| 3 |
-
size 2343079168
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:3b41585e395bb79cb4270601cdbd4c6a6d26e53d0fcacfd9cd4cb34aff900c4b
|
| 3 |
-
size 2469799168
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5aa96b6ddce15211e37d2b75d52632314ca5367772a4e1ed944b4f4cc4f5b840
|
| 3 |
-
size 2357415168
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a0d31ba7408158d440e8050ef66b5e0ce018fa121ab038e4f9c0378946dd37d8
|
| 3 |
-
size 2828762368
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:90c52151a0e2a50ff1c57c96e94fd69eea1f94d3a768993b6c40311ed9f284ce
|
| 3 |
-
size 2894042368
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1647a93df366979305aa694f7163f2d1ef7bb06072ba413de30d8f8c671264cb
|
| 3 |
-
size 2828762368
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:37f46797c32ccf67b8e87d948af26d1ceda176c4bdead36f54273d45677a1521
|
| 3 |
-
size 3344800768
|
|
|
|
|
|
|
|
|
|
|
|
MiniCPM3-4B-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:46b1c81f6e3919d6db1395b2c968b21e19e87f51a22c5105218258d2061af794
|
| 3 |
-
size 4331349728
|
|
|
|
|
|
|
|
|
|
|
|