Skip to content

Commit d0bc1b0

Browse files
committed
Add native dense Llama generation plugin
1 parent c06d61e commit d0bc1b0

24 files changed

Lines changed: 6475 additions & 57 deletions

.github/workflows/emlx_axon.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,25 @@ jobs:
7373
7474
- name: Install emlx_axon dependencies
7575
working-directory: emlx_axon
76+
env:
77+
EMLX_AXON_LOCAL_EMLX: "true"
7678
run: |
7779
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
80+
rm -rf deps/emlx _build/dev/lib/emlx _build/test/lib/emlx
7881
mix deps.get
7982
8083
- name: Check formatting
8184
working-directory: emlx_axon
85+
env:
86+
EMLX_AXON_LOCAL_EMLX: "true"
8287
run: |
8388
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
8489
mix format --check-formatted
8590
8691
- name: Run emlx_axon tests
8792
working-directory: emlx_axon
8893
env:
94+
EMLX_AXON_LOCAL_EMLX: "true"
8995
EMLX_TEST_DEFAULT_GPU: "true"
9096
run: |
9197
export PATH="${{ steps.setup.outputs.path }}:${PATH}"

emlx/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ esc = $(subst $(space),\$(space),$(1))
77

88
# Private configuration
99
PRIV_DIR = $(MIX_APP_PATH)/priv
10-
BUILD_DIR = $(EMLX_CACHE_DIR)/emlx-$(EMLX_VERSION)-mlx-$(MLX_VERSION)$(MLX_VARIANT)/objs
10+
BUILD_DIR = $(EMLX_CACHE_DIR)/emlx-$(EMLX_VERSION)-mlx-$(MLX_VERSION)$(MLX_VARIANT)-$(EMLX_NATIVE_SOURCE_HASH)/objs
1111
EMLX_SO = $(PRIV_DIR)/libemlx.so
1212
EMLX_LIB_DIR = $(PRIV_DIR)/mlx/lib
1313
# Headers are copied alongside the lib (unlike the lib copy, these are not
@@ -55,8 +55,8 @@ endif
5555
MAKE_JOBS ?= $(MAKE_DEFAULT_JOBS)
5656

5757
# Source files
58-
SOURCES = c_src/emlx_nif.cpp c_src/emlx_fast.cpp c_src/emlx_fast/qwen3.cpp c_src/emlx_compiler.cpp c_src/emlx_plugin_registry.cpp
59-
HEADERS = c_src/nx_nif_utils.hpp c_src/emlx_worker.hpp c_src/emlx_async.hpp c_src/emlx_nif_shared.hpp c_src/emlx_plugin_registry.hpp c_src/emlx_fast/qwen3.hpp c_src/emlx_fast/qwen3_plugin_abi.hpp c_src/emlx_compiler.hpp c_src/emlx_runtime_call_bridge.hpp
58+
SOURCES = c_src/emlx_nif.cpp c_src/emlx_fast.cpp c_src/emlx_fast/qwen3.cpp c_src/emlx_fast/llama.cpp c_src/emlx_compiler.cpp c_src/emlx_plugin_registry.cpp
59+
HEADERS = c_src/nx_nif_utils.hpp c_src/emlx_worker.hpp c_src/emlx_async.hpp c_src/emlx_nif_shared.hpp c_src/emlx_plugin_registry.hpp c_src/emlx_fast/qwen3.hpp c_src/emlx_fast/qwen3_plugin_abi.hpp c_src/emlx_fast/llama.hpp c_src/emlx_fast/llama_plugin_abi.hpp c_src/emlx_compiler.hpp c_src/emlx_runtime_call_bridge.hpp
6060
OBJECTS = $(patsubst c_src/%.cpp,$(call esc,$(BUILD_DIR))/%.o,$(SOURCES))
6161

6262
# Main targets

0 commit comments

Comments
 (0)