Compare commits

..
1 Commits
9 changed files with 70 additions and 70 deletions

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ digest.txt
# nix
.direnv/
.nix-devel/
# IDEA (PyCharm)
.idea
-1
View File
@@ -29,7 +29,6 @@ To run EXO from source:
git clone https://github.com/exo-explore/exo.git
cd exo/dashboard
npm install && npm run build && cd ..
uv sync --extra mlx
uv run exo
```
+2 -9
View File
@@ -118,7 +118,7 @@ Then restart the Nix daemon: `sudo launchctl kickstart -k system/org.nixos.nix-d
--force
```
Clone the repo, build the dashboard, install the dependencies, and run exo:
Clone the repo, build the dashboard, and run exo:
```bash
# Clone exo
@@ -127,9 +127,6 @@ git clone https://github.com/exo-explore/exo
# Build dashboard
cd exo/dashboard && npm install && npm run build && cd ..
# Install Python dependencies, including the MLX backend
uv sync --extra mlx
# Run exo
uv run exo
```
@@ -179,7 +176,7 @@ rustup toolchain install nightly
**Note:** The `macmon` package is macOS-only and not required for Linux.
Clone the repo, build the dashboard, install the dependencies, and run exo:
Clone the repo, build the dashboard, and run exo:
```bash
# Clone exo
@@ -188,10 +185,6 @@ git clone https://github.com/exo-explore/exo
# Build dashboard
cd exo/dashboard && npm install && npm run build && cd ..
# Install Python dependencies with the MLX backend for your hardware
# (NVIDIA: --extra mlx-cuda13 or --extra mlx-cuda12)
uv sync --extra mlx-cpu
# Run exo
uv run exo
```
+3 -4
View File
@@ -8,7 +8,6 @@
"name": "exo-dashboard",
"version": "1.0.0",
"dependencies": {
"devalue": "^5.6.2",
"highlight.js": "^11.11.1",
"katex": "^0.16.27",
"marked": "^17.0.1",
@@ -2332,9 +2331,9 @@
}
},
"node_modules/devalue": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.2.tgz",
"integrity": "sha512-nPRkjWzzDQlsejL1WVifk5rvcFi/y1onBRxjaFMjZeR9mFpqu2gmAZ9xUB9/IEanEP/vBtGeGganC/GO1fmufg==",
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.5.0.tgz",
"integrity": "sha512-69sM5yrHfFLJt0AZ9QqZXGCPfJ7fQjvpln3Rq5+PS03LD32Ost1Q9N+eEnaQwGRIriKkMImXD56ocjQmfjbV3w==",
"license": "MIT"
},
"node_modules/enhanced-resolve": {
+2 -3
View File
@@ -11,6 +11,8 @@
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.48.4",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
@@ -18,8 +20,6 @@
"@types/d3": "^7.4.3",
"@types/node": "^22",
"d3": "^7.9.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.3",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
@@ -28,7 +28,6 @@
"vite": "^6.0.0"
},
"dependencies": {
"devalue": "^5.6.2",
"highlight.js": "^11.11.1",
"katex": "^0.16.27",
"marked": "^17.0.1",
+1 -1
View File
@@ -146,7 +146,7 @@
config.treefmt.build.wrapper
# PYTHON
self'.packages.exo.passthru.evenv
self'.packages.exo-devel.passthru.localRustEvenv
uv
# RUST
+18 -3
View File
@@ -16,14 +16,29 @@ check:
uv run basedpyright --project pyproject.toml
sync:
uv sync --all-packages --extra mlx
uv sync --all-packages
sync-clean:
uv sync --all-packages --extra mlx --force-reinstall --no-cache
uv sync --all-packages --force-reinstall --no-cache
rust-rebuild:
#!/usr/bin/env bash
export UV_NO_SYNC=1
# build stubs
PYO3_PYTHON="$(uv run python -c 'import sys; print(sys.executable)')" cargo run --bin stub_gen
uv sync --reinstall-package exo_rs
# install with maturin -> incremental builds
cd rust/exo_rs
maturin develop --uv
cd ../..
# symlink exo_rs to .nix-devel site packages
dst=".nix-devel/site-packages"
src="$(uv run python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')"
mkdir -p "$dst"
rm -rf "$dst/exo_rs" "$dst"/exo_rs-*.dist-info
ln -s "$src/exo_rs" "$dst/exo_rs"
for dist_info in "$src"/exo_rs-*.dist-info; do
ln -s "$dist_info" "$dst/$(basename "$dist_info")"
done
build-dashboard:
#!/usr/bin/env bash
+43 -13
View File
@@ -190,6 +190,16 @@ let
root = "$REPO_ROOT";
members = [ "exo" "exo-bench" ];
};
localRustOverlay = _final: prev: {
# The local Rust dev loop supplies exo_rs via PYTHONPATH after
# maturin develop. Keep it out of the Nix venv dependency graph
# so Rust edits do not trigger the Crane-built wheel.
exo = prev.exo.overrideAttrs (old: {
passthru = (old.passthru or { }) // {
dependencies = builtins.removeAttrs (old.passthru.dependencies or { }) [ "exo-rs" ];
};
});
};
pythonSet = (pkgs.callPackage inputs.pyproject-nix.build.packages {
inherit python;
}).overrideScope (
@@ -201,16 +211,28 @@ let
]
);
# mlx and mlx-cuda ship clashing cmake files - we dont need them at runtime anyway
venv = name: (pythonSet.mkVirtualEnv "${name}-venv" members).overrideAttrs (_: { venvSkip = [ "lib/python${python.pythonVersion}/site-packages/mlx/share/cmake/*" "lib/python${python.pythonVersion}/site-packages/build_backend.py" ]; });
venvSkip = [
"lib/python${python.pythonVersion}/site-packages/mlx/share/cmake/*"
"lib/python${python.pythonVersion}/site-packages/build_backend.py"
];
venv = name: (pythonSet.mkVirtualEnv "${name}-venv" members).overrideAttrs (_: { inherit venvSkip; });
evenv = name: ((pythonSet.overrideScope editableOverlay).mkVirtualEnv "${name}-evenv" (members // { exo = (members.exo or [ ]) ++ [ "dev" ]; exo-rs = [ ]; })).overrideAttrs (_: { inherit venvSkip; });
localRustEvenv = name: ((pythonSet.overrideScope (lib.composeExtensions editableOverlay localRustOverlay)).mkVirtualEnv "${name}-local-rust-evenv" (members // { exo = (members.exo or [ ]) ++ [ "dev" ]; })).overrideAttrs (_: { inherit venvSkip; });
mkApp =
let
libPath = lib.makeLibraryPath (
[ pkgs.stdenv.cc.cc.lib ] ++ lib.optionals cudaSupport [ cudaRoot ]
);
in
text: name: pkgs.writeShellApplication {
{ name
, text
, runtimeVenvFor ? venv
, setup ? ""
}:
pkgs.writeShellApplication {
inherit name;
text = ''
${setup}
LD_LIBRARY_PATH="${libPath}''${LD_LIBRARY_PATH:+:}''${LD_LIBRARY_PATH:-}" exec \
${lib.optionalString cudaSupport "nixglhost "} ${text}
'';
@@ -219,14 +241,13 @@ let
EXO_RESOURCES_DIR = inputs.self + /resources;
};
runtimeInputs = [
(venv name)
(runtimeVenvFor name)
] ++ lib.optionals cudaSupport [ pkgs.nix-gl-host ]
++ lib.optionals isDarwin [ pkgs.macmon ];
passthru = {
venv = venv name;
evenv = ((pythonSet.overrideScope editableOverlay).mkVirtualEnv "${name}-evenv" (members // { exo = (members.exo or [ ]) ++ [ "dev" ]; exo-rs = [ ]; })).overrideAttrs (_: {
venvSkip = [ "lib/python${python.pythonVersion}/site-packages/mlx/share/cmake/*" "lib/python${python.pythonVersion}/site-packages/build_backend.py" ];
});
evenv = evenv name;
localRustEvenv = localRustEvenv name;
} // lib.optionalAttrs cudaSupport {
inherit cudaRoot;
};
@@ -235,8 +256,17 @@ let
in
{
inherit venv;
mkPythonScript = path: mkApp ''python ${path} "$@"'';
exo = mkApp ''exo "$@"'' "exo";
mkPythonScript = { name, path }: mkApp { inherit name; text = ''python ${path} "$@"''; };
exo = mkApp { name = "exo"; text = ''exo "$@"''; };
exo-devel = mkApp {
name = "exo-devel";
runtimeVenvFor = localRustEvenv;
setup = ''
export REPO_ROOT="''${REPO_ROOT:-$PWD}"
export PYTHONPATH="$REPO_ROOT/.nix-devel/site-packages''${PYTHONPATH:+:$PYTHONPATH}"
'';
text = ''exo "$@"'';
};
};
in
{
@@ -244,7 +274,7 @@ in
{ self', pkgs, unfreePkgs, lib, ... }:
let
inherit (pkgs.stdenv.hostPlatform) isLinux;
inherit (mkPythonSet { inherit self' pkgs lib; members = { exo = [ "mlx-cpu" ]; }; }) exo;
inherit (mkPythonSet { inherit self' pkgs lib; members = { exo = [ "mlx-cpu" ]; }; }) exo exo-devel;
# Virtual environment with dev dependencies for testing
testVenv = (mkPythonSet {
@@ -272,12 +302,12 @@ in
in
{
packages = {
inherit exo;
inherit exo exo-devel;
# for running tests in ci
exo-test-env = testVenv;
exo-bench = mkBenchScript "exo-bench" (inputs.self + /bench/exo_bench.py);
exo-eval = mkBenchScript "exo-eval" (inputs.self + /bench/exo_eval.py);
exo-eval-tool-calls = mkBenchScript "exo-eval-tool-calls" (inputs.self + /bench/eval_tool_calls.py);
exo-bench = mkBenchScript { name = "exo-bench"; path = inputs.self + /bench/exo_bench.py; };
exo-eval = mkBenchScript { name = "exo-eval"; path = inputs.self + /bench/exo_eval.py; };
exo-eval-tool-calls = mkBenchScript { name = "exo-eval-tool-calls"; path = inputs.self + /bench/eval_tool_calls.py; };
# used by ./tests/run_exo_on.sh
exo-get-all-models-on-cluster = mkSimplePythonScript "exo-get-all-models-on-cluster" (inputs.self + /tests/get_all_models_on_cluster.py);
} // lib.optionalAttrs isLinux {
@@ -1,36 +0,0 @@
model_id = "moonshotai/Kimi-K2.7-Code"
n_layers = 61
hidden_size = 7168
num_key_value_heads = 64
supports_tensor = true
tasks = ["TextGeneration"]
family = "kimi"
quantization = ""
base_model = "Kimi K2.7 Code"
capabilities = ["text", "thinking", "thinking_toggle", "vision"]
context_length = 262144
backends = ["MlxMetal", "MlxCuda", "MlxCpu"]
[storage_size]
in_bytes = 595204986173
# Vision tower + mm_projector extracted unmodified (bf16) from the official
# repo, in the same format as exolabs/Kimi-K2.6-vision; extraction script
# included in the weights repo. Vision config is identical to Kimi-K2.6's.
[vision]
image_token_id = 163605
model_type = "kimi_vl"
weights_repo = "aidiffuser/Kimi-K2.7-Code-vision"
processor_repo = "moonshotai/Kimi-K2.7-Code"
# Source: https://huggingface.co/moonshotai/Kimi-K2.7-Code
# (recommends temperature 1.0 / top_p 0.95 for thinking mode, same as K2.6)
[sampling_defaults]
temperature = 1.0
top_p = 0.95
min_p = 0.01
[sampling_defaults.non_thinking]
temperature = 0.6
top_p = 0.95
min_p = 0.01