Instructions to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="diffuse-cpp/Dream-v0-Instruct-7B-GGUF", filename="dream-7b-q4km.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
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 diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
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 diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
Use Docker
docker model run hf.co/diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "diffuse-cpp/Dream-v0-Instruct-7B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "diffuse-cpp/Dream-v0-Instruct-7B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
- Ollama
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with Ollama:
ollama run hf.co/diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
- Unsloth Studio new
How to use diffuse-cpp/Dream-v0-Instruct-7B-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 diffuse-cpp/Dream-v0-Instruct-7B-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 diffuse-cpp/Dream-v0-Instruct-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for diffuse-cpp/Dream-v0-Instruct-7B-GGUF to start chatting
- Docker Model Runner
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with Docker Model Runner:
docker model run hf.co/diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
- Lemonade
How to use diffuse-cpp/Dream-v0-Instruct-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull diffuse-cpp/Dream-v0-Instruct-7B-GGUF:Q8_0
Run and chat with the model
lemonade run user.Dream-v0-Instruct-7B-GGUF-Q8_0
List all available models
lemonade list
diffuse-cpp is now Apache-2.0 — Dream-7B excels at math and code on CPU
We just open-sourced diffuse-cpp under Apache-2.0!
diffuse-cpp is the first C++ inference engine for Diffusion Language Models, built on GGML.
Dream-7B Benchmarks (AMD EPYC 12-Core, Q4_K_M, entropy_exit + cache)
| Prompt | Dream-7B | llama.cpp | Speedup |
|---|---|---|---|
| Capital of France? | 21.6 tok/s (2 steps) | 8.51 tok/s | 2.5x |
| 15 x 23 = ? | 21.6 tok/s (2 steps) | 8.51 tok/s | 2.5x |
| Translate to French | 14.3 tok/s (6 steps) | 8.51 tok/s | 1.7x |
| Python is_prime() | 8.2 tok/s (7 steps) | 8.51 tok/s | 1.0x |
Dream correctly solves 15 x 23 = 345 in just 2 denoising steps at 21.6 tok/s.
Why diffusion on CPU?
Autoregressive models are memory-bound (one token = one full weight read). Diffusion models generate all tokens in parallel, making them compute-bound. Thread scaling: 7.4x at 12 cores vs 2.4x for AR.
Dream vs LLaDA
| Strength | Dream-7B | LLaDA-8B |
|---|---|---|
| Math | 21.6 tok/s (2 steps) | 6.0 tok/s (16 steps) |
| Code | 8.2 tok/s (7 steps) | 4.5 tok/s (15 steps) |
| Translation | 13-14 tok/s | 23-28 tok/s |
Use Dream for math, code, factual. Use LLaDA for translation.
Quick Start
huggingface-cli download diffuse-cpp/Dream-v0-Instruct-7B-GGUF dream-7b-q4km.gguf
git clone --recursive https://github.com/iafiscal1212/diffuse-cpp.git
cd diffuse-cpp && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc)
./build/diffuse-cli -m dream-7b-q4km.gguf --tokens "151644,8948,198,2610,525,264,10950,17847,13,151645,198,151644,872,198,3838,374,220,868,1303,220,1419,30,151645,198,151644,77091,198" -n 64 -s 16 -t 12 --remasking entropy_exit
Links
- GitHub: https://github.com/iafiscal1212/diffuse-cpp (Apache-2.0)
- Paper: https://doi.org/10.5281/zenodo.19119814
- LLaDA-8B GGUF: https://huggingface.co/diffuse-cpp/LLaDA-8B-Instruct-GGUF
Contributions welcome!