air-rs 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- air_rs-0.1.0/.cargo/config.toml +25 -0
- air_rs-0.1.0/.github/workflows/ci.yml +102 -0
- air_rs-0.1.0/.github/workflows/release.yml +157 -0
- air_rs-0.1.0/.gitignore +50 -0
- air_rs-0.1.0/Cargo.lock +3557 -0
- air_rs-0.1.0/Cargo.toml +93 -0
- air_rs-0.1.0/LICENSE +21 -0
- air_rs-0.1.0/PKG-INFO +588 -0
- air_rs-0.1.0/README.md +561 -0
- air_rs-0.1.0/assets/banner-github.png +0 -0
- air_rs-0.1.0/assets/banner.png +0 -0
- air_rs-0.1.0/benches/throughput.rs +184 -0
- air_rs-0.1.0/build.rs +190 -0
- air_rs-0.1.0/build_air.ps1 +360 -0
- air_rs-0.1.0/build_air.sh +378 -0
- air_rs-0.1.0/pyproject.toml +67 -0
- air_rs-0.1.0/python/air_rs/__init__.py +76 -0
- air_rs-0.1.0/python/air_rs/_types.pyi +121 -0
- air_rs-0.1.0/python/air_rs/py.typed +0 -0
- air_rs-0.1.0/python/air_rs/utils.py +109 -0
- air_rs-0.1.0/python/tests/conftest.py +66 -0
- air_rs-0.1.0/python/tests/test_bindings.py +161 -0
- air_rs-0.1.0/scripts/run_benchmarks.sh +238 -0
- air_rs-0.1.0/scripts/validate_correctness.py +291 -0
- air_rs-0.1.0/src/alt_quant.rs +411 -0
- air_rs-0.1.0/src/api.rs +877 -0
- air_rs-0.1.0/src/batch_optimizer.rs +1057 -0
- air_rs-0.1.0/src/batching/arb.rs +1565 -0
- air_rs-0.1.0/src/batching/kernel.rs +529 -0
- air_rs-0.1.0/src/batching/mod.rs +68 -0
- air_rs-0.1.0/src/chat_template.rs +324 -0
- air_rs-0.1.0/src/drive_inquisitor.rs +908 -0
- air_rs-0.1.0/src/gbnf.rs +902 -0
- air_rs-0.1.0/src/generator.rs +637 -0
- air_rs-0.1.0/src/ghost_drafting.rs +1376 -0
- air_rs-0.1.0/src/gpu_pipeline.rs +401 -0
- air_rs-0.1.0/src/hqq.rs +442 -0
- air_rs-0.1.0/src/iq_quant.rs +369 -0
- air_rs-0.1.0/src/json_grammar.rs +639 -0
- air_rs-0.1.0/src/kv_cache.rs +616 -0
- air_rs-0.1.0/src/kv_compress.rs +1325 -0
- air_rs-0.1.0/src/kv_tier.rs +720 -0
- air_rs-0.1.0/src/lib.rs +61 -0
- air_rs-0.1.0/src/loader.rs +202 -0
- air_rs-0.1.0/src/main.rs +104 -0
- air_rs-0.1.0/src/mamba.rs +349 -0
- air_rs-0.1.0/src/manifest.rs +97 -0
- air_rs-0.1.0/src/mcp_server.rs +611 -0
- air_rs-0.1.0/src/metrics.rs +333 -0
- air_rs-0.1.0/src/mla.rs +318 -0
- air_rs-0.1.0/src/model.rs +412 -0
- air_rs-0.1.0/src/model_hub.rs +426 -0
- air_rs-0.1.0/src/model_variant.rs +353 -0
- air_rs-0.1.0/src/moe.rs +1041 -0
- air_rs-0.1.0/src/multi_token.rs +243 -0
- air_rs-0.1.0/src/neuron_predicate.rs +1227 -0
- air_rs-0.1.0/src/ops.rs +2045 -0
- air_rs-0.1.0/src/orchestrator.rs +118 -0
- air_rs-0.1.0/src/pipeline.rs +1039 -0
- air_rs-0.1.0/src/python.rs +556 -0
- air_rs-0.1.0/src/q4_tiled.rs +377 -0
- air_rs-0.1.0/src/residency.rs +794 -0
- air_rs-0.1.0/src/rwkv.rs +417 -0
- air_rs-0.1.0/src/sampler.rs +297 -0
- air_rs-0.1.0/src/scheduler.rs +443 -0
- air_rs-0.1.0/src/speculative.rs +397 -0
- air_rs-0.1.0/src/stop_seq.rs +364 -0
- air_rs-0.1.0/src/strix/arena.rs +321 -0
- air_rs-0.1.0/src/strix/async_io.rs +685 -0
- air_rs-0.1.0/src/strix/backend_detect.rs +850 -0
- air_rs-0.1.0/src/strix/benchmarks.rs +234 -0
- air_rs-0.1.0/src/strix/bridge.rs +458 -0
- air_rs-0.1.0/src/strix/chaos_tests.rs +214 -0
- air_rs-0.1.0/src/strix/cold_boot.rs +316 -0
- air_rs-0.1.0/src/strix/compat.rs +1100 -0
- air_rs-0.1.0/src/strix/config.rs +189 -0
- air_rs-0.1.0/src/strix/cpu_hal.rs +285 -0
- air_rs-0.1.0/src/strix/cuda_hal.rs +394 -0
- air_rs-0.1.0/src/strix/cufile_ffi.rs +311 -0
- air_rs-0.1.0/src/strix/e2e_validation.rs +349 -0
- air_rs-0.1.0/src/strix/execution_cursor.rs +303 -0
- air_rs-0.1.0/src/strix/gpu_alloc.rs +306 -0
- air_rs-0.1.0/src/strix/gpu_direct.rs +999 -0
- air_rs-0.1.0/src/strix/gpu_tensor_view.rs +348 -0
- air_rs-0.1.0/src/strix/hal.rs +199 -0
- air_rs-0.1.0/src/strix/integration_tests.rs +284 -0
- air_rs-0.1.0/src/strix/io_engine.rs +281 -0
- air_rs-0.1.0/src/strix/meta.rs +156 -0
- air_rs-0.1.0/src/strix/metal_hal.rs +367 -0
- air_rs-0.1.0/src/strix/mmap_storage.rs +564 -0
- air_rs-0.1.0/src/strix/mod.rs +155 -0
- air_rs-0.1.0/src/strix/multi_gpu.rs +631 -0
- air_rs-0.1.0/src/strix/onnx.rs +1021 -0
- air_rs-0.1.0/src/strix/pytorch.rs +1231 -0
- air_rs-0.1.0/src/strix/ram_pool.rs +274 -0
- air_rs-0.1.0/src/strix/registry.rs +374 -0
- air_rs-0.1.0/src/strix/rocm_hal.rs +487 -0
- air_rs-0.1.0/src/strix/safetensors.rs +567 -0
- air_rs-0.1.0/src/strix/scheduler.rs +383 -0
- air_rs-0.1.0/src/strix/scheduler_thread.rs +242 -0
- air_rs-0.1.0/src/strix/score.rs +206 -0
- air_rs-0.1.0/src/strix/security.rs +670 -0
- air_rs-0.1.0/src/strix/session.rs +621 -0
- air_rs-0.1.0/src/strix/std_storage_hal.rs +235 -0
- air_rs-0.1.0/src/strix/streamer_adapter.rs +287 -0
- air_rs-0.1.0/src/strix/types.rs +344 -0
- air_rs-0.1.0/src/strix/vram_pressure.rs +354 -0
- air_rs-0.1.0/src/strix/vulkan_hal.rs +1051 -0
- air_rs-0.1.0/src/think_tag.rs +377 -0
- air_rs-0.1.0/src/tokenizer.rs +293 -0
- air_rs-0.1.0/src/tool_call.rs +487 -0
- air_rs-0.1.0/src/tool_loop.rs +478 -0
- air_rs-0.1.0/src/tui.rs +536 -0
- air_rs-0.1.0/src/ucal.rs +1629 -0
- air_rs-0.1.0/src/uploader.rs +74 -0
- air_rs-0.1.0/src/vision.rs +462 -0
- air_rs-0.1.0/src/weight_streamer.rs +555 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Air.rs Cargo Configuration
|
|
2
|
+
# Windows-specific linker paths (ignored on Linux/macOS).
|
|
3
|
+
# If paths don't match your system, run: .\setup_build_env.ps1
|
|
4
|
+
# which will regenerate this file with auto-detected paths.
|
|
5
|
+
|
|
6
|
+
[target.x86_64-pc-windows-msvc]
|
|
7
|
+
rustflags = [
|
|
8
|
+
"-Lnative=C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.26100.0\\um\\x64",
|
|
9
|
+
"-Lnative=C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.26100.0\\ucrt\\x64",
|
|
10
|
+
"-Lnative=C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.44.35207\\lib\\x64",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
# These sections are harmless placeholders for other targets.
|
|
14
|
+
# Cargo ignores target sections that don't match the current build.
|
|
15
|
+
[target.x86_64-unknown-linux-gnu]
|
|
16
|
+
rustflags = []
|
|
17
|
+
|
|
18
|
+
[target.aarch64-apple-darwin]
|
|
19
|
+
rustflags = []
|
|
20
|
+
|
|
21
|
+
[target.x86_64-apple-darwin]
|
|
22
|
+
rustflags = []
|
|
23
|
+
|
|
24
|
+
[profile.dev]
|
|
25
|
+
incremental = true
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: CI — Check, Test, and Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
RUSTFLAGS: "-D warnings"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
# ── Rust: check + test ──────────────────────────────────────────────────────
|
|
15
|
+
rust:
|
|
16
|
+
name: Rust (${{ matrix.os }})
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Install Rust stable
|
|
26
|
+
uses: dtolnay/rust-toolchain@stable
|
|
27
|
+
with:
|
|
28
|
+
components: rustfmt, clippy
|
|
29
|
+
|
|
30
|
+
- name: Cache Cargo registry
|
|
31
|
+
uses: Swatinem/rust-cache@v2
|
|
32
|
+
|
|
33
|
+
- name: cargo check (default features)
|
|
34
|
+
run: cargo check --all-targets
|
|
35
|
+
|
|
36
|
+
- name: cargo check (python feature)
|
|
37
|
+
run: cargo check --features python
|
|
38
|
+
|
|
39
|
+
- name: cargo test
|
|
40
|
+
run: cargo test --lib
|
|
41
|
+
env:
|
|
42
|
+
RUSTFLAGS: "-A warnings"
|
|
43
|
+
|
|
44
|
+
- name: clippy
|
|
45
|
+
run: cargo clippy -- -D warnings
|
|
46
|
+
if: matrix.os == 'ubuntu-latest'
|
|
47
|
+
|
|
48
|
+
# ── Python: maturin develop + pytest ───────────────────────────────────────
|
|
49
|
+
python:
|
|
50
|
+
name: Python bindings (ubuntu)
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
|
|
55
|
+
- name: Install Rust stable
|
|
56
|
+
uses: dtolnay/rust-toolchain@stable
|
|
57
|
+
|
|
58
|
+
- name: Cache Cargo registry
|
|
59
|
+
uses: Swatinem/rust-cache@v2
|
|
60
|
+
|
|
61
|
+
- uses: actions/setup-python@v5
|
|
62
|
+
with:
|
|
63
|
+
python-version: "3.11"
|
|
64
|
+
cache: pip
|
|
65
|
+
|
|
66
|
+
- name: Install maturin + test deps
|
|
67
|
+
run: pip install "maturin>=1.7,<2" pytest
|
|
68
|
+
|
|
69
|
+
- name: Build and install extension (dev mode)
|
|
70
|
+
run: maturin develop --features python
|
|
71
|
+
|
|
72
|
+
- name: Run pytest (Tier 1 + Tier 2)
|
|
73
|
+
run: python -m pytest python/tests/ -v --tb=short
|
|
74
|
+
|
|
75
|
+
# ── Python: type checking ───────────────────────────────────────────────────
|
|
76
|
+
typecheck:
|
|
77
|
+
name: mypy type checking
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/checkout@v4
|
|
81
|
+
|
|
82
|
+
- uses: actions/setup-python@v5
|
|
83
|
+
with:
|
|
84
|
+
python-version: "3.11"
|
|
85
|
+
|
|
86
|
+
- name: Install mypy + stubs
|
|
87
|
+
run: pip install mypy
|
|
88
|
+
|
|
89
|
+
- name: mypy (utils only — no extension needed)
|
|
90
|
+
run: mypy python/air_rs/utils.py --ignore-missing-imports
|
|
91
|
+
|
|
92
|
+
# ── Python: lint ─────────────────────────────────────────────────────────────
|
|
93
|
+
lint:
|
|
94
|
+
name: Ruff lint
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
- uses: actions/setup-python@v5
|
|
99
|
+
with:
|
|
100
|
+
python-version: "3.11"
|
|
101
|
+
- run: pip install ruff
|
|
102
|
+
- run: ruff check python/
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
name: Release — Build Wheels and Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write # OIDC trusted publisher
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
# Suppress Node.js 20 deprecation warnings
|
|
14
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
15
|
+
# Pure-Rust TLS fallback — avoids needing OpenSSL in manylinux containers
|
|
16
|
+
OPENSSL_STATIC: 1
|
|
17
|
+
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
# ── Linux x86_64 (manylinux_2_28) ────────────────────────────────────────────
|
|
21
|
+
linux-x86:
|
|
22
|
+
name: Linux (x86_64)
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- uses: PyO3/maturin-action@v1
|
|
28
|
+
with:
|
|
29
|
+
target: x86_64
|
|
30
|
+
manylinux: 2_28
|
|
31
|
+
args: --release --features python --out dist -i 3.11 3.12 3.13
|
|
32
|
+
before-script-linux: |
|
|
33
|
+
# Ensure pkg-config + OpenSSL available (belt-and-suspenders)
|
|
34
|
+
# ureq uses rustls by default but some transitive deps may need this
|
|
35
|
+
yum install -y openssl-devel pkg-config || true
|
|
36
|
+
|
|
37
|
+
- uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: wheels-linux-x86_64
|
|
40
|
+
path: dist/*.whl
|
|
41
|
+
|
|
42
|
+
# ── Linux aarch64 (manylinux_2_28 via QEMU) ──────────────────────────────────
|
|
43
|
+
linux-aarch64:
|
|
44
|
+
name: Linux (aarch64)
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- uses: docker/setup-qemu-action@v3
|
|
50
|
+
with:
|
|
51
|
+
platforms: linux/arm64
|
|
52
|
+
|
|
53
|
+
- uses: PyO3/maturin-action@v1
|
|
54
|
+
with:
|
|
55
|
+
target: aarch64
|
|
56
|
+
manylinux: 2_28
|
|
57
|
+
args: --release --features python --out dist -i 3.11 3.12 3.13
|
|
58
|
+
before-script-linux: |
|
|
59
|
+
yum install -y openssl-devel pkg-config || true
|
|
60
|
+
|
|
61
|
+
- uses: actions/upload-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: wheels-linux-aarch64
|
|
64
|
+
path: dist/*.whl
|
|
65
|
+
|
|
66
|
+
# ── macOS universal2 (arm64 + x86_64 via lipo) ───────────────────────────────
|
|
67
|
+
macos:
|
|
68
|
+
name: macOS universal2
|
|
69
|
+
runs-on: macos-latest
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
|
|
73
|
+
- uses: actions/setup-python@v5
|
|
74
|
+
with:
|
|
75
|
+
python-version: "3.11"
|
|
76
|
+
|
|
77
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
78
|
+
with:
|
|
79
|
+
targets: aarch64-apple-darwin,x86_64-apple-darwin
|
|
80
|
+
|
|
81
|
+
- uses: PyO3/maturin-action@v1
|
|
82
|
+
with:
|
|
83
|
+
target: universal2-apple-darwin
|
|
84
|
+
args: --release --features python --out dist
|
|
85
|
+
|
|
86
|
+
- uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: wheels-macos-universal2
|
|
89
|
+
path: dist/*.whl
|
|
90
|
+
|
|
91
|
+
# ── Windows x86_64 ───────────────────────────────────────────────────────────
|
|
92
|
+
windows:
|
|
93
|
+
name: Windows x86_64
|
|
94
|
+
runs-on: windows-latest
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@v4
|
|
97
|
+
|
|
98
|
+
- uses: actions/setup-python@v5
|
|
99
|
+
with:
|
|
100
|
+
python-version: "3.11"
|
|
101
|
+
|
|
102
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
103
|
+
|
|
104
|
+
- uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
target: x86_64
|
|
107
|
+
args: --release --features python --out dist
|
|
108
|
+
|
|
109
|
+
- uses: actions/upload-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: wheels-windows-x86_64
|
|
112
|
+
path: dist/*.whl
|
|
113
|
+
|
|
114
|
+
# ── Source distribution ───────────────────────────────────────────────────────
|
|
115
|
+
sdist:
|
|
116
|
+
name: Source distribution
|
|
117
|
+
runs-on: ubuntu-latest
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/checkout@v4
|
|
120
|
+
|
|
121
|
+
- uses: PyO3/maturin-action@v1
|
|
122
|
+
with:
|
|
123
|
+
command: sdist
|
|
124
|
+
args: --out dist
|
|
125
|
+
|
|
126
|
+
- uses: actions/upload-artifact@v4
|
|
127
|
+
with:
|
|
128
|
+
name: sdist
|
|
129
|
+
path: dist/*.tar.gz
|
|
130
|
+
|
|
131
|
+
# ── Publish to PyPI via OIDC Trusted Publisher ────────────────────────────────
|
|
132
|
+
publish:
|
|
133
|
+
name: Publish to PyPI
|
|
134
|
+
runs-on: ubuntu-latest
|
|
135
|
+
needs: [linux-x86, linux-aarch64, macos, windows, sdist]
|
|
136
|
+
environment:
|
|
137
|
+
name: pypi
|
|
138
|
+
url: https://pypi.org/project/air-rs/
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/download-artifact@v4
|
|
141
|
+
with:
|
|
142
|
+
pattern: wheels-*
|
|
143
|
+
path: dist
|
|
144
|
+
merge-multiple: true
|
|
145
|
+
|
|
146
|
+
- uses: actions/download-artifact@v4
|
|
147
|
+
with:
|
|
148
|
+
name: sdist
|
|
149
|
+
path: dist
|
|
150
|
+
|
|
151
|
+
- name: List distribution files
|
|
152
|
+
run: ls -lh dist/
|
|
153
|
+
|
|
154
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
155
|
+
with:
|
|
156
|
+
packages-dir: dist/
|
|
157
|
+
skip-existing: true
|
air_rs-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Build artifacts
|
|
2
|
+
/target/
|
|
3
|
+
/LLM Research Papers Parsed/
|
|
4
|
+
/graphify-out/
|
|
5
|
+
/graphifyy_env/
|
|
6
|
+
# IDE
|
|
7
|
+
.idea/
|
|
8
|
+
.vscode/
|
|
9
|
+
*.swp
|
|
10
|
+
*.swo
|
|
11
|
+
|
|
12
|
+
# OS
|
|
13
|
+
Thumbs.db
|
|
14
|
+
.DS_Store
|
|
15
|
+
|
|
16
|
+
# Logs
|
|
17
|
+
*.log
|
|
18
|
+
*.txt
|
|
19
|
+
!README.md
|
|
20
|
+
!LICENSE
|
|
21
|
+
|
|
22
|
+
# GGUF model files (too large for git)
|
|
23
|
+
*.gguf
|
|
24
|
+
|
|
25
|
+
# Protocols
|
|
26
|
+
*.md
|
|
27
|
+
|
|
28
|
+
#Indentifiers
|
|
29
|
+
*:Zone.Identifier
|
|
30
|
+
|
|
31
|
+
#Bak files
|
|
32
|
+
*.bak
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Benchmark guide assets
|
|
36
|
+
docs/*.png
|
|
37
|
+
docs/*.jpg
|
|
38
|
+
|
|
39
|
+
# Benchmark results
|
|
40
|
+
results/
|
|
41
|
+
*.json
|
|
42
|
+
|
|
43
|
+
# Python cache
|
|
44
|
+
__pycache__/
|
|
45
|
+
*.pyc
|
|
46
|
+
scripts/__pycache__/
|
|
47
|
+
|
|
48
|
+
# Claw Code editor sessions
|
|
49
|
+
.claw/
|
|
50
|
+
.venv/
|