Skip to content

Commit 935f60b

Browse files
unamedkrclaude
andcommitted
README: add single-header mode section
quant.h is the headline feature — one file, six functions, cc app.c -lm -lpthread. Placed before Quick Start to lead with the simplest possible usage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba2d1aa commit 935f60b

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,32 @@ quant.cpp is not a fork. It's a standalone engine built from scratch for one goa
4747

4848
---
4949

50-
## Quick Start
50+
## Single-Header Mode
51+
52+
Copy one file. Add LLM to any C project.
53+
54+
```c
55+
#define QUANT_IMPLEMENTATION
56+
#include "quant.h"
57+
58+
int main() {
59+
quant_model* m = quant_load("model.gguf");
60+
quant_ctx* c = quant_new(m, NULL);
61+
quant_generate(c, "Hello!", print_token, NULL);
62+
quant_free_ctx(c);
63+
quant_free_model(m);
64+
}
65+
```
66+
67+
```bash
68+
cc app.c -o app -lm -lpthread # that's it
69+
```
70+
71+
15K lines, 628KB. No cmake, no build system, no dependencies.
72+
73+
---
74+
75+
## Quick Start (Full Build)
5176

5277
```bash
5378
git clone https://github.com/quantumaikr/quant.cpp && cd quant.cpp

0 commit comments

Comments
 (0)