diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-03-28 21:27:58 +0100 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-03-28 23:10:03 +0100 |
| commit | c47e900b94d18cca1bf600e58f10dbcc2e34c1f7 (patch) | |
| tree | bf7a4247c528841abe71bbbd408eda3ff71b1152 /Makefile | |
| parent | 34e9eefde7870edcc318209738cabb17c71b50ed (diff) | |
| download | ffwd-c47e900b94d18cca1bf600e58f10dbcc2e34c1f7.tar.gz ffwd-c47e900b94d18cca1bf600e58f10dbcc2e34c1f7.zip | |
Refactor and enhance pplx_embed and pplx_embed_mlx for improved model support
- Updated `pplx_embed.h` to support new embedding models: `pplx-embed-v1-4b` and `pplx-embed-context-v1-4b`.
- Simplified model configuration structure and constants for better maintainability.
- Enhanced comments for clarity on model architecture and configuration.
- Modified `pplx_embed_mlx.c` to streamline loading of model weights and configuration from `config.json`.
- Improved memory management and error handling in the MLX backend.
- Updated embedding computation to support dynamic hidden sizes based on model configuration.
- Added `pplx_mlx_config` function to retrieve model configuration details.
- Updated README.md
- Added .gitignore
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -1,7 +1,4 @@ -# pplx_embed - Pure C inference for perplexity-ai/pplx-embed-v1-0.6b -# Makefile - -CC = gcc +CC = gcc CFLAGS_BASE = -Wall -Wextra -O3 -march=native -ffast-math LDFLAGS = -lm -lpthread @@ -27,7 +24,7 @@ TARGET = pplx_embed all: help help: - @echo "pplx_embed - Pure C inference for pplx-embed-v1-0.6b" + @echo "pplx_embed - Inference for pplx-embed-v1 and pplx-embed-context-v1 embedding models" @echo "" @echo "Build targets:" @echo " make blas Build with BLAS acceleration (CPU)" @@ -35,7 +32,7 @@ help: @echo " make debug Debug build with AddressSanitizer" @echo " make clean Remove build artifacts" @echo "" - @echo "Usage after build:" + @echo "Usage:" @echo " ./pplx_embed -d /path/to/model-dir \"text1\" \"text2\"" @echo " ./pplx_embed -d /path/to/model-dir --mlx \"text1\" \"text2\" (if built with make mlx)" @@ -52,8 +49,6 @@ endif blas: $(MAKE) clean $(MAKE) $(TARGET) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" - @echo "" - @echo "Built: $(TARGET) (CPU/BLAS)" # ============================================================================= # MLX build (Apple Silicon GPU - uses mlx-c pure C API) @@ -75,8 +70,6 @@ endif mlx: $(MAKE) clean $(MAKE) $(TARGET) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" EXTRA_OBJS="pplx_embed_mlx.o" - @echo "" - @echo "Built: $(TARGET) (CPU/BLAS + MLX GPU, use --mlx flag)" # ============================================================================= # Debug build |
