Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,14 @@ cmake --build build -j$(nproc)
```bash
# Pre-tokenize your prompt (diffuse-cpp does not include a tokenizer)
# Use transformers or tiktoken to get token IDs as a comma-separated list
# CRITICAL: Use the correct tokenizer for your model.
# LLaDA → GSAI-ML/LLaDA-8B-Instruct
# Dream → Dream-org/Dream-v0-Instruct-7B

# Generate text (example with token IDs)
# Generate text (example for LLaDA with "What is the capital of France?")
./build/diffuse-cli \
-m model.gguf \
--tokens "128000,3923,374,279,6864,315,9822,30" \
--tokens "2372,341,268,7706,300,11406,30" \
-n 256 \
-s 16 \
-t 12 \
Expand All @@ -123,7 +126,7 @@ cmake --build build -j$(nproc)

```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("LLaDA-8B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("GSAI-ML/LLaDA-8B-Instruct", trust_remote_code=True)
tokens = tokenizer.encode("What is the capital of France?")
print(",".join(map(str, tokens)))
```
Expand Down Expand Up @@ -272,7 +275,7 @@ params.remasking = diffuse_remasking::ENTROPY_EXIT;
params.entropy_threshold = 1.5f;

// Generate
std::vector<int32_t> prompt_tokens = {128000, 3923, 374};
std::vector<int32_t> prompt_tokens = {2372, 341, 268, 7706, 300, 11406, 30};
auto output = diffuse_generate(ctx, prompt_tokens, 256, params);

// Cleanup
Expand Down