Commit Graph

309 Commits

Author SHA1 Message Date
77cd21d2b2 Add gpt-oss model support to core ZML components: formatting, utility functions, safetensors I/O, host buffer management, NN layer handling, and tensor operations. 2025-10-01 14:20:32 +00:00
e1b7fc5781 Add example implementation and Bazel build for OpenAI gpt-oss models (GptOss.zig, main.zig, and BUILD.bazel). 2025-09-30 16:17:00 +00:00
d45a667ee5 Revamp gather API with named indices (and add gather_ variant), improve topK handling, and add Yarn rope embedding support across core modules (buffer, nn, pjrtx, quantization, shape, tensor, testing, tokenizer, torch). 2025-09-26 13:38:11 +00:00
7264fff493 Update MNIST and ModernBERT example scripts to use the new gather and topk APIs. 2025-09-24 15:42:09 +00:00
e641d05dd2 mlir, pjrt, zml: expose missing data types (u2, i1, i2, f4e2m1fn, f8e3m4, f8e4m3, f8e8m0fnu); fix Float32 conversion bug that truncated values 2025-09-19 12:13:32 +00:00
29bd1242ba Add platform tag to buffers for target identification and safety checks; include workaround for PJRT uninitialized memory handling. 2025-09-16 17:43:18 +00:00
9aeb4e9cd0 Update docs and example to demonstrate adding the platform tag to buffers when adding weights. 2025-09-11 11:15:37 +00:00
12efc763d5 Update modernbert example to reflect removal of old writer interface APIs. 2025-09-09 10:54:06 +00:00
3ed9bca5ad Remove deprecated writer interface APIs from core ZML modules (async, MLIR, PJRT, runtime, fmt, aio, buffer, exe, hostbuffer, meta, mlirx). 2025-09-04 14:03:09 +00:00
090d7748d5 Update docs and example scripts (including test files) to remove async helpers asynk, asyncc, awaitt, and await_ 2025-09-02 10:27:40 +00:00
6e15123fb3 Remove obsolete async symbols (asynk, asyncc, awaitt, await_) from core, runtime, and aio modules. 2025-08-29 11:03:59 +00:00
7913c00d70 Implement buffer‑ID based loading by moving tensor ID handling into BufferStore, fix zml.call tag hashing, and expose CPU device count. 2025-08-28 14:39:21 +00:00
6e7617918d Update llama and simple_layer examples to use BufferStore tensor IDs, new CPU device count API, and fix zml.call tag hashing. 2025-08-22 17:55:03 +00:00
cc969bd532 Add experimental zml.callback API (renamed from custom_call) and fix tensor.print(); update PJRT bindings, host buffer utilities, and related core ZML modules. 2025-08-20 10:27:54 +00:00
1fa056a790 Add example and Bazel build for zml.callback demonstrating a manual CUDA kernel invocation. 2025-08-13 12:14:53 +00:00
01da2184fe xla: bump to commit b3fbfee, temporarily disable libnvptxcompiler due to missing support in PjRT CUDA plugin v13.0, add nvshmem to sandbox for PjRT CUDA plugin 2025-08-12 13:32:18 +00:00
f35119f768 ci: revamp commit workflow, deduplicate workflows, fix Linux linking issue introduced by upb, resolve duplicated _start symbol in test targets, temporarily use -c opt to bypass static archive bug 2025-08-08 13:51:27 +00:00
9e3cd6d616 bump runtimes/* code to Zig 0.15.1, restore PyTorch loader using std.fs.File, update CI zig fmt, remove stdx.io, note remaining issues with Neuron and CUDA debug builds 2025-08-07 15:09:27 +00:00
0ed7f5c907 Add Zig example programs for LLaMA, ModernBERT, and SimpleLayer, including a Bazel BUILD file for the LLaMA example. 2025-07-29 16:07:11 +00:00
488a844a0f Add Zig 0.15 compatibility: update BUILD files, async primitives, stdx utilities, MLIR dialects, and PJRT FFI. 2025-07-28 13:54:28 +00:00
e3b7705e3d Remove gguf and torch loader implementations and related BUILD and test assets. 2025-07-24 17:19:43 +00:00
01db09c24b Update MNIST example (BUILD.bazel and mnist.zig) to remove torch loader references. 2025-07-23 12:53:46 +00:00
1cf26756a1 workspace: run buildifier, drop rules_uv, refactor tools/hf dependencies 2025-07-16 10:01:41 +00:00
1427286716 runtimes/neuron: fix neuron runtime
This PR fixes the neuron runtime with the following:

Proxy the PJRT Api method to enforce the client struct sizes since the
neuron PJRT plugin doesn't use `>=` but `==` to assert them, breaking
PJRT compatibility guarantees.
Fixes https://github.com/aws-neuron/aws-neuron-sdk/issues/1095

Reimplement `libneuronxla` in Zig to control neuronx-cc sandboxing and
invocation.

Implement a python bootstrapper in Zig to create a full blown
`neuronx-cc` executable, avoiding the infamous chicken and egg problem
of python executables boostrapping when sandboxed (due to fixed path
shebangs).

---------

Co-authored-by: Corentin Kerisit <corentin.kerisit@gmail.com>
2025-07-15 15:26:03 +00:00
e1ee340306 runtimes/cuda: implement zmlxcuda in Zig 2025-07-08 09:25:25 +00:00
c488b634fc runtimes/rocm: implement zmlxrocm in Zig
Also, sandbox `amdgpu.ids` and restore safetensors json parsing.
2025-07-07 16:48:07 +00:00
a512b9c8a2 Update docs and example BUILD files to reflect the switch from zig_cc_binary to zig_binary. 2025-07-04 15:10:46 +00:00
cf00506dbb Switch workspace build rules from zig_cc_binary to zig_binary, removing the hack and using the C linker directly. 2025-07-03 15:10:36 +00:00
78679817df zml: remove nemo, sentencepiece loaders, remove zig-yaml
Progress towards
2025-06-24 15:39:55 +00:00
fe56f03f5d third_party/xla: de-modularize xla
This PR intends to remove XLA as a bzlmod and transfer it as a non
bzlmod dep.

This is because this module will never be upstreamed as is, so keep it
private.

Also, we fetch llvm-raw and stablehlo from it, which is fine.

While there, dummify the various local_config XLA symbols to please the
imports, as we don't use those parts in ZML itself.

Closes
2025-06-23 09:13:43 +00:00
a540564744 Remove example workspace and related documentation files. 2025-06-20 13:23:06 +00:00
e789e26008 Remove examples workspace and clean up related Bazel BUILD/MODULE files and Zig build scripts. 2025-06-19 09:30:29 +00:00
0716f2dc0e Update examples/MODULE.bazel.lock to reflect the switch from zig‑protobuf to upb. 2025-06-10 16:04:53 +00:00
1b58c34b8c Update ZML build configuration to replace zig-protobuf with upb library. 2025-06-09 16:34:20 +00:00
cba3be4859 pjrt,zml: remove profiler
Closes

Progress towards
2025-06-06 12:24:42 +00:00
7fb02e1888 Update docs: add deployment guide, Hugging Face token instructions, getting‑started tutorial, and include a Bazel lock example. 2025-06-05 13:18:14 +00:00
f9280b1069 Add Bazel MODULE and tool build configuration (BUILD, requirements) for packaging the HF CLI. 2025-05-30 16:42:57 +00:00
111afcdd95 examples/llama: switch to --hf-model-path flag
Instead of giving config, model weights and tokenizer paths, rely on
`huggingface-cli` download.
2025-05-28 13:21:00 +00:00
5a49a3e8ca Update examples MODULE.bazel.lock to reflect the added sandbox neuron dependencies. 2025-05-22 10:10:14 +00:00
1a2b862ec2 Add sandbox neuron dependencies: define a trampoline PJRT, create an empty repository for distroless deps, and update Bazel build files and Zig/C sources accordingly. 2025-05-19 17:35:33 +00:00
9e66d5a06a Update examples/MODULE.bazel.lock to reflect new dependencies. 2025-05-16 11:26:13 +00:00
55c5b540f8 Add XLA 20250718.0‑6319f0d with ROCm 6.4.1 support, update Bazel module files and runtime configs, and apply migration, FFI‑handler and header‑cleanup patches. 2025-05-12 12:10:27 +00:00
cba9ce9615 protobuf, libxev: remove usingnamespace
remove usingnamespace from libxev and zig-protobuf

relevant PRs:
* libxev:
7f803181b1
 * zig-protobuf: https://github.com/zml/zig-protobuf/pull/1/files

This means we can now build ZML with `-fincremental` (in debug mode only
and linux x86-64)

---------

Signed-off-by: Guillaume Wenzek <wzk@zml.ai>
2025-05-06 11:58:20 +00:00
db303a6010 remove usingnamespace from asyncio
Eliminate the final usingnamespace usage, which will be deprecated in version 0.15.0.
2025-05-05 09:03:06 +00:00
ed5ae31338 runtimes/rocm: fetch libdrm from amdgpu repository and add amdgpu.ids layer 2025-04-30 15:53:51 +00:00
47146fc088 workspace: remove glibc version constraint, update rules_rust, and re-enable frame pointers following sandboxing changes. 2025-04-29 12:09:13 +00:00
e7323be10b runtimes/rocm: switch to in-process LLD, removing the need for sandboxed lld. 2025-04-23 11:43:18 +00:00
02ba41ea57 Update examples/MODULE.bazel to bump rules_zig version and fix static‑lib inclusion for non‑exe targets. 2025-04-21 13:51:52 +00:00
f5f3dc6b1b Update rules_zig to 20250714.0-b14a4f1 and fix static‑lib inclusion in runfiles for non‑exe targets. 2025-04-18 12:09:38 +00:00
7d9fdf94e7 runtimes/rocm: sandbox ROCm dependencies and ensure they load on the main thread due to TLS usage in static C++ destructors. 2025-04-14 16:38:15 +00:00