Something went wrong. Try again.
sentence embeddings in pure zig: bge-small with an HF-exact tokenizer and an SME matmul
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940const std = @import("std");
pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{});
const mod = b.addModule("embedz", .{ .root_source_file = b.path("src/embedz.zig"), .target = target, .optimize = optimize, });
const tests = b.addTest(.{ .root_module = mod }); const test_step = b.step("test", "run unit tests"); test_step.dependOn(&b.addRunArtifact(tests).step);
const xval = b.addExecutable(.{ .name = "embedz-xval", .root_module = b.createModule(.{ .root_source_file = b.path("examples/xval.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "embedz", .module = mod }}, }), }); b.installArtifact(xval);
const bench = b.addExecutable(.{ .name = "embedz-bench", .root_module = b.createModule(.{ .root_source_file = b.path("examples/bench.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "embedz", .module = mod }}, }), }); b.installArtifact(bench);}