fix: Phi-3 Q8_0 default + unified server in CLI/CMake#80
Merged
Conversation
## Phi-3.5 registry → Q8_0 (2x faster)
Q8_0 is 2x faster than Q4_K_M on Apple Silicon NEON (3.0 vs 1.5 tok/s
measured on M3). Q4_K_M's complex super-block dequant dominates compute
at batch-1, while Q8_0's simple int8 dequant is NEON-friendly. Both
produce identical quality output.
- Registry: `Phi-3.5-mini-instruct-Q4_K_M.gguf` (2.2 GB)
→ `Phi-3.5-mini-instruct-Q8_0.gguf` (3.8 GB)
- Module docstring size updated (2.4 GB → 3.8 GB)
## CLI `serve` → prefers `quant-server-unified`
`quantcpp serve` now searches for `quant-server-unified` first, then
falls back to the legacy `quant-server`. The unified server builds
directly on quant.h (single-header amalgamation), which fixes #77
(SmolLM2-1.7B regression from libturboquant divergence).
Search order: PATH → ./build/ → ./build_metal/ → ./build_cpu/
## CMake `quant-server-unified` target
Added `quant-server-unified` build target under `TQ_BUILD_SERVER=ON`.
Compiles `tools/quant_server_unified.c` directly against quant.h.
## Verified
- ctest → 35/35 passed
- `quant-server-unified` builds (360 KB binary)
- Python registry confirms Q8_0 filename
- CLI `quantcpp serve` prefers unified binary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two quick wins that immediately improve the user experience:
1. Python registry → Q8_0 (2x speed)
Phi-3.5-mini-instruct-Q4_K_M.gguf(2.2 GB)Phi-3.5-mini-instruct-Q8_0.gguf(3.8 GB)Q8_0's simple int8 dequant is NEON-friendly. Q4_K_M's complex super-block dequant dominates compute at batch-1. Both produce identical quality.
2. CLI `serve` → prefers `quant-server-unified`
`quantcpp serve` now searches for `quant-server-unified` first (quant.h-based, fixes #77), falls back to legacy `quant-server` (libturboquant-based).
3. CMake `quant-server-unified` target
Added under `TQ_BUILD_SERVER=ON`. Compiles `tools/quant_server_unified.c` directly against quant.h — no sync divergence possible.
Verified
🤖 Generated with Claude Code