Radix/examples/modernbert/BUILD.bazel

47 lines
1.1 KiB
Python
Raw Normal View History

load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("//bazel:zig.bzl", "zig_cc_binary")
zig_cc_binary(
name = "modernbert",
srcs = ["modernbert.zig"],
args = [
"--model=$(location @ModernBERT-base//:model.safetensors)",
"--tokenizer=$(location @ModernBERT-base//:tokenizer.json)",
"--num-attention-heads=12",
"--tie-word-embeddings=true",
],
data = [
"@ModernBERT-base//:model.safetensors",
"@ModernBERT-base//:tokenizer.json",
],
main = "main.zig",
deps = [
"//async",
"//stdx",
"//zml",
"@com_github_hejsil_clap//:clap",
],
)
# zig_cc_binary(
# name = "test-implementation",
# srcs = ["modernbert.zig"],
# args = [
# "--model=$(location @ModernBERT-base//:model.safetensors)",
# ],
# data = [
# "@ModernBERT-base//:model.safetensors",
# ],
# main = "test.zig",
# deps = [
# "//async",
# "//zml",
# "@com_github_hejsil_clap//:clap",
# ],
# )
build_test(
name = "test",
targets = [":modernbert"],
)